Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (70)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur
8 février 2011, parLa visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
Configuration de la boite multimédia
Dès (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (10325)
-
Input transparent motions into FFMPEG pipe:0
29 septembre 2021, par NTPHCMI follow this to bring a stdinput to FFMPEG.


The idea is : we use AS3 to capture every frame in Animate to byteArray (with ARGB pixel format - means the frame can have transparancy background). After that, we transfer that byteArray to FFMPEG to get output.


If I capture non-transparency picture (the picture with background), the process works well to create motion video.


But when I capture transparency picture and make motion (multi-frame video), the problem appears as below :
Output picture


We can see the bird print a long streak, but I expect one bird flying from the right to the left like this.


It seems like the previous frames are not cleared. Do you have any suggestions to solve this ?


-
Output video to both file and pipe : simultaneously using FFmpeg Libav
27 mai 2022, par Hillel RosensweigI have been trying to output video (from my webcam) simultaneously to both a file ('out.mkv') and pipe :
The file gets filtered frames, and the pipe : gets unfiltered rawvideo.
My frame rate is 30 fps. However, I am getting a far lower framerate in my file output.


Attached is the while loop which reads packets and writes them to output :


while (1) {
 av_read_frame(ifmt_ctx, packet);
 stream_index = packet->stream_index;
 StreamContext *stream = &file_stream_ctx[stream_index];
 av_packet_rescale_ts(packet,
 ifmt_ctx->streams[stream_index]->time_base,
 stream->dec_ctx->time_base);
 avcodec_send_packet(stream->dec_ctx, packet);

 while (ret >= 0) {
 avcodec_receive_frame(stream->dec_ctx, stream->dec_frame);
 stream->dec_frame->pts = stream->dec_frame->best_effort_timestamp;
 ret = filter_encode_write_frame(stream->dec_frame, stream_index,file_stream_ctx,file_filter_ctx, file_ofmt_ctx);
 ret = av_interleaved_write_frame(pipe_ofmt_ctx, packet);
 }
}


'ifmt_ctx' is the AVFormatContext for the webcam.
'file_ofmt_ctx', is the AVFormatContext for the pipe for the output file, and pipe_ofmt_ctx is the AVFormatContext.
'file_stream_ctx' and 'file_filter_ctx' are the stream and filter contexts used for filtering and encoding the file output.


My guess is that writing to the pipe is taking too long and not allowing the next packet to be read on time - causing a lower frame rate. Does that make sense ? If so - any suggestions on how to fix it ? (I tried using AVFMT_FLAG_NONBLOCK but it doesn't seem to help).


Thanks
Hillel


-
Receiving multiple files from ffmpeg via subprocesses.PIPE
11 avril 2022, par Per PlexiI am using ffmpeg to convert a video into images. These images are then processed by my Python program. Originally I used ffmpeg to first save the images to disk, then reading them one by one with Python.



This works fine, but in an effort to speed up the program I am trying to skip the storage step and only work with the images in memory.



I use the following ffmpeg and Python subproccesses command to pipe the output from ffmpeg to Python :



command = "ffmpeg.exe -i ADD\\sg1-original.mp4 -r 1 -f image2pipe pipe:1"
pipe = subprocess.Popen(ffmpeg-command, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
image = Image.new(pipe.communicate()[0])



The image variable can then be used by my program. The problem is that if I send more than 1 image from ffmpeg all the data is stored in this variable. I need a way to separate the images. The only way I can think of is splitting on jpeg markers end of file (0xff, 0xd9). This works, but is unreliable.



What have I missed regarding piping files with subproccesses. Is there a way to only read one file at a time from the pipeline ?