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.

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.

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.

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.

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.

Explore Transloadit’s file formats & compression capabilities

Sources

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