View Full Version : Splitting stereo MP2 into two mono streams
Mr Sweden
15th February 2003, 17:40
I read all releated FAQs and search the forum without finding an answer so I hope the mod will through me out :sly:
I have a VCD i bought in Singapore (ChungKing Express) which have Mandarin audio on the left channel and Cantonese on the right. I like to demux just one of the channels, can I do that? On my computer I can turn down the audio on one channel and that's ok but on my tv using I can't do that and must hear two voices all the time. Hope somebody can give me help on this.
Peace
S_O
15th February 2003, 17:57
Yes, I need that kind of tool, too. Is it possible to remove one channel in a mp2 file without reencoding? Iīve got an VCD where sound is only on the left channel and the right is silent, I like to remove the right. The only problem I see is: On VCD audio bitrate need to be 224kbps and 224kbps mono mp2 is not allowed.
Is it possible to create a joint-stereo mp2 with 100% IS-frames, so all bands are identicall on both channels, it would be like mono, just it is also allowed at 224kbps. This would also allow the option to create mono-vcds. I recorded a mono tv-documentation on PC, I encoded the mono-wave with toolame at 224kbps to mp2. But wmp couldnīt play it. winamp played it perfectly also with great quality (I couldnīt hear a difference to original), then I read about the mono-bitrate limit, made a stereo-wave (both channels 100% identicall) and encoded again with toolame with joint-stereo enabled. I could hear artifacts very clearly. I encoded again with stereo, also many artifacts. I would need
a) a tool allowing to remove one channel from the mp2 without reencoding.
b) a tool allowing to encode mono-wav as joint-stereo mp2s with both channels identicall (100% IS) to get around the bitrate limit.
Is it posible to create such mp2s?
DJ Bobo
15th February 2003, 19:20
@ Mr Sweden
Seems like it was encoded the wrong way in stereo instead of dual channel. Because if it is dual channel encoded, you can switch between right and left in your DVD player.
Anyway, the method I know of:
1) demux normally using TMPG
2) decode to WAV, using winamp for example.
3) Using wavelab for example, select the channel you wanna have, then copy it to a new window while transforming in stereo. Save that.
4) Encode to 224kbps stereo mp2, with TMPG for example (there is no reason why there should be any noticeable artifacting, the bitrate is high enough)
Mr Sweden
16th February 2003, 13:52
Thanks for the reply, I will try it rigth away.
dani82
17th February 2003, 09:54
this might be stupid, my friend renting alot of chinese vcds, and they're all mandarian\cantonese languages; so he pushes the audio button on his dvd remote to switch between languages.
have you tried that?
Mr Sweden
19th February 2003, 09:42
Hm... My dvd remote doesn't have such a button, but then I bought a cheap German player :p Anyway, I have a nice Mandarin version of CKE now, thanks for the advice. :)
DSPguru
16th August 2003, 00:36
you can now demux a dual channel mp2 file into two seperate mono mp2 files using BeSplit v0.9b5 (http://besplit.doom9.org).
note : this is a loseless process,eg, there will be no quality loss.
S_O
16th August 2003, 02:08
Wow! I thought you are in vacation. OK, but you already had a mp2 parser, so it wasnīt that difficult.
I coded a bitreader/bitwriter class and had no idea how mp2 works!
But I also got my tool basically working: Can extract one channel from dual-channel, stereo and joint-stereo files!
It outputs a mono file at the same bitrate, so it only works if both bitrate/channel have the same allocation table.
This works on bitrates like 192kbps, but not on 224kbps (because 224kbps mono is not allowed). At 32/44,1 kHz only 192kbps is supported, at 48kHz 128-192kbps is supported.
At mpeg-2 all bitrates should be supported.
Im going to improve my tool:
-Support vbr output finished
-Support cbr output at lowest possible bitrate (2-pass)
-Support fake-stereo output (for 224kbps "mono" output) finished
-Reallocation: table B is 100% compatible to A for example, so it is possible to output B, also A is input. This should add support for other bitrates. finished
Download beta 0.13 here with sourcecode (45KB): mp2chext_013.zip (http://l.b.oltmanns.bei.t-online.de/mp2chext_013.zip)
Edit: Of course my tool is lossless!
Edit2: It might happen that my tool outputs errors, because of illegal scalefactor 63. This is not bug in my program, your file is not ok, unfortunately toolame directly outputs that corrupt files. mp2chext will copy this invalid scalefactors anyway and go on.
Edit 5: Updated to 0.13
kasnel
10th October 2003, 08:54
how to split 2 channel audio stream and do another 2ch audio stream
from one stream?I hope you understand!Some simple ways.
Thaks
echooff
12th October 2003, 16:34
Cool Edit
S_O
12th October 2003, 17:14
how to split 2 channel audio stream and do another 2ch audio stream
You can split it with programs like CoolEdit, but that conversation isnīt lossless.
Download my prog and run it with this comamndline:
mp2chext your_stereo_file.mp2 output_mono_file_L.mp2 L M
that will extract the first (left) channel. To extract the right channel:
mp2chext your_stereo_file.mp2 output_mono_file_R.mp2 R M
"M" means the output file is mono, if you set "J" the output is joint-stereo (100% Intensity), this is needed for bitrates >192kbps (224 kbps mono is not allowed)
daphy
17th October 2003, 08:33
@ S_O
I have some questions on this application, please answer: :(
1. is it possible to split wav files with this program?
1a. if so, is it possible to split a 6 channel wav file in 16/24/32 Bit - 44.1/48/88.2/96KHz?
1b. if so, is it possible to split those files in sizes beyond the 2GB barrier?
2. What setting/parameters are possible with this program (need this for programming a GUI)
Remember my personal message! ;)
CYA Daphy
chpyeung
20th November 2003, 04:50
I have a TV program captured with my Nicam TV card with 2 different languages. (in MPEG2 mpg file). The video is DVD-compliant and the audio is in MP2 with Enlish on the L channel and Chinese on the R channel. I want to transfer it on DVD so that I can watch on TV.
What program should I use to separate the stereo MP2 file into 2 mono MP2 files so that I can load it as separate channels on DVD?
And the steps/setting please?
KpeX
20th November 2003, 04:54
You could decode to .wav and split it with BeSplit, then author to DVD. You will loose quality in the transcoding process however.
artvandalay
6th January 2004, 23:05
hi,
I've got this mp2 file wich has a german left channel and an english right channel.
I tried to demux it with besplit v09b6, but it didnt work out like it should be.
so maybe one of you can help me with that.
here's the log from besplit:
BeSplit v0.9b6 by DSPguru.
--------------------------
Logging start : 01/02/04 , 19:16:36.
besplit -core( -input f:\bluesbrothers.mp2 -prefix outfile -logfile f:\besplit.txt -type mp2 -demux)
[00:00:00:000] +------- BeSplit -----
[00:00:00:000] | Input : f:\bluesbrothers.mp2
[00:00:00:000] | Source Sample-Rate: 48.0KHz
[00:00:00:000] | Channels Count: 2, Bitrate: 192kbps
[00:00:00:000] | Output Prefix : outfile
[00:00:00:000] +---------------------
[02:02:25:008] | Writing outfile01.mp2
[02:02:25:008] +---------------------
[02:02:25:008] Operation Completed !
[00:00:20:000] <-- Process Duration
Logging ends : 01/02/04 , 19:16:56.
DSPguru said, after demuxing there should be two files. but there is just this one the log shows.
DSPguru posted the above commandline in some other forum.
after demuxing the file was just the same as before.
what am I doing wrong?
cu
art
DSPguru
6th January 2004, 23:07
you should add a space between "-demux" and ")".. ;)
artvandalay
7th January 2004, 20:48
thanks!
what a superfast reply (~2mins)!!
after adding the space the program worked like a charm!
keep up the good work,
cu
art :)
artvandalay
11th January 2004, 21:45
hi,
I demuxed a 2nd audiofile with besplit and it seems like I've got an error within the file after doing that.
I clicked into the file randdomly and recognizend an error. everytime they say an word with "m", this "gruntling" sounds appears.
it just appears in some scenes.
then I listend to the original file, and found out that it's not to be heard there.
could there be an error in the original file, which is increased after demuxing? ..or is this maybe a bug or an error affected by besplit?
I split this one scene, so you could listen to it.
But I cant find "browse" button to attatch something? am I blind, or aint there such a thing? so if anyone want to hear it, send me an email or pm. I will send it to you then (its about 72kb)
I also wanted to split the same scene from the original, but it wont do. cant I split dualchannel files?
cu
art
S_O
11th January 2004, 22:39
Nothing against Besplit, but you could try my program:
mp2chext_013.zip (http://l.b.oltmanns.bei.t-online.de/mp2chext_013.zip)
Since both programs are completly independant if you get the error here too, itīs a error in your file.
Usage is very simple:
mp2chext your_stereo_file.mp2 output_mono_file_L.mp2 L M
This will extract first channel to a mono file.
I also wanted to split the same scene from the original, but it wont do. cant I split dualchannel files?At least my program can split from all mp2-sources with 2 channles (Dual Channel, Stereo and Joint-Stereo)
artvandalay
12th January 2004, 14:33
I tried to demux with your programm aswell.
the reason because I didnt use the splitted file from mp2chext, was because I had to reencode it as stereo, 192 kpbs and 48kz. otherwise reelDVD wouldnt accept it.
when I reencoded it with besplit I got tons of errors and the file was only about a third in length.
so I demuxed with besplit.
..but I can try to demux with yours again, and check if there is the error aswell.
I'll let you know...
cu
art
artvandalay
12th January 2004, 23:31
I demuxed the file with mp2chext again, and now I havent got the error.
so I tried to reencode it with besplit again.
and it WORKED!! I got no error with besplit. I really dont know why it worked this time, I used the same sourcefile... :confused:
I also demuxed the sourcefile with besplit again. it still has got this "gruntling" sound.
cu
art
alky
23rd January 2004, 11:19
i made a recording with a pvr250 and prepared it for encodign with dvd2avi (so i got that mp2 stream demuxed with dvd2avi)
and i get that windows xp crash report thingie right after starting:
AppName: besplit.exe
AppVer: 0.0.0.0
ModName: besplit.exe
ModVer: 0.0.0.0
Offset: 00001a45
my commandline was
besplit -core( -input c:\temp\dualfile.mpa -prefix outfile -logfile c:\besplit.txt -type mp2 -demux )
the logfile was created but empty
also tried mp2chext, which works but creates lots of stream errors (according to besweet when encoding to ogg), for example:
[...]
[00:15:43:488] Stream error : Sync found after 1 bytes
[00:15:44:016] Stream error : Sync found after 1 bytes
[00:15:53:808] Stream error : Sync found after 1 bytes
[00:15:54:960] Stream error : Sync found after 1 bytes
[00:16:01:296] Stream error : Sync found after 1 bytes
[...]
S_O
23rd January 2004, 11:48
also tried mp2chext, which works but creates lots of stream errors (according to besweet when encoding to ogg), for example:
mp2chext only works with non-corrupted mp2 as input, normally it should stop converting when a stream error is found. Could please check input and output file with madplay: http://rarewares.hydrogenaudio.org/files/MADbundle.zip
Simply run "madplay file.mp2"
If the file is ok madplay should play the file and do not report any errors.
If the source is ok and mp2chextīs output not, could you please post your options and upload a part of the file or mail it to me?
kassandro
25th January 2004, 20:48
As you are from Germany as well, you may know the problems with our digital satellite providers which switch frequently from mono to stereo and vice versa. Could you alter your mp2chext utility such it can convert such a mixed mp2 file into mono mp2 file? Currently it simply terminates if the input stream switches to mono.
S_O
26th January 2004, 14:48
As you are from Germany as well, you may know the problems with our digital satellite providers which switch frequently from mono to stereo and vice versa. Could you alter your mp2chext utility such it can convert such a mixed mp2 file into mono mp2 file? Currently it simply terminates if the input stream switches to mono.
I donīt have DVB so I donīt know the problem, but of course Iīll add support for those "mixed streams":
-Upmix mono to stereo
-Remove one channel if stereo
Expect a new release in a few days, it should not be much work, but Iīm quite busy at the moment.
kassandro
26th January 2004, 21:18
Originally posted by S_O
I donīt have DVB so I donīt know the problem, but of course Iīll add support for those "mixed streams":
-Upmix mono to stereo
-Remove one channel if stereo
Expect a new release in a few days, it should not be much work, but Iīm quite busy at the moment.
Thank you in advance. "Remove one channel if stereo and leave the stream unchanged if it is mono" is exactly what we need (see the discussion in the pvastrumento forum at www.offeryn.de). Surprisingly nearly all encoders can downmix from stereo to mono, but stop working if the stream suddenly changes to mono. Lame and Oggenc are such examples and the windows media 9 encoder is so far the only one, which can handle such streams.
Sakuya
25th June 2004, 02:08
I have a karaoke VCD where one channel is music with vocals while the second channel is music only for karaoke purposes. I was wondering if BeSplit would work in this case? But then I want both tracks separately in stereo, not mono so I can switch between the two have both at stereo on a DVD. :( How will BeSplit work with that? I also have BeSweet to convert it to stereo. I just need to get the splitting part done. Please help!
Daijoubu
25th September 2004, 19:51
Tried to use BeSweet 0.96b and the produced output was unplayable (tried with 3x MP2 224kpbs Dual-Mono)
mp2chext in the other hand creat 128kpbs mono files and they played too fast :confused:
S_O
25th September 2004, 20:49
mp2chext in the other hand creat 128kpbs mono files and they played too fastCould you post the used command-line and a part of the file (~200KB should be enough).
I must admit, I havenīt worked on it yet, but hopefully Iīll find some time and fix this.
Daijoubu
25th September 2004, 22:14
How should I cut it? Stop the convertion earlier or cut it with mp3DirectCut?
S_O
25th September 2004, 22:31
How should I cut it? Stop the convertion earlier or cut it with mp3DirectCut? mp3directcut will probably do the job, alternativly you can open the file in a hex-editor, go to offset 0x32000 and cut the file there.
I want to have the source file, not the output one!
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.