Ffmpeg
From IridiaWiki
Revision as of 10:05, 10 October 2011 by Manubrambi (talk | contribs) (New page: These are the steps to convert a set of frames (in the format frame_xxxxx.bmp) to a video. ==== Some options ==== * -f image2 : to start from a set of frames (not a video) * -i input : th...)
These are the steps to convert a set of frames (in the format frame_xxxxx.bmp) to a video.
Some options
- -f image2 : to start from a set of frames (not a video)
- -i input : the input value
- -r xx.xxxx : frames per second (that is, fps given by the camera when recording)
- -b xxxxk : specify the bitrate (higher = better quality, larger file size)
- -threads 0 : optimal thread usage
- -an : no audio
- -vcodec libx264 : uses the best and newest codec
- -vpre xxxx : codec quality (see here )
- output.ext : output is the name of the file, ext is the extension. Note that selecting mp4 or avi produces different files (is not just a name!)
Examples
- Low quality video, fast result:
ffmpeg -f image2 -r 12.0205 -i frame_%05d.bmp -vcodec libx264 -threads 0 -an -vpre fast video_fast.avi
- High quality (slow, high quality)::
ffmpeg -f image2 -r 12.0205 -i frame_%05d.bmp -vcodec libx264 -threads 0 -an -vpre hq -b 2000k video2000k.avi
- High quality, 2 pass (very slow, even higher quality):
- note that there are actually two commands (hence the &&), the first generates the first pass to get the info necessary for the second pass. The command generates 4 files: video_2pass1.avi (the first pass, useless, can be deleted), video_2pass2.avi (the video itself, to keep) and 2 log files (delete them if you need to create another 2pass video)
ffmpeg -f image2 -r 12.0205 -i frame_%05d.bmp -an -vcodec libx264 -threads 0 -vpre fastfirstpass -b 2000k -pass 1 video_2pass1.avi && ffmpeg -f image2 -r 12.0205 -i frame_%05d.bmp -an -vcodec libx264 -threads 0 -vpre hq -b 2000k -pass 2 video_2pass2.avi
Useful links
- http://juliensimon.blogspot.com/2009/01/howto-ffmpeg-x264-presets.html
- http://rodrigopolo.com/ffmpeg/cheats.html
--Manubrambi 09:05, 10 October 2011 (UTC)