mp2 processing and automated splitting


I’ve got one ts-file with two audio streams: ac3 5.1 48kHz 448kBit, and mp2 2.0 48kHz 320 kBit.

As result I’d like to have separate tracks in non-ac3 stereo format.

  1. concerning quality, should I take the ac3- or the mp2-stream? I believe, the mp2-stream should be slightly better. Am I right?

  2. I opened the extracted mp2-stream (1 GB) in Audacity, and wondered that it took almost half an hour to open the file. The progress window reported that a mp3-file(!) is being imported. Does that mean the file is being re-encoded? Same when saving the file. I didn’t changed anything, but the saved file is not identical to the extracted mp2-stream. Doesn’t Audacity natively support mp2?

  3. Splitting in separate tracks works perfectly using the labeling function of Audacity, but I wonder if it wouldn’t be possible to automate this process by means of a batch job which gets the cutting times and the tracks’ filenames from an external text file.

Many thanks in advance for any feedback.


MP2 and MP3 are the same family.
MP2 is actually “MPEG-1 layer 2” and MP3 is “MPEG-1 layer 3”. MP3 uses a more complex algorithm to encode the audio data, which generally gives better sound quality for low bit-rates. For high bit rates there is little difference in sound quality and both should sound “transparent” (a 1st generation copy should sound the same as the original).

AC3 is also a compressed audio format, but it uses a different algorithm to MPEG.

One of the drawbacks of compressed formats is that only very basic editing is possible. For Audacity to work with compressed formats, it must decode the file into uncompressed audio data. Audacity is then able to apply effects and processes the audio as well as simple and advanced editing. If you export the edited audio in a compressed format, Audacity will (re-) encode the audio data in the required format (some compressed formats require additional encoders).

Note that encoding to a compressed format such as MP2, MP3 or AC3 ALWAYS reduces the sound quality to some extent. The damage may be very small if high bit-rates are used, but nevertheless the damage is permanent ans irreversible (Never overwrite your original MP2 with the edited version - always make a new file so that you still have the original).

Thanks for your explanation, steve. I want to avoid any quality loss, so I have to take care that no re-encoding will be processed. I wasn’t aware that Audacity isn’t able to directly work on compressed audio files. So I see two options how to get to separate tracks:

  1. I cut the ts-file into pieces each containing one track, and then extract the audio stream from each ts-piece. I could use TS-Doctor for that. Advantage: no re-encoding. Disadvantage: additional work to extract all audio, especially if there are lot of tracks.

  2. I extract the appropriate audio stream, and convert it to flac which can be done by dBpoweramp, then split into separate tracks with Audacity’s labeling function. Advantage: no re-encoding, less manual work than 1. Disadvantage: bigger files (+ 80% in a. m. example).

Still not shure which way to go. 2. would clearly be favourite if the split process could be automated.


I thought that you said that the audio streams were in AC3 and MP2 format.
If that is the case, then for anything more than very basic editing, the audio must be decoded, and whether you decode in Audacity or dBpoweramp makes no difference. Decoding a compressed format does no damage. The damage is done during encoding.

Simple editing, such as splitting a file can be done without decoding / re-encoding if you use a tool that is designed for the job, such as MP3Splt or mp3DirectCut.

  1. concerning quality, should I take the ac3- or the mp2-stream? I believe, the mp2-stream should be slightly better. Am I right?

Does Audacity give you a choice of which stream to open? I thought it just opens the 1st or the default…

Anyway, the stereo mix may have been mixed/produced separately from the 5.1 mix so the 5.1-to-stereo downmix that you make may sound different from the stereo mix. I usually just choose the stereo track when I have a choice, since I’m usually making MP3s or audio CDs, which can’t be 5.1.

  1. I opened the extracted mp2-stream (1 GB) in Audacity, and wondered that it took almost half an hour to open the file.

I’m surprised it’s taking that long, but it does have to read both audio streams and the video in order to sort-out the audio. Audio (and video) editing is time consuming, and that’s just something I accept.

If these are 1GB VOB files (from a DVD) there is another potential issue, especially if these are music tracks. The 1GB split may occur in the middle of a song. I use [u]VOB2MPG[/u] to combine the VOB files into one MPG file (without re-encoding) and it also lets me choose the audio stream(s) to include in the resulting MPEG file.

  1. I extract the appropriate audio stream, and convert it to flac… Disadvantage: bigger files (+ 80% in a. m. example).

What format do you want?

I’ve “ripped” the audio from several video concerts. The are all converted to MP3 and some are burned to CD. If the original was AC3, MP3 is a 2nd lossy-encoding step but if I want to add the songs to my MP3 collection and keep everything standardized I have no choice. (At LAME ‘VO’ they sound fine. They may sound different/worse than the original, but they do sound OK, and since I don’t have a choice I don’t do any A/B or ABX listening tests.


I didn’t mention that I recorded this ts-file from a radio station. Before importing the mp2-stream into Audacity I extracted both audio streams with TS Demuxer.

No preferred format. As both streams are compressed formats, I just looked for a way to split them in separate tracks without encoding. I found a solution: I manually create a cue sheet which contains the split points (indices), and let mp3DirectCut split the mp2-stream: mp3DirectCut CueSheet.cue/split: no encoding, accurate, and fast. Only disadvantage: you have to recalculate the split points from hour/min/sec/millisec to the MM:SS:FF format. Finally, I tag (title, tracknumber etc.) the separate mp2-files, and rename with Mp3tag.


I think we’re talking around each other. Transport Stream is MPEG-2, not MP2. It’s a broadcast or DVD video format. And yes, they do support 5.1 (or fewer) surround AC3 and usually an uncompressed format although that’s less likely in broadcast. We’ve been known to produce a two-channel AC3 track when a full-on, uncompressed stereo track wouldn’t fit.

Managing an MPEG-2 Transport Stream has traditionally been a little magic because anyone who can do that can also rip protected content. MPEG-2 Management is an extra cost module in QuickTime 7, I believe, left off completely in QuickTime X (10).

Yes, you do need to rip the MPEG-2 transport stream into components and then manage the components, but it has nothing to do with MPEG-1.


Sorry to correct you, Koz, but it’s definetely not MPEG-2. Here is what TS-Doctor reports for the two recognized audio streams in the recorded ts-file:

  1. AC3 Audio
    48 kHz
    448 kBit

  2. MPEG1/Layer2 Audio
    48 kHz
    320 kBit

When I extract these streams with TS-Demuxer, I get an ac3-file and a mp2-file. As mentioned above I took the mp2-file (because of better stereo quality as I think), and split it into separate tracks with Mp3DirectCut without encoding.


Not the audio tracks, the TS - Transport Stream is MPEG-2. If you got it from a broadcast, that’s what it is. It’s the holder for the individual audio streams.

Unless there’s a new version or it’s different in different countries. I guess this could be a radio broadcast, too. I have no idea how they work.