
Recherche avancée
Autres articles (12)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (6846)
-
Is there a faster way to generate video from pixel arrays using python and ffmpeg ?
8 mai 2019, par devneal17I’ve found a few sources which use python and ffmpeg to generate video from pixel arrays by passing the
-f rawvideo
flag 1 2. However, this is very slow for high-definition video since each individual pixel must be piped into ffmpeg.In fact this is provably wasteful, as I’ve found that 2.5Gb of pixel arrays generates about 80Kb of video. I’ve also chanced upon some examples where javascript can render high quality animations in near-real time 1, which makes me even more suspicious that I’m doing something wrong.
Is there a way to do this more efficiently, perhaps by piping the differences between pixel arrays into ffmpeg rather than the pixels themselves ?
(edit) This is the line I’m using. Most executions take the
else
path that follows. -
FFmpeg : Concatenated clips extracted using -ss and -t, hang or go out of sync while playing
20 juillet 2013, par YogiI have a set of movies in different formats, and I am trying to extract small clips from these source movies, and concatenate them into one movie.
My workflow has been the following :
-
Convert all the source movies to the same format (width, height, fps, codec)T the scale and pad options are so that all movies oare of the same size, even if their aspect ratio is different.
fmpeg -i $infile -vcodec libx264 -strict -2 -vf scale=iw*sar*min(${MAX_WIDTH}/(iw*sar)\,${MAX_HEIGHT}/ih):ih*min(${MAX_WIDTH}/(iw*sar)\,${MAX_HEIGHT}/ih),pad=${MAX_WIDTH}:${MAX_HEIGHT}:(ow-iw)/2:(oh-ih)/2 -b:v 500k -b:a 64k -movflags +faststart -g 10 -r 25 ${outbasename}.mp4
-
extract clips :
ffmpeg -ss $starttime -t $duration -i $in_file -vcodec copy -acodec copy $out_file
-
Then finally combine clips by first making a concat_list.txt file which contains the list of clips to be concatenated, and their duration, and then using ffmpegs's concat demux :
ffmpeg -f concat -i concat_list.txt -c copy -movflags +faststart $oname
The problem I am facing is that many of the final videos hang or go out of sync, somewhere in the middle of playing. I have tried using mjpeg as the codec, but I still get the same behavior. I can play the individual extracted clips, and then all seem to play fine in most players. Does anybody know what I am doing wrong ? I am using ffmpeg version 1.2.1.
-
-
Fastest way to extract moving dynamic crop from video using ffmpeg
5 avril 2024, par NateWI'm working on an AI project that involves object detection and action recognition on roughly 30 minute videos.


My pipeline is the following :


- 

- determine crops using object detection model
- extract crops using Python and write them to disk as individual images for each frame.
- use action recognition model by inputting a series of the crops.








The models are fast but actual writing of the crops to disk is slow. Sure, using an SSD would speed it up but I'm sure ffmpeg would greatly speed it up.


Some of the challenges with the crops :


- 

- the output size is always 128x128
- the input size is variable
- the crop moves on every frame








My process for extracting crops is simple using
cv2.imwrite(output_crop_path, crop)
in a for loop.

I've done experiments trying to use
sndcommand
andfilter_complex
. I tried this https://stackoverflow.com/a/67508233/4447761 but it outputs an image with black below the crop and the image gets wrapped around on the x axis.