
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (57)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (3969)
-
lavc/vdpau_vp9 : Do not mix declarations and code.
6 janvier 2020, par Carl Eugen Hoyos -
How to let fluent-ffmpeg complete rendering before executing next line of code ?
12 avril 2020, par wongzThe .forEach() loop cuts ffmpeg short so it doesn't fully finish rendering any single video. How can I allow ffmpeg to finish rendering before the next loop occurs ?



let videos = [vid1.mp4, vid2.mp4, vid3.mp4];

videos.forEach((vid, i) => {
 ffmpeg(vid)
 .size('1280x720')
 .save(vid);
}



-
How do I set the framerate/FPS in an FFmpeg code (C) ?
2 juin 2020, par Tobias v. BrevernI try to encode single pictures to a .avi video. The goal is to have every picture displayed for a set amount of seconds to create a slide show. I tried my script with 10 pictures and a delay of 1/5 of a second but the output file was not even half a second long (but displayed every picture). For setting the framerate I use the time_base option of the AVCodeContext :



ctx->time_base = (AVRational) {1, 5};



When I use the command
ffmpeg -framerate 1/3 -i img%03d.png -codec png output.avi
everything works fine and I get the file I want. I use the png codec because it was the only one i tried that is playable with Windows Media Player.


Am I missing anything here ? Is there another option that has impact on the framerate ?



This is my code so far :



Note : I use a couple of self made data structures and methodes from other classes. They are the ones written in Caps Lock. They basicly do what the name suggests but are necessary for my project. The Input Array contains the pictures that i want to encode.



include <libavutil></libavutil>opt.h>
include <libavutil></libavutil>imgutils.h>
include <libavutil></libavutil>error.h>

void PixmapsToAVI (ARRAY* arr, String outfile, double secs)
{
 if (arr!=nil && outfile!="" && secs!=0) {
 AVCodec* codec = avcodec_find_encoder(AV_CODEC_ID_PNG);
 if (codec) {
 int width = -1;
 int height = -1;
 int ret = 0;

 AVCodecContext* ctx = NULL;
 ctx = avcodec_alloc_context3(codec);
 AVFrame* frame = av_frame_alloc();
 AVPacket* pkt = av_packet_alloc();

 FILE* file = fopen(outfile, "wb");

 ARRAYELEMENT* e;
 int count = 0;
 forall (e, *arr) {
 BITMAP bitmap (e->value, false);
 if (width < 0) {
 width = bitmap.Width();
 height = bitmap.Height();

 ctx->width = width;
 ctx->height = height;
 ctx->time_base = (AVRational){1, 5};
 ctx->framerate = (AVRational){5, 1};
 ctx->pix_fmt = AV_PIX_FMT_RGB24;
 ret = avcodec_open2(ctx, codec, NULL);

 frame->width = width;
 frame->height = height;
 frame->format = ctx->pix_fmt;
 av_opt_set(ctx->priv_data, "preset", "slow", 1);

 }
 ret = av_frame_get_buffer(frame, 1);
 frame->linesize[0] = width*3;

 bitmap.Convert32();
 byte* pixels = bitmap.PixelsRGB(); 

//The two methodes above convert the Pixmap into the RGB structure we need
//They are not needed to get an output file but are needed to get one that makes sense

 fflush(stdout);
 int writeable = av_frame_make_writable(frame);
 if (writeable>=0) {
 for(int i=0; i<(height*width*3); i++){
 frame->data[0][i] = pixels[i];
 }
 }
 ret = avcodec_send_frame(ctx, frame);
 for(int i=0; i= 0) {
 ret = avcodec_receive_packet(ctx, pkt);
 }
 count++;
 avcodec_receive_packet(ctx, pkt);
 fwrite(pkt->data, 1, pkt->size, file);
 fflush(stdout);
 av_packet_unref(pkt);
 }
 fclose(file);
 avcodec_free_context(&ctx);
 av_frame_free(&frame);
 av_packet_free(&pkt);

 }
 }
}