[FFmpeg-user] Advanced FFmpeg Options
Justin Toner
justinmtoner at yahoo.com
Mon Aug 24 07:03:07 CEST 2015
I am transcoding DVD's to mp4 files before my toddler destroys them all. I am using FFmpeg via Linux terminal, but I started with the code generated by WinFF. I understand about 40% of the options in the code, and I have not been able to find good explanations of the other options using man ffmpeg, of ffmpeg -help full, or x264 --fullhelp, so I am hoping that I can complete my understanding with your help.
Here is the code line I am using now (transcoding takes ~ 1 hour for one movie):
/usr/local/bin/ffmpeg -y -i "/home/justin/Videos/movie.mkv" -crf 10 -vcodec libx264 -filter:v scale=720:480 -preset veryslow -acodec ac3 -ar 48000 -b:a 256k -coder 1 -flags +loop -cmp chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0 "/home/justin/Videos/movie-dvd-ac3.mp4"
Here is my summary of the options:
-y overwrite output files. (main option)
-i input file. (main option)
-crf Constant Rate Factor. Values: 0-51. 0 is lossless, don't go above 20. Consider adding "crf_max 20".
-vcodec specify the video encoder. (video option)
-filter This is applying a filter to stream v. (See the ffmpeg-filters manual for more information about the filtergraph syntax.) (main option)
-preset This is a quality setting. Slower speeds give higher quality, and maybe smaller file sizes. (main option)
-acodec specify the audio encoder. (audio option)
-ar Set the audio sampling frequency. For output streams it is set by default to the frequency of the corresponding input stream. For input streams this option only makes sense for audio grabbing devices and raw demuxers and is mapped to the corresponding demuxer options. (audio option)
-b Bitrates. -b:a for audio stream and -b:v for video stream
-coder ?
-flags +loop = use loop filter #what does this mean?
-cmp ?
-partitions ?
-me_method set motion estimation method (from INT_MIN to INT_MAX) (default 5)
-subq sub-pel motion estimation quality (from INT_MIN to INT_MAX) (default 8)
-me_range limit motion vectors range (from INT_MIN to INT_MAX) (default 0)
-g set the group of picture (GOP) size (from INT_MIN to INT_MAX) (default 12)
-keyint_min minimum interval between IDR-frames (from INT_MIN to INT_MAX) (default 25)
-sc_threshold scene change threshold (from INT_MIN to INT_MAX) (default 0)
-i_qfactor QP factor between P- and I-frames (from -FLT_MAX to FLT_MAX) (default -0.8)
-b_strategy strategy to choose between I/P/B-frames (from INT_MIN to INT_MAX) (default 0)
-threads (from 0 to INT_MAX) (default 1)
These are the options I do understand:
-y overwrite output files. (main option)
-i input file. (main option)
-crf Constant Rate Factor. Values: 0-51. 0 is lossless, don't go above 20. Consider adding "crf_max 20".
-vcodec specify the video encoder. (video option)
-filter This is applying a filter to stream v. (See the ffmpeg-filters manual for more information about the filtergraph syntax.) (main option)
-preset This is a quality setting. Slower speeds give higher quality, and maybe smaller file sizes. (main option)
-acodec specify the audio encoder. (audio option)
-ar Set the audio sampling frequency. For output streams it is set by default to the frequency of the corresponding input stream. For input streams this option only makes sense for audio grabbing devices and raw demuxers and is mapped to the corresponding demuxer options. (audio option)
-b Bitrates. -b:a for audio stream and -b:v for video stream
Is there a source / document I can go to in order to learn what the other options mean? I am hoping this will bring other useful options to light for me as well. If not, can anyone explain what the other options are, what the default settings are, and pros & cons associated with the different settings for these options?
Thank you in advance!
More information about the ffmpeg-user
mailing list