View Full Version : 6.1 DTS > multichannel MP2
beergod
12th February 2002, 00:31
DSPGuru, I tried using the philips MPEG encoder, and it seems the AIFF header is wonrg. Can you tell me how to get a 5.1 ch pcm output file by truncating the aiff header ???
Or are there option for making 5.1 ch wav ?
DSPguru
12th February 2002, 13:53
"-6ch" will create 6 mono wavs.
than you need to use "audio2raw.exe" to remove wav headers, then "raw2audio.exe" to mux the 6 channels into one aiff, and "pub_enc.exe".
if you're using the other encoder, you won't be needing all that.
beergod
12th February 2002, 14:47
DSPguru, so why is the aiff file different from what philip's pub_enc accept ? Can you point me out a site that tells all about aiff files ?
DSPguru
12th February 2002, 14:48
Originally posted by beergod
DSPGuru, I tried using the philips MPEG encoder, and it seems the AIFF header is wonrg. looks like a little endian/big endian difference.
will fix it...
Originally posted by beergod
DSPguru, so why is the aiff file different from what philip's pub_enc accept ? Can you point me out a site that tells all about aiff files ? sorry, all i know about aiff based on reverse engineering.
anyway, i'll soon make the -6chaiff phillips-compatible.
beergod
12th February 2002, 14:53
Thank DSPguru, the philips encoder runs a lot faster than the encoder you recommend.
DSPguru
12th February 2002, 14:55
hi god :)
Originally posted by beergod
Thank DSPguru, the philips encoder runs a lot faster than the encoder you recommend. that's because you still haven't found the time to enhance it ;)
DSPguru
12th February 2002, 17:15
it seems i have originally implemented the APPLE aiff header :D.
anyway, v1.2b3 is now up (on my site), and "-6chaiff" will create PC aiff header.
poor phillips, they only support one AIFF format...
btw,
i wrote a nice little-to-big (endian) routine in assembly, so i believe "-6chaiff" won't take longer than "-6ch".
Dg.
beergod
12th February 2002, 18:59
DSPguru, I still cannot find BeSweet 1.2b3. Could you give us the link ?
DSPguru
12th February 2002, 19:11
http://dspguru.notrace.dk/BeSweetv1.2b3.zip
beergod
12th February 2002, 23:58
DSPguru, I have tried 1.2b3, The AIFF header is correct, but I think you need to do a byte reversal for the audio data.
DSPguru
13th February 2002, 05:50
but i i did...
beergod
13th February 2002, 09:38
Maybe you should undo the byte reversal then.
When I load the aiff file into CoolEidt Pro, it looks like random noise. So, did output of encode-decode process. I shall try to cut small section and perform audio byte reversal.
I also did another experiment with using your older version 1.2b2
I made a 6ch AIFF file, cut the first 54 bytes off, and then use raw2audio to make an aiff, and it encodes and sounds OK.
Cokes
13th February 2002, 13:50
Originally posted by DSPguru
it seems i have originally implemented the APPLE aiff header :D.
anyway, v1.2b3 is now up (on my site), and "-6chaiff" will create PC aiff header.
poor phillips, they only support one AIFF format...
btw,
i wrote a nice little-to-big (endian) routine in assembly, so i believe "-6chaiff" won't take longer than "-6ch".
Dg.
Hmm... maybe libsndfile library project could help you: http://www.zip.com.au/~erikd/libsndfile/
DSPguru
13th February 2002, 23:49
-6chaiff : little endian
-6chbiff : big endian
10x Cokes, i might check it out.
beergod
14th February 2002, 09:57
DSPguru, I will try it out. Thanks. I am going to compare the quality of encoder.exe (which you recommend) and the phillips' pub_enc.exe
I managed to use DVD2SVCD to make a multichannel SVCD by changing BeSweet section to run a bat file. Once I have successfully make a complete movie, I will tell you all how to do it.
beergod
14th February 2002, 20:46
DSPGuru,
1.2b5 does not work :-( Both -6chaiff and -6chbiff creates massive noise. Has anyone tried it yet ? 1.2b3 is still the best except that you have to change the 54 bytes header.
DSPguru
15th February 2002, 08:58
i myself tried and succeded to encode with the big-endian method.
commandline :
pub_enc.exe -l 2 -m s -n d -r 44.1 -b 384 -L -p 3 -e -v 0 filename.aif final
(and 10x to eclipsedvd for the commandline)
beergod
15th February 2002, 11:20
DSPGuru, did you listen to what you have encoded ? or even listen to the aif file ? I succeeded encoding with too, but it loud noise was the only thing I hear.
DSPguru
15th February 2002, 11:26
i did listen to it, and the result was fine.
i will do so more tests...
beergod
15th February 2002, 12:30
DSPGuru,
Could you give me more details on the commandline that you used on BeSweet ? (decoding ac3 --> 6ch aiff)
Sheriff
15th February 2002, 15:10
I used this for ac3 - aiff convert
BeSweet.exe -core( -input "d:\VIDEO_TS\DVD_VIDEO\vts_01_([0x80]_Audio_English_AC3(6Ch)_48kHz___)_Delay_0ms.ac3" -output "d:\VIDEO_TS\DVD_VIDEO\chanell.aiff" -6chaiff ) -ota( -d 0 ) -azid( -z1 -b1 -g max -L -3db -F pcm ) -ssrc( --rate 44100 )
Is it good ?
The result is an aiff, which is 3GB :-)
beergod
15th February 2002, 16:02
Sheriff, what version of BeSweet are you using ?
Sheriff
15th February 2002, 18:48
BeSweet v1.2b5
Why is it important ?
DSPguru
15th February 2002, 19:03
weird thing :
the assembly code (little to big) works only in design time. in run-time -6chaiff & -6chbiff produces the same output :rolleyes:
Sheriff
15th February 2002, 19:10
DSPGuru!
Is it possible to make (in future BeSweet) to convert AC3 direct to Multi Channel MPEG 2 ?
It'd be quite nice :-)
DSPguru
15th February 2002, 19:18
the assmebly code now runs in run-time.
-6chaiff - big endian (correct method)
-6chliff - little.
@Sherrif
in the future - yes.
Sheriff
21st February 2002, 15:51
The future has passed :p
Any news in connection with ac3 to mcmpeg DSPguru ?
:D
eclipsedvd
22nd February 2002, 09:15
with beta6, the ac3>aif process is fine. Then, we use the mc encoder and it produce compliant file.
beergod> which parameters do you use with the encoder ?
i use the matrix2 if i want to have rear surround (prologic).
if i use the matrix1, the rear channels are on the front channels ?
only in prologic mode.
have you noticed that ?
beergod
22nd February 2002, 10:20
Hi,
I have been playing with the pub_enc encoding materials with different settings to find out the quality of the encoding. The usual encoding parameters -m s -n d -e -L does not produce good enough quality multichannel mpg @ 384kbps.
I tried using matrix 3, and it sounds very echoey ... I haven't tried mtx1 or mtx2. Do any of you know what it does ?
This process is very tedious .. so hang on. I shall post the results when I get some.
beergod
25th February 2002, 14:19
Hi, the more I play with the phillips encoder, the more confuse I am, and I cannot manage to make a "GOOD" quality 5.1 channel MPEG MC stream @ 384kbps no matter how you change the encoding parameters.
Anyone has done any experiments of making a stream > 384kbps ?
pub_enc usually splits tham into MPEG1 and EXT streams. Anyone knows how to mux them together ?
I also find that if you take 1 ch away (0.1 ch gets mixed into LR), the MC quality is much better, with less phychoacoustic defects.
I shall onctinue to try harder.
eclipsedvd
25th February 2002, 15:49
have you noticed, beergod, the same problem as me concerning the playback of 5.1 Mpeg file on prologic system ?
no sound on rear speakers.
the only way, i have found is to use the matrix2.
I will look at the document that explains the parameters to have full compliant mpeg mc file.
beergod
25th February 2002, 15:51
eclipsedvd,
Well No. But I believe what you said. However, I found that when encoding @ 384kbps using anthing other mtx 0, give very phasy results (especially mtx 3). mtx is marginally acceptable, but mtx 2 no good when decoding into 5.1. Leakage is very high ! Perhaps using higher bitrate is the answer ?
Juhan
25th February 2002, 22:27
pub_enc.exe has some kind of a bug. For me it stops in the middle of encoding. Encoder.exe doesn't stop (finishes job) but it produces incorrect audio stream. I cannot play it on my pc. The stream created with pub_enc.exe can be played on pc (as stereo).
Has anyone got encoder.exe to work properly ? Also when I start it, it eats up all my computer's memory (about 200 Mb RAM) then waits for a while (several minutes) and then starts encoding.
I assume that if audio stream can be played on my pc then it plays on my standalone player. I have Philips DVD-752 and it plays perfectly MPEG-2 5.1 Multichannel (created with pub_enc.exe) when I use analog outputs. The only problem is that pub_enc.exe stops in the middle of the process. It encodes 1 hour perfectly and then stops. I splitted AC3 and it didn't help - stopped at the same place (almost in the beginning of the second AC3 file).
I think that the only solution is to wait DSPGuru to implement MC 5.1 to BeSweet in the future.
beergod
25th February 2002, 22:41
Juhan,
Well. I have encountered all your problems before.
Encoder.exe eats up your memory .. that's because you have the debug version. The release version should be around 232kB.
As to pub_enc.exe stops in the middle. It looks if the encoder is overloaded, and it cannot find its way out.
My solution would be to lower the overall level by 2-3dB, and you will find that it passes. I still prefer pub_enc as it is a lot faster than encoder.exe
Juhan
26th February 2002, 00:50
Where to get release version of encoder.exe ? I downloaded current version from this forum. I also tried the one that DSPGuru provides from his site (it's the same version - eats memory).
beergod
26th February 2002, 09:58
Try this one Juhan.
Juhan
26th February 2002, 12:59
Which one ?
You forgot to add an attachment :)
beergod
26th February 2002, 16:08
Hmm I tried it again, but no attachments ...
Give me an email address, I shall send it to you.
Juhan
26th February 2002, 19:26
Here it is: <snipped - not needed anymore>
Juhan
26th February 2002, 21:52
I found a solution to pub_enc lockup. I downsampled the audio from 48 kHz to 44.1 kHz and pub_enc.exe passed. Actually MPEG-2 5.1 standard is 44.1 kHz and the encoder seems to handle 44.1 kHz streams better.
But Beergod, send me encoder.exe anyway. I'd like to test if it can handle 48 kHz streams.
Tokafondo
27th February 2002, 14:36
Greetings from Canary Islands.
I've seen many posts of how to convert Dolby Digital 5.1 streams to MPEG )·( Multichannel SVCD compliant files.
I'm not a programmer.
I'm not engineer or such things.
I'd like to set up the initial conditions so people with such knowledge and all the people put ideas on how to make a single EXE or DLL utility that make the so desired DD5.1->MPAMC conversion.
I will make some statements that I think that are true, but people with more experience that me should make corrections, if needed.
- "ALL Dolby Digital 5.1 streams are AC3 streams"
- "NOT ALL AC3 streams are Dolby Digital 5.1"
- "It's possible to have a single-channel mono track in a AC3 stream"
- "AC3, DTS, SDDS, M)·(M and such things are simple compression methods of different quality but all with the same goal."
I will say again that those statements are WHAT I HAVE UNDERSTOOD, but the expert users should correct them so me and the rest can learn something.
As far as I know, the AC3->M)·(M encoder should do this:
1.- Detect how many channels are in the AC3 stream.
2.- Create as many buffers as channels AC3 stream have.
3.- Decode every frame of every channel into every buffer as PCM.
3.- Take that PCM of every buffer and encode into MPEG L2/44/192,
with as many channels as the AC3 stream has.
4.- Write the resultant file.
If it sounds simple I am sure and bypassing a lot of procedures but this could be a beginning.
I'd like to know if in audio streams are "key frames" like video streams. How often must they have to be inserted? Could we decode a "key frame" along the others until then next one, and then reencode them with another freq, rate, etc.?
Should a M)·(M encoder try to encode a Dolby Prologic stream as L,C,R,S,LFE (4.1) stream or as a standard 2 channel stream with Dolby Prologic encoded in?
I hope at least ONE of the things I said here is not a stupid one!
Thanks for you reading this.
Juhan
27th February 2002, 16:43
pub_enc.exe is a tricky program.
I got rid of the stopping problem by downsampling audio from 48 kHz to 44.1 kHz. Then it stopped in another place. I tried lowering audio volume by 3 db but it didn't help. Then I used "-ota( -g max )" in BeSweet and pub_enc.exe passed. Also if I chopped AC3 file into smaller parts and encoded them separately they all passed without "-g max" switch.
I haven't figured it out why pub_enc stops. One thing is sure that it likes 44100 Hz streams better. Maybe the solution is to chop AC3 file into smaller parts every time and join MPG files after encoding.
Maybe it is easier to create a utility which chops AC3 file, encodes the parts using BeSweet and pub_enc combo and after that joins MPG files together. It seems a foolproof solution for me.
BTW! I use HeadAC3he utility to chop AC3 files.
Tokafondo
27th February 2002, 18:42
Please take a look at this and tell me
http://www.licensing.philips.com/ordering/soft/documents199.html
Tokafondo
28th February 2002, 10:19
Greetings from Canary Islands.
It seems that all I'm posting has no answers...:(
Any way, here you have some sources I've found and maybe the programmers in this thread could like them.
Thanks for you reading this.
---
Oops! it seems that attachments doesn't work.
If anyone is interested, please reply this.
Cokes
28th February 2002, 11:24
Originally posted by Tokafondo
Please take a look at this and tell me
http://www.licensing.philips.com/ordering/soft/documents199.html
I think this authoring software is well-known here... but almost nobody uses it. What other do you mean with your post?
Cokes
Tokafondo
28th February 2002, 15:04
Greetins from Canary Islands
Actually I found it while searching for the MPEG Tools and I was wondering why Philips put this online. You will see that the SVCD verifier is NOT online, maybe to not to allow SVCD piracy.
On another hand, the stupid-things density thay my preious long post has. I'd like to have some comments.
DSPguru
28th February 2002, 19:00
hi guys,
if you want BeSweet to offer direct conversion from AC3 to Mpeg2Multichannel, you'd have to focus on testing encoder.exe .
sorry, but i'm not going to start writing the m2mc encoder from scratch (i even hardly have time to visit the forum lately), so i will base my work on the encoder.exe's sources.
please post all your conclusions from testing this tool.
Dg.
Tokafondo
1st March 2002, 01:26
Greetings from Canary Islands.
Instead of downloading others test bistream, I made mine. I recorded 6 wav with some sentences:
"this should be heared from front left"
"this should be heared from front center"
...
"this should be heared from subwoofer"
Then I encoded an AC3 stream using Sonic Foundry Soft Encode.
I have a Philips FR966 receiver. It has 2 coax & 1 opt inputs. It decodes AC3, DTS and M )( M.
I have an OEM SoundBlaster 128PCI with S/PDIF.
I have Intervideo WinDVD 3.0, wich is NOT M)(M compliant. PowerDVD 4.0 XP claims to be, but I haven't tested.
I loaded my AC3 stream in WinDVD and pressed play. My Philips recognize the stream and lights "DIGITAL SURROUND 3/2.1" in the display. The stream plays fine: every sound is heared from the speaker is meant to be.
I used REMPEG to transcode to M)(M. I lost rear left and LFE channels, and rear right is heard from 2 surround speakers.
I used BeSweet b6 with this parameters (please correct them if you think they are wrong!!)
besweet -core( -input m:test.ac3 -ch6aiff -output m:test.aif ) -azid ( -L 0 -l 3 -d 3/2 -g max )
I played test.aif in Windows Media Player 7.1 and the results are:
Front Left: Fine
Front Center: Fine
Front Right: Fine
Rear Left and Right: As if they were Dolby Prologic: both of them
are heard from both rear speakers.
LFE: Lost
I don't know if the rear speakers are decoded by the Philips or what. The receiver lights "PCM AUDIO" in the display while listening that.
Is there any driver that takes a MPEG stream and send it DIRECTLY to the S/PDIF, with no decodification at all??
I will keep testing
---
Addendum: I turned OFF surround decoding in the Philips, so the stream would be sent directly to the speakers. I was stereo, so both FRONT and REAR sound were correctly played left and right, but only inf FRONT speakers. LFE is lost, anyway.
Juhan
1st March 2002, 01:52
1. Loose the "-azid" option.
2. AIFF file is not compressed MPEG-2 5.1 file. It contains PCM streams (unpacked data). AIFF file is needed because it is the only format the encoder understands.
3. Encode AIFF file with pub_enc.exe (Philips Audio Tools). Example: "pub_enc.exe -m s -n d -o -L test.aif". It will create 6-channel MPEG file.
There can be problem with your soundcard. Some soundcards only output PCM from SPDIF output. Some (like yours) can output AC3, too. But does it output multichannel MPEG directly to receiver ?
Tokafondo
1st March 2002, 02:08
Greetings from Canary Islands.
I've tried with your pub_enc settings and the sound were jerky:
"this-this-this-this shou-shou-shou-should..."
the only channel right was front center
If I try
pub_enc -l 2 -m s -n d -r 44.1 -b 384 -L -p 3 -e -v 1 test.aif test``[.mpg]
I got the front left and right and rear left and right played RIGHT ONLY in FRONT speakers. center speaker fine. subwoofer jerky.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.