mpegdemux is an MPEG1/MPEG2 system stream demultiplexer. It can be used to list the contents of an MPEG system stream and to extract elementary streams.

mpegdemux has four primary modes of operation:

In this mode the MPEG system stream is scanned for elementary streams. The first packet of each elementary stream is reported.
In this mode the contents of an MPEG system stream are listed in a textual form. This is useful to get an overview of what's in an MPEG file.
In this mode elementary streams are extracted from an MPEG system stream. The system stream packet structure is dissolved in the process. Typically each extracted stream is written to its own file.
This is like demux, except that the MPEG system stream structure is left intact. This means that the output is again an MPEG system stream with all but the selected elementary streams removed.


List the elementary streams in an MPEG system stream:

$ mpegdemux -c src.mpg

List all the packets contained in an MPEG system stream:

$ mpegdemux -l -k -s all -p all src.mpg

Extract the first video stream:

$ mpegdemux -d -s 0xe0 src.mpg dst.m1v

Extract all audio streams:

$ mpegdemux -d -s 0xc0-0xdf -b audio_##.mpa src.mpg

Remove the second video stream:

$ mpegdemux -r -s all/-0xc1 -p all src.mpg dst.mpg


The latest sources can be checked out from git by using the following command:

  git clone git://


File name Date Size Description
MD5SUMS     MD5 checksums of all other files
mpegdemux-0.1.5.tar.gz 2023-09-20 75220 mpegdemux 0.1.5 sources 2023-09-20 39765 mpegdemux 0.1.5 WIN32 binary 2023-09-20 31411 mpegdemux 0.1.5 DOS binary
mpegdemux-0.1.4.tar.gz 2010-07-02 73110 mpegdemux 0.1.4 sources 2010-07-02 14991 mpegdemux 0.1.4 windows binary 2010-07-02 31533 mpegdemux 0.1.4 DOS binary
mpegdemux-0.1.3.tar.gz 2009-02-15 60973 mpegdemux 0.1.3 sources 2009-02-15 29016 mpegdemux 0.1.3 windows binary 2009-02-15 30870 mpegdemux 0.1.3 DOS binary

Comments to: Last modified: 2023-09-20