# What is an MPG File?

An MPG file typically contains an MPEG program stream with MPEG-1 or MPEG-2 video and optional multiplexed audio. Its extension alone does not establish the exact stream version or codecs.

<span aria-hidden="true" id="how-it-works"></span>

## How MPG Files work

The `.mpg` and `.mpeg` suffixes are a de facto convention, not a format declaration: the Library of Congress notes that there is no explicit MPEG-1 file format. Most such files hold an MPEG-1 system stream (ISO/IEC 11172-1) or an MPEG-2 program stream (ITU-T H.222.0, ISO/IEC 13818-1). A program stream combines the packets of one program’s video and audio streams, which share a single time base, into a sequence of packs, each starting with the start code `0x000001BA` and a clock reference. The MPEG-2 program stream is defined to be forward compatible with the MPEG-1 system stream, and program stream decoders must also decode the older form. The registered media type is `video/mpeg`. Ingest systems therefore identify the container, stream types, frame rate, and timestamps before deciding whether to remux or encode.

<span aria-hidden="true" id="key-facts"></span>

## Key facts

1. An MPG program stream is not a transport stream, and a transport stream parser will not read it. H.222.0 describes program stream packets as variable and relatively long, for relatively error-free environments such as files, while transport stream packets are a fixed 188 bytes for error-prone links. Neither format is a subset of the other, although the standard calls conversion between them possible and reasonable.
2. The suffix does not tell you whether there is a container, audio, or which decoder is needed. FFmpeg registers `mpg` and `mpeg` both for its program stream muxer and for raw MPEG-1 video with no container or audio, and its program stream demuxer recognizes H.264, HEVC, MPEG-4 video, AAC, and AC-3 in addition to MPEG-1 and MPEG-2 video and MPEG audio. Base allowlists on probed stream types, not on `.mpg`.
3. MPEG-2 video carries its display behavior in the bitstream, and a converter that ignores it can produce the wrong field order, frame cadence, or picture shape. `progressive_frame`, `top_field_first`, and `repeat_first_field` signal interlacing, field order, and repeated fields or frames, but their meaning depends on `progressive_sequence` and `picture_structure`: in a progressive sequence, for example, `top_field_first` combines with `repeat_first_field` to set whether a frame is output once, twice, or three times, not which field comes first. `aspect_ratio_information` signals either square samples or a display aspect ratio of 4:3, 16:9, or 2.21:1, so the coded width and height alone do not give the display shape.

<span aria-hidden="true" id="when-it-matters"></span>

## When MPG Files matter

Probe MPG files from Video CD, DVD-era exports, legacy websites, or older archives before processing them. Plan to transcode for web playback: MDN’s video codec guide calls MPEG-1 and MPEG-2 video a poor choice for websites and lists them as unsupported in Chrome, Edge, Firefox, and Opera, with Safari the only listed exception.

<span aria-hidden="true" id="transloadit"></span>

## How Transloadit helps with MPG Files

Transloadit’s audio and video formats table lists `mpeg` (MPEG-1 Systems / MPEG program stream) as a format its FFmpeg-based Robots, such as `/video/encode`, can read and write.

The table is paginated and sorted by name; follow its Next page link to reach the `mpeg` row. It lists container support only, which does not show that every interlaced or unusual MPG source converts correctly, so test representative files.

* [Audio/video formats by FFmpeg stack→](/docs/supported-formats/audio-video-formats.md)
* [Video encode Robot→](/docs/robots/video-encode.md)

[Explore Transloadit’s file formats & compression capabilities](/docs/supported-formats.md)

<span aria-hidden="true" id="references"></span>

## Sources

* [ITU-T H.222.0 | ISO/IEC 13818-1, MPEG-2 Systems: program stream and transport stream (Introduction; section 2.5.3 program stream; section 2.8 compatibility with ISO/IEC 11172)](https://www.itu.int/rec/T-REC-H.222.0)
* [ITU-T H.262 | ISO/IEC 13818-2, MPEG-2 Video: aspect\_ratio\_information (Table 6-3) and picture coding extension flags (6.3.10)](https://www.itu.int/rec/T-REC-H.262)
* [Library of Congress format description: MPEG-1 (file type signifiers, media types)](https://www.loc.gov/preservation/digital/formats/fdd/fdd000035.shtml)
* [IANA media types registry: video/mpeg, video/MP1S, video/MP2P, video/MPV](https://www.iana.org/assignments/media-types/media-types.xhtml#video)
* [FFmpeg n8.0 mpegenc.c: program stream muxer registered for mpg and mpeg](https://github.com/FFmpeg/FFmpeg/blob/n8.0/libavformat/mpegenc.c#L1309-L1314)
* [FFmpeg n8.0 rawenc.c: raw MPEG-1 video muxer registered for mpg, mpeg, and m1v](https://github.com/FFmpeg/FFmpeg/blob/n8.0/libavformat/rawenc.c#L538-L543)
* [FFmpeg n8.0 mpeg.c: codecs recognized by the program stream demuxer](https://github.com/FFmpeg/FFmpeg/blob/n8.0/libavformat/mpeg.c#L530-L558)
* [MDN: Web video codec guide, MPEG-1 Part 2 Video and MPEG-2 Part 2 Video sections (browser compatibility tables)](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Video%5Fcodecs)

[← MPEG-TS](/glossary/mpeg-ts.md)[MPO File →](/glossary/mpo-file.md)

More in file formats & compression

* [MP2 File](/glossary/mp2-file.md)
* [MPD File](/glossary/mpd-file.md)
* [MPEG-TS](/glossary/mpeg-ts.md)
* [MPO File](/glossary/mpo-file.md)
* [MTS File](/glossary/mts-file.md)
* [Next-Gen Formats](/glossary/next-gen-formats.md)

[All 505 terms](/glossary.md)

## Turn media knowledge into a working pipeline

Connect uploads, processing, AI, storage, and delivery through one declarative API — with the encoding stack, scaling, and format churn handled for you.

[Try Transloadit for free](/c/signup/)
