MPEG Video
Convert MPG files to MP4, WebM, or GIF directly in your browser — no upload, no server. FileDex uses FFmpeg WASM to transcode MPEG-1 and MPEG-2 video locally, keeping your files completely private.
ملفاتك لا تغادر جهازك
أسئلة شائعة
How do I convert MPG files to MP4 for web playback?
Use FileDex in your browser to transcode MPG to MP4 with H.264 encoding — no upload or installation required. FFmpeg WASM handles the decode of MPEG-1/2 video and re-encodes to H.264 with AAC audio in an MP4 container.
Can I stream-copy an MPG file to MP4 without re-encoding?
No. MPEG-1 and MPEG-2 video codecs are not valid payloads in the MP4 container. The video stream must be transcoded to H.264 or H.265. Audio can sometimes be stream-copied if it is already MP3, but MPEG-1 Layer II (MP2) audio must also be re-encoded.
What is the difference between .mpg and .mpeg file extensions?
They are identical. Both extensions indicate an MPEG Program Stream file containing MPEG-1 or MPEG-2 video. The .mpg extension originated from the 8.3 filename limitation in MS-DOS and early Windows.
Why does my MPG file show interlacing artifacts (combing) on my monitor?
MPEG-2 content from DVDs and broadcast TV is typically interlaced (fields alternating at 50/60 Hz). Modern progressive displays show combing on interlaced content. Apply a deinterlace filter during conversion — FFmpeg's yadif filter handles this automatically.
ما يميز .MPG
MPEG-1 Program Stream defines how audio and video elementary streams merge into a single multiplexed file, and the .mpg extension has carried this format since the standard's publication as ISO/IEC 11172 in 1993. The format was engineered for digital storage media — specifically CD-ROMs — at a time when 1x CD drives delivered just 150 KB/s of sustained throughput. Every design decision reflects that constraint.
اكتشف التفاصيل التقنية
Pack and packet structure
MPEG-1 Program Stream multiplexes audio and video into fixed-size packs of 2048 bytes — this pack size was chosen to match CD-ROM sector size, which is why Video CDs use MPEG-1 at exactly 1.15 Mbit/s video + 224 kbit/s audio. Each pack begins with a pack header: a 32-bit start code (0x000001BA), a 5-byte system clock reference (SCR) used for decoder timing synchronization, and a mux rate field. Inside each pack, one or more PES (Packetized Elementary Stream) packets carry the actual compressed data.
A PES packet header contains a stream ID byte that identifies the content: 0xE0 for video, 0xC0 for audio, 0xBF for private stream 2. The header also carries a presentation timestamp (PTS) and optional decoding timestamp (DTS) as 33-bit values in 90 kHz clock units.
MPEG-1 vs MPEG-2 Program Stream
The .mpg extension covers both MPEG-1 and MPEG-2 Program Streams. Key differences:
| Feature | MPEG-1 PS | MPEG-2 PS |
|---|---|---|
| Standard | ISO 11172 | ISO 13818 |
| Max resolution | 4095x4095 (practical: 352x240) | 1920x1152 (practical: 720x480/576) |
| Interlace support | No | Yes (field/frame pictures) |
| Pack header | 8 bytes, 5-byte SCR | 10 bytes, 6-byte SCR + stuffing |
| Common use | Video CD (VCD) | DVD-Video (VOB files) |
DVD .VOB files are MPEG-2 Program Streams with navigation packs added. Renaming a VOB to .mpg often plays correctly in media players, though menu and chapter data is lost.
Video encoding characteristics
MPEG-1 video uses three frame types: I-frames (intra-coded, self-contained), P-frames (predicted from previous reference), and B-frames (bidirectionally predicted from past and future references). A typical GOP (Group of Pictures) structure is IBBPBBPBBPBBPBB with a length of 15 frames. At 29.97 fps, this places an I-frame every 0.5 seconds, enabling coarse random access.
The Video CD standard (White Book) locks parameters to: 352x240 at 29.97 fps (NTSC) or 352x288 at 25 fps (PAL), 1.1508 Mbit/s constant bitrate video, and 224 kbit/s MPEG-1 Layer II audio. These constraints ensure that playback never exceeds 1x CD-ROM throughput.
Audio options
MPEG-1 audio layers are part of the same standard:
- Layer I: 384 kbit/s max, 32 subbands, low complexity. Rarely used.
- Layer II (MP2): 384 kbit/s max, used in VCD, DVB broadcast, and professional audio.
- Layer III (MP3): 320 kbit/s max, psychoacoustic model improvements, became the dominant music format.
MPEG-2 PS files on DVDs typically use AC-3 (Dolby Digital) at 192–448 kbit/s or LPCM for uncompressed audio, though MPEG-1 Layer II audio is also permitted.
Limitations
MPG files lack chapter markers, subtitle tracks (DVDs store subtitles as separate subpicture streams), and modern codec support. There is no mechanism for H.264, H.265, or AV1 inside a Program Stream. The format is sequential — seeking requires scanning for pack start codes or relying on file-size-based estimation. Streaming performance is poor compared to MPEG-2 Transport Stream, which adds error recovery and clock synchronization features.
Conversion considerations
MPG files from VCDs and DVDs contain MPEG-1 or MPEG-2 video that most modern devices still decode natively. Converting to MP4 with H.264 re-encoding at equivalent visual quality typically shrinks file size by 60–70%. FileDex converts MPG to MP4, MKV, or WebM directly in your browser, re-encoding the legacy MPEG streams into modern codecs for universal playback.
حوّل .MPG إلى...
المرجع التقني
- نوع MIME
video/mpeg- Magic Bytes
00 00 01 B3MPEG sequence header code.- المطوّر
- ISO / Moving Picture Experts Group
- سنة التقديم
- 1993
- معيار مفتوح
- نعم — عرض المواصفات
MPEG sequence header code.
البنية الثنائية
MPG files use the MPEG Program Stream (PS) container, a multiplexed byte stream designed for reliable storage media. The stream begins with a Pack Header starting with the pack start code 00 00 01 BA, followed by a system clock reference (SCR), mux rate, and stuffing length. Each pack contains one or more PES (Packetized Elementary Stream) packets, identified by start code 00 00 01 followed by a stream ID byte (0xE0 for video, 0xC0 for audio). PES packets carry presentation timestamps (PTS) and optional decoding timestamps (DTS) for A/V synchronization. The video elementary stream within PES begins with a Sequence Header (start code 00 00 01 B3) declaring horizontal/vertical size, aspect ratio, frame rate, and bitrate. GOP (Group of Pictures) headers (00 00 01 B8) mark I-frame boundaries for random access. The stream ends with an MPEG Program End code 00 00 01 B9.
| Offset | Length | Field | Example | Description |
|---|---|---|---|---|
0x00 | 4 bytes | Pack start code | 00 00 01 BA | Identifies the start of an MPEG Program Stream pack. |
0x04 | 6 bytes (MPEG-2) or 5 bytes (MPEG-1) | SCR + mux rate | variable | System Clock Reference for synchronization and multiplex rate. MPEG-2 uses 6 bytes (marker bits differ from MPEG-1's 5-byte format). |
variable | 4 bytes | PES start code | 00 00 01 E0 | PES packet header. Stream ID 0xE0 = first video stream, 0xC0 = first audio stream. |
variable | 4 bytes | Sequence header | 00 00 01 B3 | Video sequence header declaring resolution, aspect ratio, frame rate, and bitrate. Appears at stream start and optionally before each GOP. |
variable | 4 bytes | GOP header | 00 00 01 B8 | Group of Pictures header containing timecode and closed_gop flag. Marks I-frame boundaries for seeking. |
end | 4 bytes | Program end code | 00 00 01 B9 | Signals the end of the MPEG Program Stream. Not always present in truncated recordings. |
نقاط الضعف
- Malformed PES headers — crafted stream ID or packet length fields have triggered buffer overflows in older decoders
- Start code injection — embedded 00 00 01 sequences in payload data can confuse stream parsers
- Oversized Sequence Header — declaring extremely large resolution values can cause memory exhaustion during decode buffer allocation
الحماية: FileDex decodes MPG entirely in the browser sandbox using FFmpeg WASM. No server-side processing, no file upload. The WASM runtime enforces memory limits and runs isolated from the host system.