Default ffmpeg codec when nothing is specified

If I import a file for use with ffmpeg but don’t specify anything about the codecs of any of the streams, will ffmpeg do anything? Is the default action just copying codecs? Or ffmpeg encodes the input file using some standard codec?

Will the next two teams be the same? Or will it be the second to recode and take the age?

ffmpeg -i input.mkv -c:v copy -c:a copy output.mp4 ffmpeg -i input.mkv output.mp4 
+7
ffmpeg codec
source share
2 answers

If I import a file for use with ffmpeg but don’t specify anything about the codecs of any of the streams, will ffmpeg do anything?

ffmpeg will recode each input stream using the default codes. The encoders used will depend on how you configure ffmpeg. For example, if available libx264 will be the default encoder for mp4 output, but if not, then mpeg4 will be used. By default, ffmpeg will only encode one stream of each type and will ignore the rest (see stream selection ).

Of your two teams, the first will use

+7
source share

To detect the default codecs (both audio and video) used by the second command on a computer :

  • Run the second command, possibly with -t 5 , so that it completes faster (encrypt in just 5 seconds).

  • Run ffprobe output.mp4 . Scan the output for Video and Audio to see which codecs are ultimately used. For example, my installation of Ubuntu 12 uses h264 and aac.

+1
source share

All Articles