Elemental Streams

Video:  mpv  m2v
Audio: 
mpa   mp2   mp3   m2a   mp2 

*** for conversion methods, scroll down to bottom of page ***

*** if you run across a file extension that you do not know, see http://filext.com/

There are so many MPEG file types, particularly with the various elemental stream files.  For example, if you go to export a file in Adobe Premiere using the included MPEG Encoder by Main Concept, the dialog box give you the following options for the the MPEG filename extension:

MPG   MPEG   M1P   M2P   VOB   M1V   M2V   MP1   MP2   MPA   ABS

Here we will ignore the rare extensions such as M1P, M2P, M1V, M2V, MP1, MP2, and ABS.

Instead we will discuss the more common file types.

Video

mpv    mpeg-1 video - DVD Lab demuxes files into elemental streams mpv (video) and mpa (audio)

m1v    mpeg-1 video (TMPGenc Plus - when you select ES(Video only) for output and use MPEG-1 as input, you will get an m1v file)

m2v    mpeg-2 video  - created by TmpgEnc main window encoder

 

Audio

mp2    mpeg audio layer 2

m2a    mpeg layer 2 Audio

mpa    mpeg audio

NOTE:  for mpa files, the audio layer is not specified, so some sources say it can be audio layer 1,2, or 3  -  however, in all cases I have seen it is layer 2 audio).

mp3    mpeg-1, audio layer 3

 

Renaming Elemental Stream Files

the MPEG Video Files:

the Mpeg audio layer 2 Audio Files

Surprisingly, these files are all the same.  If you don't believe it, try rename one file type to the other two, and play all three in WMplayer - you should have no problems doing that.  Here are some audio elemental test files if you need them - each file plays the same sound (a short whizzing sound):

Click to Download:  Elemental Audio test files
(aac, ac3, au, m2a, mp2, mp3, mp4, mpa, ra, rm, wav, wma, m4a)

In fact, some apps, such as the TyTools for TIVO - even let you pick what you want the exported elemental streams to be "named" (see http://www.dealdatabase.com/forum/archive/index.php/t-19708.html )

Different software vendors began using different extensions for their elemental streams.  Since at that time - they thought no one else would be using their elemental streams, and in some cases they wanted to put their own stamp on the file type - they did not always use the same extension.  There were actually numerous extensions, but the ones that stuck, were those used by the most popular companies (Adobe's "mpa", TMPGenc's "mp2", Apple's "m2a"

DVD and MPEG utilities work with either program streams (same as "system" streams) or elemental streams. 

A System Stream is actually two elemental streams interleaved together.  For example, an mpg file has a video stream and an audio stream.

Although all clips that have both video and audio make use of combined video and audio data  .  .  .  when we talk about elemental and system streams  .  .  .  we are talking MPEG.  The MPEG standards is where all this comes from.  AVI files have both video and audio streams, as evidenced in Adobe Premiere (when you drag a clip to the timeline it is broken into two segments . . . video and audio.  However, you rarely work with separate video and audio files to create AVI's. 

DVD's use elemental streams.  If you have a DVD Authoring program that accepts MPEG-2 as a system stream (many do NOT), then you can be sure that in the background it is breaking the mpg up into two elemental streams.

System Stream <-----> Elemental Streams

    "Conversion"

To convert from system to elemental streams - you de-multiplex the single file containing the single system stream (video and audio streams that are interlaced together into a single stream) into two separate streams in two files (one video and one audio).

To convert elemental streams to a system stream - you multiplex two elemental streams together to form one stream of interlaced video and audio data.

The Elemental Stream File Types

Common Video Elemental Stream files - mpv (MPEG-1 Video) or m2v (MPEG-2 Video)

Common Audio Elemental Stream files - AC3, mp2, mpa, wav, and LPCM (pcm or raw)

NOTE:  surprisingly, the most popular audio file . . . MP3's . . . are not used by most DVD Authoring packages 

MP2 (MPEG-1 audio Layer 2)    vs    MPA (MPEG Audio - Layer I, II, or III) 

These are very similar files.  But are different formats, and utilities always seem to support one or the other - not both.  DVD Lab will import either and can use either as the audio stream for any movie on the DVD.  

NOTE:  quite a few utilities will actually allow you to change the extension mp2 to mpa and will work fine that way !!  In general there should be no need to do this - but I include it here because it has been mentioned so many times in other discussions.

MP2 (MPEG-1 Layer 2 Audio)     vs     MP3 (MPEG-1 Layer 3 Audio)

MP2 is usually 196 or 224 kbps at 48 kHz sampling.  MP3 is usually 128 to 256 kbps at 44.1 kHz sampling.  MP3 has better compression and allows for "joint stereo".

Viewers

Windows Media Player

Windows Media Player, available from Microsoft is required to view the following video formats:

  • Windows Media audio and video files .asf, .asx, .wax, .wm, .wma, .wmd, .wmp, .wmv, .wmx, .wpl, and .wvx
  • Windows audio and video files .avi and .wav
  • Moving Picture Experts Group (MPEG) .mpeg, .mpg, .m1v, .mp2, .mpa, .mpe, .mp2v*, and .mpv2
  • Macromedia Flash .swf

Quicktime Player

QuickTime supports the following video formats:

  • QuickTime Movies .mov, .qt
  • SMIL 1.0 .smi, .sml, .smil
  • Video for Windows .avi, .vfw
  • MPEG media .mpeg, .mpg, .m1s, .m1v, .m1a, .m75, .m15, .mp2, .mpm, .mpv, .mpa
  • MPEG-4 .mp4, .mpg4
  • Video (protected) .m4v
  • PICT .pict, .pic, .pct
  • Flash swf

*** Real Player also supports a lot of these formats

 

How to Create Elemental Stream Files

(by converting existing audio clips into elemental streams)

There are many conversion utilities - so use whatever works for you.  Here I have listed the utilities that I use, personally, and can vouch for:

AC3, MP2, WAV - use IMtoo, which has resets profiles for each of these formats.  In addition, you can edit the paraeters of the profile, and save it to a new name.  You can also use IMtoo to open these files and convert them to other formats.

MPA - creating MPA files is not easy because very few utilities support conversion to mpa.  The only utility I am aware of is DVD Lab.  You can create mpa files with DVD Lab in one of two ways:

in the Video and Audio Library on the bottom, right-click, select "Import . . . ", select an mpg file, and then DVD Lab Pro will demux it on the fly . . . creating both an mpv video file and an mpa audio file.  The two new files will be stored in the same folder along with the original mpg file

in DVD Lab Pro, select Tolls/Transcode Audio  .  .  .

a box will pop up with several options.  To create an mpa file, you must have you original audio

You can use Adobe Premiere to import mpa but not export to mpa (the Main Concept MPEG encoder can only create system streams, "mpg" only). Even the old workhorse, TMPGenc Plus, cannot save to mpa format.  It does have a built-in utility called "MPEG Tools" that can mux an mpa together with a video stream into an mpg system stream . . . but it cannot create mpa files.

But don't worry - you will probably never need to create an mpa file.  And if you do need one (for a DVD Lab project, for example) the utilities that require mpa files come with their own demux routines or a transcode routine to create the mpa file for you.

MP2 - use IMtoo or TMPGenc.  Both utilities can open mp2 files and they can export to mp2.

Peer-2-Peer Movies on VCD - creating DVD's from them

These are very popular - you can get just about anything using "Bit Torrents".  However, the files are notorious for audio lag due to GOP and PTS errors.  This is easily fixed:.  The easiest way to create a DVD from a Per-2-Peer MPEG-1 movie file is:

  1. run Womble's Tool, "GOP Fixer" and use the bottom selection that fixes everything (if you do not have Womble then use another GOP and PTS fixer utility)
  2. use TMPGenc DVD Author, import the MPEG-1, and select "No Menu"
  3. create and burn the DVD (takes a long time)  -  DONE !!

OR

  1. run Womble's Tool, "GOP Fixer" and use the bottom selection that fixes everything (if you do not have Womble then use another GOP and PTS fixer utility)
  2. import the mpg into DVD Lab - it will demux the video to an "mpv" file - you can either:
  3. throw away the demuxed audio mpa file because it will be 44.1 kHz (DVD Lab will ask you if you want to transcode it to 48 kHz mp2 file), and instead extract and convert the 44.1 audio stream from the mpg file to a 48 kHz, 224 kbps MP2 file using TMPGenc.  Make sure to goto Options/Environmental Settings and set it toHigh Speed (not the default, which is High quality).  You can use faster utilities to get a wav file extracted and converted bu DVD Lab is VERY slow at muxing a wav file with it's mpv video stream
  4. import the mp2 into DVD Lab
  5. drag the mpv and mp2 files into the "movie", and then draw a connaction line from "First Play" to the movie
  6. compile the project - DONE !!

Conversions

*** for mp2, mpa, m2a audio files you should be able to simply rename the extension to convert.  However, if you are not 100% sure or do not trust that method, or if you are getting errors after renaming the files - then here are the methods for actual conversion using software

*** Premiere will open audio elemental files (mpa) but not video elemental files.  So, to get video into Premiere you must first convert it to a system stream (avi, mpg, or wmv).

44.1 kHz to 48 kHz Sampling rate conversion

Problem with HUGE Audio Files > 2 GB

NOTE: 
audio files for DVD's are usually huge - especially WAV files.  Applications and even players have trouble with wav files that exceed 2000 MB in size - for example, if you try to play a 3-hour wav file using WMplayer, that you are intending to use for the audio of a DVD, and it is 2,200,000 bytes (2 MB) .  .  .  WMplayer will give you an error that

"the buffer is not big enough"  - the fix is at http://support.microsoft.com/kb/889136  (DL the DirectX 9 and install - requires WinXP SP2)

 

 

Uncompressed PCM wav file bit-rates are fixed !!! Codecs such as pcm_16le, pcm_alaw and pcm_mulaw are uncompressed codecs - they use pulse code modulation which does encode the audio but does not compress it.  This is unlike sliding-scale compression codecs such as MP2 and MP3.

44.1 kHz sampled Stereo uncompressed (MS PCM or Windows PCM) WAV files are always 1411 kbps
48    kHz sampled Stereo uncompressed (MS PCM or Windows PCM) WAV files are always 1536 kbps

Standard Windows PCM Codec:  IMtoo calls standard the MS Windows PCM codec "pcm_s16le".  It is a 16-bit pulse code modulation method (samples the audio, holds the samples, and quantizes them into 16-bit values).  Music can be carried in a 48000 kHz band (actually the ears can only hear frequencies of about 15 to 20 kHz max, so this is overkill - which is why sample rates of 22 kHz or even 16 kHz are fine).  Nyqist theorem states that you must sample at twice the highest frequency, which is 96000 samples per sec, encoded into 8-bits which is a "word" of 256 possible states).  16 bits x 96000 samples/sec = 1536 kbps

8-bit uLaw and Alaw Codecs:  audio utilities usually also have the public telephone system codecs.  The U.S. uses ulaw (pronounced "mulaw") and Europe uses Alaw.  Both are 8-bit PCM codecs and the data rate is 64 kbps (voice can be carried in a 4000 kHz band.  Nyqist theorem states that you must sample at twice the highest frequency, which is 8000 samples per sec, encoded into 8-bits which is a "word" of 256 possible states).  8 bits x 8000 samples/sec = 64 kbps

NOTE: WMplaye will not be able to play ulaw or Alaw wav files unless you load a special codec

ADPCM Codecs - these are 4-bit highly compressed PCM codecs.  DO NOT USE IMtoo, as it's codec is not recognized by WMplayer (Cool Edit's ADPCM codec is).  If you use a wav codec with compression such as ADPCM-MS or ADPCM-IMA, then obviously there is compression - but that rate of compression is also fixed for a specific file.  If the sound is very simple (such as a tone) then the file size will be smaller.  However, there still is no way to specify a bit-rate !!! 

IMtoo allows you to specify a bit-rate for WAV files - but it will not work if the WAV file is uncompressed PCM.

When creating a DVD from VCD MPEG-1 files, the standard sampling is 44.1 kHz.  However, DVD's require 48 kHz (and DVD-Lab insists on 48 kHz).  You can create an elemental stream as a WAV or MP2:

M2V elemental stream to "video only" system streams AVI, WMV, MPG 

m2V can be imported into DVD Lab or TMPGenc Express.  Premiere tries to import m2V files (it see them, so apparently it supports that format) but oddly, it always fails with the following unsupported audio data rate error (an audio error for a video file !!!):

        Solution - Import the m2v into TMPGenc Express, and export it to AVI, WMV, or MPG.

MPV elemental stream to "video only" system streams AVI, WMV, MPG  -  first rename the mpv to an mp2 file extension.  Then follow to conversion method for m2v files listed above

AVI, MPG, or WMV to M2V  -  import into TMPGenc Express, select the MPEG encoding method, and click the circle next to "Video only" - it will then encode to an m2V file !!!

AVI, MPG, or WMV to MPV - first encode to M2V using the method above, then rename the M2V to MPV

M2V to MPV   and   MPV to M2V  -  I do not know of any program that can import and export both types - but for these file types, simply rename the files !!!   They are the same format with two different extensions !!!

MPG to MPA  -  use DVD Lab to import mpg and it will demux the file into mpv and mpa elemental streams

MPA to MP2

Method 1)  or in DVD Lab Pro, goto Tools/Transcode Audio . . .

  1. click "Input" and select the MPA file
  2. click "Output" and select the folder, and then type in the name with the mp2 extension (otherwise DVD Lab will default to mpa)
  3. click Transcode

NOTE:  the file will be 192 kbps, and unfortunately you cannot change that setting

Method 2) open the mpa in Premiere, export to wav, open wav in IMtoo, and export to mp2

Method 3) use dBpowerAMP Music Converter (free from http://www.dbpoweramp.com )  and the MP2 codec ( also free from http://www.dbpoweramp.com/codec-central.htm )

MP2 to MPA

  1. in DVD Lab, goto Tools/Transcode Audio . . . . click Input and select the MP2
  2. click "Transcode" and the converted file (MPA) will be created in the same folder

MP2 to WAV

open MP2 in IMtoo, export to wav   OR 

LPCM (PCM or RAW) to WAV - unlike many other DVD authoring utilities, DVD Lab will not accept LPCM (*.pcm  or  *.raw).  Go to the LPCM conversion tool (Tools / LPCM>wav), open the pcm/raw file and transcode it to wav   OR  just use the main DVD Lab Tools/Transcode to convert LPCM--->WAV.

*** you can also use DVD Lab to transcode WAV --> LPCM