Introduction
An .m2v file holds MPEG-2 video on its own, with no audio and no
container. MPEG-2 video, defined by ITU-T H.262 and ISO/IEC 13818-2, is the codec of
DVD video and of standard-definition digital television. DVD authoring tools take the
video as an .m2v file and the audio as separate files, then multiplex them
into the disc’s VOB files.
MPEG-1 video streams have the same layout and are sometimes saved as
.m1v.
Structure
The stream is made of headers and data, each header starting with a start code: the
bytes 00 00 01 and a code byte. B3 is the sequence header,
with the frame size, aspect ratio, frame rate and bit rate; B5 is an
extension, which marks the stream as MPEG-2 rather than MPEG-1; B8 starts
a group of pictures; 00 is a picture header; 01 to
AF are slices of the picture; and B7 ends the sequence.
000 00 01 B3 sequence headervaries…00 00 01 B5 sequence extensionvaries…00 00 01 B8 group of pictures8 bytes…00 00 01 00 picture header, then its slicesrepeated…00 00 01 B7 sequence end4 bytes
Links
Software
- FFmpeg and ffplay (Windows, macOS, Linux)
- VLC media player (Windows, macOS, Linux, mobile)
- mpv (Windows, macOS, Linux)
- Adobe Media Encoder, which writes MPEG-2 for DVD (Windows, macOS)
Developers
- libavcodec, C, FFmpeg’s codec library, which decodes and encodes MPEG-2 video
Reference
- ITU-T Recommendation H.262, MPEG-2 video