FFmpeg - Encode MPEG-4 Part 2: Difference between revisions

From PiRho Knowledgebase
Jump to navigationJump to search
Created page with "FFmpeg has two encoders to output MPEG-4 video. The external encoding library libxvid:<br/> <code>ffmpeg -i input.avi -c:v libxvid output.avi</code><br/> ...and the native encoder mpeg4:<br/> <code>ffmpeg -i input.avi -c:v mpeg4 -vtag xvid output.avi</code><br/> The native encoder has the advantage of not requiring an external library. Both encoders should provide a similar output, but for lower bitrates/quality (e.g. 1000 kBit/s for 720p content), libxvid will deliver b..."
 
(No difference)

Revision as of 11:32, 6 March 2025

FFmpeg has two encoders to output MPEG-4 video. The external encoding library libxvid:
ffmpeg -i input.avi -c:v libxvid output.avi
...and the native encoder mpeg4:
ffmpeg -i input.avi -c:v mpeg4 -vtag xvid output.avi
The native encoder has the advantage of not requiring an external library. Both encoders should provide a similar output, but for lower bitrates/quality (e.g. 1000 kBit/s for 720p content), libxvid will deliver better quality than mpeg4.
The default FourCC stored in an MPEG-4-coded file will be FMP4. If you want a different FourCC, use the -vtag option. E.g., -vtag xvid will force the FourCC xvid to be stored as the video FourCC rather than the default.
Reference: [FFmpeg: MPEG-4 Encoding Guide]