I recently audited a large folder containing a variety of encoded videos from 2002-2014. Using ffmpeg, I extracted and recorded metadata, including the video codec used on the film. An example command I might run to get this data: ffprobe -show_format -show_streams -print_format json -loglevel quiet <filename>. From there I am extracting the streams -> [first video stream] -> codec_name key from the results.

Many of the files return codecs I recognize (hevc, h264, vp9, mpeg2video, wmv1, etc.) However, confusingly, they also return many codecs that I would think are implementations of MPEG-4 part 2: divx, dx50, fmp4, mp4v, mpeg4, msmpeg4v1, msmpeg4v2, msmpeg4v3, and xvid.

If MPEG-4 part 2 is considered a single video standard, then I would think that although there may be multiple encoders that produce video according to that standard, they'd all be the same "codec". That's clearly an incorrect assumption on my part. But all of the MPEG-4 Part 10 files report as h264 irrespective of which encoder was used. So my first question is what is the distinction between a codec and an encoder, and why do all encoders lead to the same "codec" for MPEG-4 Part 10, but not for MPEG-4 Part 2?

Second, how do all these files differ from one another? I presume there is no generalizable distinction in terms of quality, because quality is a setting of an encode, not an intrinsic feature of an encoder. But how would a video player think of each of these codecs as being separate? What features do each have that the other do not?

Although this previous question overlaps mine, but I do not think it answers it in total. While it provides history, it does not discuss the encoder/codec distinction or bring in all of the codecs I ask about; I am less interested in learning who developed each and more interested in understanding the technical distinction.


This site is temporarily in read-only mode and not accepting new answers.

Browse other questions tagged .