PDA

View Full Version : 6.1 DTS > multichannel MP2


Taric25
7th October 2001, 00:20
Hello.
I posted the subject about how to convert AC3 to MP2 for SVCD and still be multichannel. The answer is to use SSRC to convert the AC3 from 48kHz to 44.1kHz and then transcode it to MP2 (MPEG-2 Tile Layer 2) for SVCD by using the AC3 > MP2 utility in ReMPEG.
Now I was wondering how to convert 6.1 DTS to multichannel MP2. My idea is that somehow the DTS could be converted to AC3 and then have that downsampled from 48kHz to 44.1kHz and then use the AC3 > MP2 utility in ReMPEG. The only problem I can see with this is that 6.1 AC3 might be impossible or extremely hard to support. If this is totally impossible, then I suppose that the DTS could be downmixed to 5.1 AC3 and then it could be converted to MP2 for SVCD. Any ideas?
I am using Windows 2000 Professional, a 550 MHz Pentium III with 128 MB of RAM.

DSPguru
7th October 2001, 06:30
SSRC is not an AC3 sample-rate convertor, it's a WAVE sample-rate convertor.

the idea of :
48Khz DTS -> 48Khz AC3 -> 48Khz WAV -> 44.1Khz WAV -> 44.1Khz AC3 -> MPEG MultiChannel
isn't a good idea, due to the loss of quality in every step in this chain, which might lead to poor quality on the overall.

i suggest you a better chain :
48Khz AC3/DTS -> (using a decoder)
48Khz MultiChannel WAV -> (using SSRC)
44.1Khz MultiChannel WAV -> (using modified version of rempeg)
MPEG MultiChannel.

as for this ReMpeg program, it tried to work with it and it crashed a few times :(

as for DTS decoder... any1 ??

doom9
7th October 2001, 06:34
no player plays mpeg multichannel so you can save yourself all the trouble. Well.. it plays the format but only in 2 channel mode.

beergod
29th October 2001, 00:14
doom9,

You are wrong. I have seen DVD player stream MPEG2 multichannel out hapilly. A lot of Sony's will do, and any surround decode that does MPEG multichannel will decode the streams. I have tried them on my machine .. it works.

The only thing is REMPEG had problems in encoding LFE channel. It makes the Left surround disspears.

sl --> gone
sr --> sl output
LFE --> sr output.

Duh ! anyone knows where to find a patched source code that fixes this problem ?

Beergod

Doom9
29th October 2001, 10:19
and since when does Sony support SVCDs? I know there are players that play mpeg2 multichannel, but that's on DVDs... and they will only give you 2 channels if you put an SVCD with the same audio format into the player... these are the facts my friend. My own player handles mpeg2 multichannel just fine when I put in a DVD that contains that audio format but that doesn't give you any info about how it reacts when the source is an SVCD.

beergod
29th October 2001, 10:46
Sorry, not sony, most C-Cube based DVD players plays SVCD, and mine certainly streams MPEG2 multichannel out successfully.

Any ideas how one can contact the author of REMPEG2, or author of MC MPEG2 encoder ?:)

Newacey
29th October 2001, 15:48
:)
I Have the Philips DVD 762 (this is the new one) and it plays MPEG-2 MC without any problems. You can even switch to downmixing mode.
I simply used the 48kHz AC3 and converted straight to an 48 kHz mpeg2-mc using ReMpeg and even that worked.

beergod
29th October 2001, 18:53
There is a bug in REMPEG2's MC MPEG2 audio transcoder. It is based on musicin which have the same bug ...

notice the right surround speakers contains the LFE channel, and the left surround speaker contains the right surround signals.
And Left surround signals have disappeared.

If you follow laddv's guide for making the MC MPEG2 stream, but don't do anyhting with the LFE channel, taking the -L option out, then it works nicely.

Taric25
29th October 2001, 19:24
Doom9,

You're a wonderful webmaster and an excellent source for information, but you have to be more optamistic. There are DVD players and recievers that support mutlichannel SVCD and DVD. Believe it. It's true. I have a MPEG-MC DVD player and it works just fine. I have had Dolby Pro-Logic sound on my DVD player and it worked just fine. I got 3, that's right, 3 channels of output. Other people here have also testified that MC-SVCD IS possible. Now I want to work on 5.1 SVCD and I seriousley don't like it when I try to start a conversation about it and you come in saying : Originally posted by Doom9 no player plays mpeg multichannel so you can save yourself all the trouble. Well.. it plays the format but only in 2 channel mode. In my opinion, you (or someone else) should write a guide on this and have it on your site for all to see. I don't mean to sound like a jerk, but I needed to get that out.

Everyone else,

I guess I need to take babysteps until I acchieve 6.1 MPEG-1 Tile Layer 2 audio for VCD (and also have it outputed correctly), but I think I'm on my way. Heck, DVDx would have never been created without Doom9's "20 tool meathod" :) . Any ideas for a better way to convert 5.1 AC3 to MC-MPEG? You can contact the ReMPEG author. How?:confused: Ask DSPGuru. I wouldn't know.:rolleyes:

DSPguru
30th October 2001, 13:39
hi Taric :)

unfortuntly, ReMpeg2 authors didn't reply my email. (or it just went to trash by one of my spam-mail-rulez... :(

anyway, if anyone gets his hand on any source code related to M2MC or even dll, let me know.. and taric's wish could be fulfilled :)

Newacey
30th October 2001, 19:59
If You need a SourceCode

try this page:

http://www.stud.uni-siegen.de/sven.koelsch/mpeg2mc/

If you can somehow compile a stable windows executable out of it. Please reply.

Greetings

beergod
30th October 2001, 21:13
I am seeking help on compiling a Win32 version of Musicin ... or even perhaps changing to code to make it accept wav files instead of AIFFs.

A couple of things needed to fix.

Anyone knows where to get multichannel wav2aiff ?

:o

Newacey
30th October 2001, 22:37
Try the link in my previous post.

The Tool is called PCM2AIFF (the modified version also accepts 5.1 wavs) there's also the source code of this tool.

beergod
30th October 2001, 22:53
Tried it, and compared the source code, it just added the support of an extra LFE channel ... but its still pmc2aiff .. not wav2aiff.

Thanks anyway

Taric25
31st October 2001, 01:55
Beergod,

I confused by something you typed.
Originally posted by beergod
but its still pmc2aiff .. not wav2aiff.
Is there a differance between pmc and pcm or was that just a typographical error?

Everyone,

Also, what's the differance between DTS, WAV, PCM, PCM DTS, and PCM WAV?

Also, what is everyone dressing as for Halloween? Here is what I shall look like. http://www.fansview.com/2001/animecentral/05112839.jpg I am the guy in the picture with the purple face.

beergod
31st October 2001, 10:38
Correction :

PCM, not PMC ... Sorry.

DTS is a lossy compression format used by movies and DVDs.

WAV is a sound file format mainly used by Microsoft installed PCs. It can is mainly used to store PCM audio. However, it can also be used to store some compressed format, but its rare.

PCM mean pulse code modulation, it uses code (eg. numbers) to represent audio waveform.

There is no such things as DTS PCM.

:)

Taric25
31st October 2001, 10:58
Beergod,

So, what's the differance betewwn PCM and WAV? Can't you use the program to do what you need? I found the directions on the page pretty simple. Yes, PCM DTS (not DTS PCM like you typed, spell check!) does exist. I have seen it. Where? I can't remember.

Everyone else,

Now that we have a bunch of source codes, should we mail them to Doom9 and have them put on his source page? I'm not a programmer, so is anyone up for making a multichannel 48kHz AC3 > multichannel 44.1kHz MP2 program? If possible, could the program be made to support MPEG-2 Tile Layer 2 and MPEG-1 Tile Layer 2? Should I move this to the development forum?

Ahhh. Bed time for me.

Doom9
31st October 2001, 13:26
@newacey: give me the source you used, tell me how you burned and I'll make a disc which I take to the store to see for myself.

Newacey
31st October 2001, 16:50
@doom9

Unfortunately I can’t remember the page I downloaded it from (all I know is that it was an ftp-site).
If you want to I could mail the file (ca. 10 megs) to you or at least part of it (or upload it somewhere).

I simply multiplexed this file with tmpegenc. Just take any SVCD-compliant video stream.
I took this muxed-file and burned it with Nero’s SVCD function.
And there it was.

The MC encoding also works with ReMpeg but the right surround channel will not work. But you can still hear the difference to normal 2ch sound.

If you are planning on going to a store, remember to switch the player to 6ch output, unless it will down mix the sound.

beergod
31st October 2001, 21:54
Doom9,

you can download it from here
http://www.labdv.com/en/examples/svcd_audio.php

WAV is a file format, PCM is a coding method for storing information. WAV can also have u-law ADPCM stored instead of PCM and othercoding method too.

Taric25, there is no much thing as PCM DTS or DTS PCM. I think you mean non-data marked CDs that carry DTS data stream.

Doom9
31st October 2001, 22:02
okay.. getting these files now. They're audio-only, right? I don't have a lot of time to test and a large timeframe to get to the store.. isn't there a done mpg file that I can just drag in nero and burn that works? I have other priorities than author SVCDs at the moment (hardware problems....).

Newacey
1st November 2001, 17:26
I'm not quite sure whether this stream works, didn't test it yet.
So don't wonder if the right surround channel is not working properly.

Taric25
1st November 2001, 20:25
Part 7 or the MPEG Doucument summarized in this MPEG-2 FAQ (http://bmrc.berkeley.edu/research/mpeg/faq/mpeg2-v38/faq_v38.html) states:
Non-Backwards Compatible Audio (NBC): addresses the need for a new syntax to efficiently de-correlate discrete mutlichannel surround sound audio. By contrast, MPEG-2 audio (13818-3) attempts to code the surround channels as an ancillary data to the MPEG-1 backwards-compatible Left and Right channels. This allows existing MPEG-1 decoders to parse and decode only the two primary channels while ignoring the side channels (parse to /dev/null). This is analogous to the Base Layer concept in MPEG-2 Scalable video ("decode the base layer, and hope the enhancement layer will be a fad that goes away."). NBC candidates included non-compatible syntax's such as Dolby AC-3. The final NBC document is not expected until 1996.
So, I think our "2 channel only" problem is caused because of MPEG-1 decoders since MPEG-2 audio is backwards compatible.

Newacey
2nd November 2001, 20:27
Might be that you are right.

But since my player the philips dvd-762 has a built-in multichannel decoder, it might get the right info, which is to playback as well the surround and center channels.

That might explain, why it can playback all channels properly.

Doom9
2nd November 2001, 23:37
again (and please respond fast).. I need a file that I can download and burn without considerably effort... only 17 more hours and my time window to test has run out for another 2 weeks... I really have no time to encode some stuff just for this test.. if you could put a 10mb file or whatever up somewhere (just email or pm me the link) that would be much appreciated.

Newacey
3rd November 2001, 00:41
I'm going to send you a small testfile to your submission email-address.
Hope that you will receive it.

Doom9
3rd November 2001, 13:17
I hope using the default mpeg2 directory is okay

Newacey
3rd November 2001, 13:34
yes you can use either Mpeg2 or MpegAV (both will work).
WinDVD doesn't support SVCD with Mpeg2-MC Audio, neither does PowerDVD, but PowerDVD will at least show that it has found the 6 Audio Channels and then downmiax them.

Doom9
4th November 2001, 14:04
got the file, burned it, drove to the store.. and they had like 30 DVD players but no philips :( Anyways.. how about putting this file up somewhere so that everybody can test his player?

And does the player have an internal mp2m decoder?

Newacey
4th November 2001, 18:19
Well I'm Sorry that they didn't have a Philips-Player.

Concerning Your Question about the internal Decoder,
yes the Philips has an internal AC-3 and Mpeg-2 Decoder.
One can also download the Manual at the philips web-page.
Can't give you the exact URL, since it is under construction @ the moment.

Concerning the Uploading, I will see whether I can find the Source I downloaded it from.
Maybe I could email you the original 10megs-file and you can put it on your page, if that would be Okay with you?

Doom9
4th November 2001, 19:59
hm... we're talking a potentially large number of downloads here.. but I'll see what I can do... anybody up for some high bw hosting?

Doom9
9th November 2001, 18:12
could you upload the full 10mb clip somewhere and pm/email me the location... don't think my mailbox can take 10mb

Taric25
9th November 2001, 18:49
Doom9,

If you have 10 3.5 floppy disks, Newacey make a spanning archive of 10 1.0 MB files on disk, then e-mail them to you one at a time. You can then transfer the files to disk and unzip them.

Doom9
10th November 2001, 13:33
I don't even have a floppy drive anymore (unless you call a zip250 a floppy)... but you can rar em to split.

Newacey
10th November 2001, 15:22
What about IRC.
If you and me are online at the same time and you have an IRC-Client as well installed. I Could transfer this file directly to your computer.
But If you prefer the Multiple rar-Archives Way, I Cloud this too.

Doom9
10th November 2001, 15:51
I'm always on IRC ;) You know the net and channels (top of the link page)...

Newacey
10th November 2001, 17:51
The MultiChannel-Testfile has been sent to you.
It's called mc.mpa and contains only audio, but it works perfectly.

Doom9
11th November 2001, 03:13
yeah.. now I need somebody to host it.. if we do this right and mention it on other sites too we can compile a list of players that support the format and eventually look into writing a guide if it's worthwile

beergod
11th November 2001, 10:04
If you guys wanna go for it, I can help you write a guide for it as I have done it ... It does not require Soft encoder ... and its easier, and more effective. I have also done some quality comparison on downasampling using several tools.

What I need now is to contact the guy who wrote ReMPEG2 for the source code he compiled under Win32, and then make some changes to the code, andthen hopefully LFE channel will work. Currently, I managed to get make 5.1 AC£ --> 5.0 MPEG work beautifully.

Newacey
11th November 2001, 12:48
Well it would be great if you could tell us how you did it. DD5.1 -> Mpeg 5.0 is sometimes even better than mpeg 5.1, since due to the normalization the left an right channel my sometime start to clip. (I don't have a subwoofer, so the lfe channel will be mixed to left and right channel.)
Is it also possible to upload a small testfile somewhere so i can check whether its fully compliant and that also both surround channels work properly.

Doom9
11th November 2001, 17:04
just one thing about the file I have.. it's an mpa.. does that work if you burn it alone or do you have to add some dummy video track? As I have no hardware to test (and the DVD player in the house is about to die completely).. it has to be realy specific what people have to do with the file. I already got 2 hostings.. we can probably kick this off for good within 24h

Newacey
11th November 2001, 19:05
No You need a Video-Track. I don't have the video track which actually belongs to this audio-track, but, like you already suggested, just take any dummy-video-track. I didn't want to send you the file with a video-track, since it would have been around 50 megs and my upstream isn't so fast.
Just be careful not to take a video-track which has a higher bitrate than allowed and remember that the audio-track has 384kbs, so don't use more than 2.3 Mbps, just to be sure that the Player is playing the track smoothly.
I used TMpegEnc to muliplex the tracks and then I burned them with nero.

beergod
11th November 2001, 23:41
Newacey, give me your e-mail, and I will try to send it to you. Otherwise, give me an ftp site where I can upload the file to you.
The reason I did not do LFe is because of the bug. LFE is now mixed to L/R with -6dB. I also found problems with the enoder if signal is too large, therefore I tend to turn all the channels down 3dB

Newacey
12th November 2001, 15:55
My email-address is:
NewAcey@t-online.de

Would be great if you could email the file to me.
Please tell me as well which programs you have been using in order to create this file, and how you used them.

Thanx NewAcey

Taric25
12th November 2001, 18:36
Doom9,

If you don't want bandwidth to be taken up so much, why don't you instruct the people who upload/download the file to press reload before and after the upload/download of the file to save bandwidth. I know another webmaster who used this same stratgy for hosting MP3s. Also, what's wrong with my splitting idea, or do you already have the file via (m)IRC or e-mail?

P.S. The eleventh hour of the eleventh day of the eleventh month in 1918 is when armistice was called in WWI (World War 1). This marks Veteran's day in the United States, which was previously called armistice day. It is on this day that we remember the all the soldiers that were lost and all the veterans that still live today that have served my country. It is so ironic that it was two months ago that such a great tragedy occurred, and it only seems like last week to me.

madluther
12th November 2001, 20:28
Beergod, I've done some work on tools to convert AC3 to 5.1 mpeg2, ATM work is on hold but here's what i have so far

PCM2AIFF , ported to VC6, modified code to correct channel ordering, the original source puts the channel order as follows L,R,C,ls,rs,LFE. The encoder (musicin) expects the order to be L,R,C,LFE,ls,rs

musicin, ported to VC6, test streams produced sound good, mux and play back in windvd 3.0.

A direct show filter for mpeg2 5.1, Very early stages of development, currently has input pin buffer issues that i haven't had time to fix. the output pin and decoder sections are working.

If your interested email me and i'll send what i have.

Mad :)

beergod
12th November 2001, 21:50
Newacey,

I will try to remember to send you the clip tomorrow with documentation.

beergod
12th November 2001, 21:58
madluther

I would be very happy if you could send me the source code of musicin and pcm2aiff with some documentation if you can ... and perhaps the directshow filter ... I haven't any experience of directshow filter, but would love to get into it.

my e-mail is
beergod@yww1.freeserve.co.uk

I sent you an e-amil, I was wondering if you received it ...

Thanks

madluther
12th November 2001, 22:25
Beergod, yes i got your email, I'm at work now (I suppose I shouldn't be browsing doom9's forum at work, but the boss is away)

As soon as I get home I'll Rar the sources and send them to you.

Mad :)

beergod
12th November 2001, 22:44
Thanks madluther. I have been waiting for this day ...
I seek a friend's help to port the musicin code to VC6, but it just refused to create a compliant MPEG strem.

Doom9
12th November 2001, 23:02
just one thing regarding the mpa.. any particulars about joining and burning on this or does the regular bbmpeg-> nero way work?

beergod
12th November 2001, 23:05
I use TMPGEnc to multiplex it with a video stream, and use Nero to (SVCD) to burn it.

Newacey
12th November 2001, 23:18
Like beergod, I also used TmpegEnc, even though I'm not sure that TmpegEnc creats 100% compliant SVCD streams. Since Player like the one from Panasonic have sometimes (actually most of the time) problems reading those SVCDs, whereas it can read Orinial (bought) SVCD without any Problems.
I think this has something to do with the packed size of the muxed mpeg-stream which has to be more than 2048 bytes (2352 bytes I believe).
But I am quite sure that bbmpeg will also work.
As far as I know Panasonic is the only player which cannot play those streams correctly.

Taric25
14th November 2001, 00:44
I-author should work.

Movieslut
5th December 2001, 00:48
:confused: What happened to this tread? You guys gave up?

beergod
5th December 2001, 09:17
No, we haven't given up ! Its just that there are no new developments in this area. I am too busy with work, and haven't had time to fix a bug specific to MPEG 5.1. But, I have proven that MPEG 5.0 works.

Any help from ppl who can contribute:
integrate AZID dll musicin.exe into one product.
make musicin.exe accept wav file.
Make gui for the integrated product.

The author of REMPEG2 did some work on it, but dissapeared now.
I hope he comes back and could inspire me, and give me some clues.
He has done quite a lot towards my aim.

Clydesdale
20th December 2001, 01:26
I wonder if the folks in this thread who have had success creating multichannel surround audio (5.1 or 6.1)on svcd's could tell us the specifics of how they did it? By the way I've read several places that downsampling from 48 to 44.1 khz is unnecessary, as all pc's and most standalone players support 48. So this step may not be necessary in this process.

beergod
20th December 2001, 10:05
Clydesdale,

I have the source code to compile MPEG mc encoder. However, there is still one bug I found which I not have time to fix yet ie. if you encode 5.1, the rear right channel has no sound. left rear caries rear right, and sub goes away. If you do 5.0, then its OK. Once I have fixed this bug, I hope I can distribute the software to you guys.

Previously, you had to run mc on Linux platform.

When I have time, I shall write a document detailing how to do it.

48k --> 44.1k is not neccessary just because most SVCD players are DVD players as well, therefore able to support 48k.

ChristianHJW
20th December 2001, 14:03
... most DVD player will support 48 KHz AC3, but this doesnt automatically mean they can do 48 KHz MPEG 1 layer 2 sound as well, will depend on decoder chip i guess ...

Another question guys :

Is 5.1 really necessary ? 5.0 capabilities in SVCD's sounds good to me, bass could be mixed into L/R channels.

But i admit the missing sub channel will be a problem for those having subwoofer systems connected to the DD receiver .... no bass :( ...

beergod
20th December 2001, 15:00
All DVD players have to support 48k MPEG due the fact that there are still some MPEG 5.1 DVDs around (like Reg 2 Jumanji)

5.1 is not neccessary. But, if the source is 5.1, its best to use 5.1. Downmixing the LFE is acceptable, but will lower SNR as main channels have to be scaled to avoid contents clipping. Bass management is best left to surround processor.

Because MC has a bug in 5.1, the best compromise is to use 5.0.
We are not loosing information, just scale and add the LFE to L/R.

madluther
20th December 2001, 22:09
the solution for your "bug" is here

http://rilanparty.com/vbb/showthread.php?s=&threadid=10214

Taric25
21st December 2001, 20:49
@Beergod (yech! beer tates awful! :( ) and any other capable programmers

I understand that this bug is limiting us from creating correct MP2s, so does anyone know when they'll have time to correct this bug? Sorry, I'd do it myself, but I'm not a programmer.:(

P.S. Happy Holidays from me in America :)

madluther
21st December 2001, 21:02
The corrected binaries are available via a link in the above thread and sources too.

Clydesdale
22nd December 2001, 04:48
Well that's all well and good but rather meaningless unless you have sonic foundry softencode.

Clydesdale
22nd December 2001, 05:09
Hmm, on second thought it looks like Azid might sub for sfse. Has anyone tried this?:D

beergod
22nd December 2001, 10:47
@Clydesdale,

YES, I have tried it, and its far easier than SFSE.

azid -d3/2 -ol,r,c,sl,sr -M1 -F pcm xxx.ac3 temp.pcm

The above is the commandline to do it. It decodes ac3 files into 5.1ch pcm files.

beergod

DSPguru
22nd December 2001, 11:19
i suggest that you use azid instead of sfse.
you could also use my program (http://dannidin.netfirms.com/BeSweetv0.9.zip) for direct 48Khz 5.1 AC3 -> Six 44.1Khz mono Wavs conversion.

nimrodo
24th December 2001, 14:45
After creating the 6 mono wave channels how would i integrate them in order to play them on the dvd player
mpeg2? with what softwear?

DSPguru
24th December 2001, 14:53
read madluther (http://rilanparty.com/vbb/showthread.php?s=&threadid=10214) post.

Taric25
24th December 2001, 21:06
Originally posted by madluther
pcm2aiff:

Code is modified from the original version to change the channel ordering. The reason for this is the encoder expects the aiff file to contain the channels as follows
L,R,C,LFE,ls,rs
the original pcm2aiff ordered the channels as follows
L,R,C,ls,rs,LFE
The resulting mpgs would seem to lose the 'ls' channel due to the encoder applying a 125Hz low pass filter on what it assumes is the LFE channel. This may account for the comments on another thread on this forum that ReMPEG2 produced 'buggy' streams when LFE was enabled (if ReMPEG2 is based on the same sources).
The downside of the change (crude and quick) is this version is only good for 6 channel aiff conversion, see the sources for details.

Okay, I read madluther's post and my question still stands: does anyone know when one will have time to correct this bug?

I think the best thing to do would be to design a GUI that converts 5.1 AC3 > multichannel MPEG-2 Tile Layer 1/2/3 files (MP(1/2/3)). After that we can worry about DTS. I think that multichannel MP3 would be a good idea as well for the people who would like surround sound in their DivX files. Maybe this could be integrated into BeSweet/Azid.

Also, is there a real need to use aiff? Are there any capable programmers up for a challenge?:)

DSPguru
24th December 2001, 21:11
i might take the challenge of creating a dll encoder and integrating it with BeSweet.
but..
a. DON'T HAVE TIME
b. never tested M2MC on my home-surround, and i don't have a multichannel soundcard, so it would be a bit hard for me to debug/test the results of my coding..

beergod
26th December 2001, 10:41
@DSPguru
i might take the challenge of creating a dll encoder and integrating it with BeSweet.
but..
a. DON'T HAVE TIME
b. never tested M2MC on my home-surround, and i don't have a multichannel soundcard, so it would be a bit hard for me to debug/test the results of my coding..

I may be able to help you out on this. I am a DSP engineer, but I mostly design algorithm and code in MATLAB, and assembler. Although I do use C/C++, but not very often ... You can give enough info for me to integrate MC onto BeSweet (if you wish). I am only offering help, and set myself a new challenge.

DSPguru
26th December 2001, 20:09
Originally posted by beergod
I may be able to help you out on this. I am a DSP engineer, but I mostly design algorithm and code in MATLAB, and assembler.
hi, me too !
in fact, BeSweet is my first project in C.
what DSP are you coding to ? my forte is Motorola's DSP563xx family :cool:

Although I do use C/C++, but not very often ... You can give enough info for me to integrate MC onto BeSweet (if you wish). I am only offering help, and set myself a new challenge.
well, how about creating a dll (with interfaces i will design) that convrets RAW pcms into m2mc frames ?

it would be cool if you could do that, but if you plan only to do a small part, i rather doing it all by myself..

Dg.

beergod
27th December 2001, 00:15
@DSPguru

Perhaps we should discuss this project outside the forum. Please email me.

beergod@yww1.freeserve.co.uk

beergod

DSPguru
27th December 2001, 08:40
why outside ?

beergod
27th December 2001, 11:30
OK ... Tell me where the source code is, and I will try to do something.

DSPguru
27th December 2001, 17:44
here it is (http://rilanparty.com/vbb/attachment.php?s=&postid=50715)

Taric25
18th January 2002, 17:09
I have been away from the forum for a while (final exams, etc.) but has the project progressed? It would be nice if we got a program that has an input for 48kHz A5.1 AC3 and an output of 44.1kHz MC-MP2 so that we don't have to go through converting a 48kHz 5.1 AC3 to 6 44.1kHz mono WAVs, put them back together in SFSE into a 44.1kHz 5.1 AC3 and then (if we ever get this bug fixed), convert it into MP2 using ReMPEG (or some other program).

Unfortunatley, I am not a programmer, so I can contribute little, if any, help. Any ideas?

DSPguru
18th January 2002, 17:15
don't know about beergod...
as for me, i worked of BeSweet's other (more important) features.
will probably release BeSweet v1.0 today.

main feature of v1.0 : direct DVD->MP3 conversion ! (using vstrip.dll)

beergod
19th January 2002, 18:58
I looked at the source code DSPguru gave me, but it needs a lot of work to do what triac25 asked for, and this and next month I am extremely busy with my work. (which also explain why I am missing from the forum for a while)

PoKKeNoiSe
20th January 2002, 02:21
Hi,

I'm not a programmer but i think you might be interesting in some tools i found last month, a command line MultiChannel encoder for DOS/Windows.The program is pub_enc.exe.

I created a Multichannel track myself with it, but i haven't had the right tools yet to test the track, but it comes from Philips(A creator of MultiChannel), and it costs nothing :)

and a tools called raw2audio.exe (is also included in the package) which can convert wav to aiff or aiff to wav (and so on + 2 types more (don't know them right now)).

Philips Licensing Site (http://www.licensing.philips.com/ordering/soft/documents343.html) at the bottom click "Audio Tools" that's the packages.

good luck!

eclipsedvd
20th January 2002, 10:10
a GUI will be out soon.
It takes a lst/vob as input and generate the different process to generate the final mpeg-mc file.
I has been tested on philips player, and it works very well.

@DSPguru, the GUI use BeSweet, i hope it isn't a problem.

PoKKeNoiSe
20th January 2002, 16:42
Is the Philips DVD752 Mpeg )( MultiChannel Capable?

I have that one, but don't have 6 speakers yet.

thnx,

DSPguru
20th January 2002, 18:17
Originally posted by eclipsedvd
a GUI will be out soon.
@DSPguru, the GUI use BeSweet, i hope it isn't a problem.
NP :)
let me know when the gui is out.

eclipsedvd
20th January 2002, 20:21
the mpeg-mc has been tested on:
DVDPlayer Philips DVD 950
Ampli Yamaha RX-V396RDS
Speakers 5.1 Yamaha HS-P220

and it works

Taric25
31st January 2002, 07:20
Originally posted by eclipsedvd
a GUI will be out soon.
It takes a lst/vob as input and generate the different process to generate the final mpeg-mc file.
I has been tested on philips player, and it works very well.

@DSPguru, the GUI use BeSweet, i hope it isn't a problem.

Will this also support multichannel MP(1/3)s or just MP2s?

eclipsedvd
31st January 2002, 09:58
Taric25> the encoder only support LayerI & LayerII, not LayerIII.

PoKKeNoiSe
31st January 2002, 19:45
I forgot to mention it earlier, but i think the input for the Mc encoder from philips must be L, R, C, LFE, RL, RR

(and the -c option must be filled in 1 not 6)

good luck!

DSPguru
8th February 2002, 18:31
BeSweet v1.2b2 (http://dspguru.doom9.org) now supports aiff file output.
the new switch iZ -core( -6chaiff ).

you can grab the m2mc encoder from here (http://dspguru.notrace.dk/encoder.exe)!

Cokes
9th February 2002, 15:44
Originally posted by DSPguru
BeSweet v1.2b2 (http://dspguru.doom9.org) now supports aiff file output.
the new switch iZ -core( -6chaiff ).

you can grab the m2mc encoder from here (http://dspguru.notrace.dk/encoder.exe)!

Hello,

can I use these 6ch AIFF as input for Philips ISO 13818-3 MPEG-2 Audio Multichannel Encoder Revision: 2.5 990316?

I mean if it has right order...

BTW your link to m2mc encoder doesn't work for me...

Thanks a lot

Cokes

DSPguru
9th February 2002, 15:57
i didn't test the result with the phillips encoder, eclipsedvd tried it and it didn't work. try for yourself.

the channels sequence is correct.

here's an updated link of the encoder (http://dspguru.notrace.dk/encoder.zip).

beergod
11th February 2002, 11:34
DSPguru,

What is the maximum file size that Besweet will output on AIFFs ?
A 2 hour movie will approx have 3.8GB of 44k/5.1/16bit.
wondering if what would happen if you output a 3 hour movie ?

Has anyone tried encoding a > 4GB AIFF file using MC MPEG encoder ?

eclipsedvd
11th February 2002, 12:05
As we use mpeg mc for Svcd, we should compress the sound for one cd. So the problem disappear.

What do you think about?

beergod
11th February 2002, 12:08
DVD2SVCD rips the entire DVD contents out, and use BeSweet to encode the entire track. So, in this case, 4GB barrier does matters.

DSPguru
11th February 2002, 12:57
true, -6chaiff suffers from filesize limitations.
anyway, in the future i will offer direct AC3->M2MC conversion (without intermediate files), so this won't be a problem.

beergod
11th February 2002, 14:29
DSPguru,

So what is the filesize limit on aiff ?

MaTTeR
11th February 2002, 15:17
Isn't AIFF a Mac audio format? I seem to remember it from my days of Cubase:)

DSPguru
11th February 2002, 16:52
4gb like u said. (unsigned long)

Cokes
11th February 2002, 18:06
Originally posted by DSPguru
i didn't test the result with the phillips encoder, eclipsedvd tried it and it didn't work. try for yourself.

the channels sequence is correct.

here's an updated link of the encoder (http://dspguru.notrace.dk/encoder.zip).

I mean DVD2SVCD based...:

C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe -core( -input c:\Temp\Extracted_audio_1.ac3 -output c:\Temp\Encoded_audio_1.aif -6chaiff -logfile c:\Temp\Encoded_audio_1.log ) -azid( -c normal ) -ota( -g max ) -ssrc( --rate 44100 ) ?

Then become I 6ch (L,R,C,LFE,LS,RS) aiff file?
And encode with:

m2mc -m s -n d -o -L Encoded_audio_1.aif ?

Thank U

:confused: Cokes

beergod
11th February 2002, 18:11
Can anyone tell me how DVD2SVCD passes commands to BeSweet ?
What is the command syntax ?

Thanks

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.

Tokafondo
1st March 2002, 02:17
Greetings from Canary Islands.

I tested your BeSweet settings. Thery Are WRONG! if i left out azid settings i only have a 400Kb file from a 1,2 MB one.

Then I use your PUB_ENC settings and it only rendered 60 frames!

I put that in windvd and sounded "GNEEEEEEEEEEEEEEEEEEEEEEEE" and stop


Is there any DRIVER so the S/PDIF output can be handled as a port?


I've seen that there is a encoder.exe newer than the 232kb version around. Can I have it??

I have 2 source codes from some projects i found outthere. they are mpeg2 aac, but i think they also support m2mc. I'm not programmer. Anyone interested in them??

beergod
1st March 2002, 10:41
Tokafondo:

Your commandline for using pub_enc is standard, and I don't find any problem with it. I am doing extensive experiements on pub_enc exploring such things as -y -x -P option. Somehow, my decoder wouldn't regconise -P, and only treat the stream as MPG 2.0

As for streaming MPEG stream in a SPDIF carrier

use pub_dec -w -B xxx yyy

where xxx.mpg is your mpg stream (it has to have the mpg extension, but when you don't include the extension in your commandline), and it will output yyy.iec

and yyy.iec is a wav file.

So, just play yyy.iec and make sure you set the SPDIF out to non-audio data, you should get MPG stream in SPDIF carrier.

Please point us to the MP2 AAC source code .. potentially it can do us good.

DSPguru
1st March 2002, 11:23
@beergod
here's the link (http://forum.doom9.org/attachment.php?s=&postid=92453).

Tokafondo
1st March 2002, 18:40
Greetings from Canary Islands.

I have another source code. It's attached. (At least I tried)

The CT4810 / SB128PCI driver only allows to select analog / digital output, so the line out jack will be used in analog mode to speakers or digital mode to decoder. I don't know how to set it to non-audio data.

There must be some kind of Directshow filter to the S/PDIF output. Directshow decoders like intervideo, fraunhoffer, cyberlink has the option to use the S/PDIF output if they want. There must be something there that thell that filters that a S/PDIF is available.

Hey I downloaded the encoder.zip shown in a previous post. I try to encode, and all I have is "cannot allocate dummy"... What's up?

On another hand, and this is for the programmers, here is a link I found on how to create custom audio data formats to use as directshow filters. I think this could be useful to test MPEG)(Multichannel, because you could pass the stream directly to the s/pdif output of your sound card with no decoding at all (at least that is what I understood).

http://www.microsoft.com/hwdev/tech/audio/Non-PCM.asp

And this is a link on how to set the type of stream that the standard directshow mpeg-2 filter will output. See that MPEG)(Multichannel is supported.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dx8_c/directx_cpp/htm/mpeg2splitterfiltermediatypes.asp

I know that this thread is for ENCONDING, and the links provided are for DECODING. But I am sure this will be useful for testing purposes of M)(M streams. Maybe many of you already knew this, but as I don't know, I am posting them. If you want me to stop doing this, please tell me but remember I'm trying to help from my insignificant knowledge of this.

beergod
1st March 2002, 21:23
use pub_enc to make MPEG2 MC stream into wav files, and then just play the wav file into SPDIF. Your decoder may treat it as PCM if its not data marked.

Note: Data mark SPDIF streams have nothing to do with the content of the stream. AC3, MPG or DTS can be carried on wav files. However, with the exception of DTS, AC3 and MPEG needs the SPDIF stream to be data marked before the decoder will decode it, otherwise, it treats it as a normal PCM stream (which will sound very noisy).

When you play your SVCD with MPEG2 MC ... your DVd player is outputting a data marked SPDIF stream carrying the MPEG stream.

Juhan
2nd March 2002, 17:12
to: beergod

Have you any success with encoder.exe? I tried, it finishes encoding but the output mpg file seems to be useless. I cannot play it on my pc. Programs say that 'format is not supported'. During encoding the program reports that center=0, surround=0, only stereo=2.

What switches do you use with encoder.exe ? The standard switches are not working correctly ('tables' directory is present with correct files).

I haven't tried encoder.exe output with my standalone player. Maybe it works but pub_enc output can be played with pc also.

beergod
2nd March 2002, 17:33
Juhan,

To use encoder, you need to use Besweet 1.2b2 to get the aiff file (using the 1.2b6 will give you bogus aiff file header which in turns misinterpreted by encoder.exe)

I have also found something very interesting.

To get a 5.1 channel AC3 --> MC MPEG2 @ 384kbps is useless because the quality just isn't good enough for me. My DVD player has problems playing a decent MC MPEG2 file @ 448kbps.

I have also done some MC MPEG2 encoding awhile ago which only uses 5-ch instead of 6ch. I mixed the LFe into L and R, and encoded it to 384kbps which is acceptable.

To DSPGuru:
Some of the following simple mod to BeSweet would be appreciated:

1. support 5-ch aiff instead of 6.
2. someway to get the LFE tomixed into all main channels.
Do you have the interface format in which you pass audio data around ?

If the interface is available, then I can write a little utility that can do the proper mixing, and even do PLII encoding.

DSPguru
2nd March 2002, 17:43
Originally posted by beergod
To DSPGuru:
Some of the following simple mod to BeSweet would be appreciated:

1. support 5-ch aiff instead of 6.np.
2. someway to get the LFE tomixed into all main channels.i can do it..
Do you have the interface format in which you pass audio data around ?

If the interface is available, then I can write a little utility that can do the proper mixing, and even do PLII encoding. no problem, give me a dll that accepts a block of samples and return the processed block to a callback function.
the prototype of your function and the callback function should be :
typedef void (*OUTPUT) (float*, unsigned int);

Cokes
2nd March 2002, 19:57
Guys,

we can contact Mike Cheng (mfc@planckenergy.com) with feature request to imply support of 5.1 or 5.0 MC in toolame 0.3.
When I look at dist10 and toolame sources, lot of Mike Cheng's work stand on improving psychoacoustics of original dist10 code.

I mean at last we can ask him, if it would be lot of work, turn back the multichannel features into toolame source.

What you think about?

BTW: http://sourceforge.net/tracker/?atid=369022&group_id=19022&func=browse

Juhan
3rd March 2002, 04:48
I tested ReMPEG, just because of curiosity. I just wanted to see how it handles files which have stopping problem with pub_enc. They all stopped at the same place. I suspect that encoder.exe would stop also because it is based on older source code than pub_enc.

If I find somewhere BeSweet 1.2b2 then I test encoder.exe also.

Juhan
3rd March 2002, 04:51
DSPGuru, maybe you can add BeSweet 1.2b2 into your homepage (or at least give a link). Then I don't have to search different web pages.

DSPguru
3rd March 2002, 05:34
http://dspguru.notrace.dk/BeSweetv1.2b2.zip

DSPguru
3rd March 2002, 15:25
Originally posted by Cokes
Guys,

we can contact Mike Cheng (mfc@planckenergy.com) with feature request to imply support of 5.1 or 5.0 MC in toolame 0.3.is toolame still in development ?
if Mike is willing to add MC support and release toolame under LPGL, i'll make a dll version of toolame, and we'll have 5.1mpeg.

@God
what should be the channels sequence for 5.0 ?

beergod
3rd March 2002, 16:43
@DSPGuru,

Channel sequence is L,R,C,SL,SR

BTW, Can you send me an example of how you would use the interface to pass multichannel data and process them ? A sample DLL, and a C++ code calling it would be good.

I am trying to get myself into writing code.

DSPguru
3rd March 2002, 21:34
@god

i'll make something..

beergod
3rd March 2002, 23:40
Thanks DSPGuru

Juhan
4th March 2002, 14:40
Yep! The same problems with encoder.exe. At least we have source code... (Locking in the same places as ReMPEG and pub_enc).

Using "-v 3" switch (i tried it with pub_enc) shows that encoder stays in loop. We have to find out why it cannot continue. Maybe somebody can modify the source code that it dumps variables into logfile for every encoded frame. Then we can compare variables with source and find out why the loop is not finished. Maybe using force to end loop helps (assuming that audio is encoded correctly - maybe it encodes certain frame all over again, and again and again etc). A simple modification may help (for example: pressing Enter when encoder stops). After that we can listen the output if it is encoded correctly.

beergod
4th March 2002, 23:52
I have successfully encoded an entire movie, and made into 2 SVCDs, and itworks flawlessly on my DVD player (Meridian 596). IT has subtitles, and MPEG 5.0 I mixed LFE into LR so that it takes less bandwidth of the encoder, and make 384kbps listenable. If you compared to the original, it is still a bit poor in terms of quality ... hey, this is what transcoding does to your sound.

Also the factha MPEG MC uses some kind of matrixing for backward compatibality, there are alwasy some dgree of crosstalk ... so it isn't as clean as DD, or DTS. But, it is all psychoacoustically masked.

Currently, I use DVD2SVCD and replace BeSweet.exe with a bat file which does the encoding, and then moved the encoded file to a filename that DVD2SVCd expects.

This has been a long experiment for me, and now it is finally bearing fruit.

Hopefully, someday we can make the encoder better. I use pub_enc, and it is A LOT faster than encoder.exe.

Tokafondo
5th March 2002, 09:52
Greetings from Canary Islands.

I have a question: 384 is the TOTAL bitrate for multichannel output?. I do know nothing about audio encoding comparing to knowloedge of many posters here, but if I make 384 / 6 it results 64 kbps. I've seen in many sites that SVCD supports VBR audio.

Does PUB_ENC or ENCODER have any kind of VBR support??

Is there any way to build the encoder from the scratch following the MPEG)(Multichannel specs, instead of patching the source codes around??

I don't know if my posts are useful or not to the thread, but anyway I'm VERY interested in the whole idea.

beergod
5th March 2002, 10:08
Tokafondo,

384kbps is for all 5 channels. You don't calculate 64kbps by dividing 6. There are a lot of overheads in the steam, and you can set different bit rates for the front LR.

SVCd may support VBR audio, but all surround sound decoders rely on on it being able to stream MPEG on SPDIF .. so , I am not sure if it works this way ... has anyone tried ?

It is possible to build the MPEG enoder from scratch, but you are really asking for trouble. DO you have any idea what sort of skills are required ? It takes a team of audio/programing experts years to build this kind of programs. And you do need the MPEG standard book for it. Patching is still the best way !

No one will make MPEG2 from scratch except MPEG2 AAC nowadays.

Tokafondo
5th March 2002, 10:59
Greetings from Canary Islands.

I think that most of the job is taken in the creation of the standard. If the commitee creates a standard it means that someone has the method of how to get there. MPEG)(Multichannel encoding is done by mathematics formulas, and someone have them. It seems that many companies have those formulas because there are several hardware and software tools to achieve that. If you get them it would be easy to implement them but the most important matter is to do it fast and right.

I attach a MPEG parser that I found. I understand that is provided to check if a M)(M stream is compliant or not. BUT as I always say, I have no idea so it's possible that its purpose could be any other...

I provide links and attachments as I understand they could be useful to someone. If you don't want me to do that, please tell me!!

Some Links...

http://www.dv.co.yu/mpgscript/mpeghdr.htm
http://www.otolith.com/pub/u/howitt/sbc.tutorial.html
http://www.cs.tut.fi/~ypsilon/80545/CodingOfAS.html

Juhan
5th March 2002, 13:39
I don't say that the encoder stops all the time. I just took the parts that stop and tested with them. I just want to find out why encoder stops at some places. It's a pain to encode hours and then encoder stops. Then you try again with modifying audio stream (lowering or raising volume) and encode for hours and then it stops in another place. If you test several days you at last find a way to encode full audio strem successfully. But if we find out how to eliminate stopping problem then we only have to encode once.

Juhan
6th March 2002, 18:40
I tried pub_enc.exe and encoder.exe with "-x 3" (matrix mode 3) switch and all my test clips passed successfully. I even encoded 2 hours of audio successfully (entire movie). I have to try this option with the other movies as well but it seems that the solution is "matrix mode 3". The result sounded good.

Anyone knows what is the difference between matrix mode 1, 2 and 3 ?

DSPGuru! Thank you for adding 5.0 channel AIFF support into BeSweet!

DSPguru
6th March 2002, 19:00
Originally posted by Juhan
DSPGuru! Thank you for adding 5.0 channel AIFF support into BeSweet! enjoy :D !

DSPguru
7th March 2002, 10:31
@god
i've added an extrenal plug-ins support to BeSweet RC3.
see the example code at my webpage.

Cheers,
Dg.

beergod
7th March 2002, 12:23
@DSPGuru,

I have downloaded them, and will look at it.
Thanks.

Knavish
11th March 2002, 01:46
can someone write a mini how-to SVCD with 5.0 ?

and with which program get best results?

what about subwoofer? you lost it totally?

and is it possible to make 5.1 right now?

under linux is it possible doing that: (if you know)

thnx! :pHow to make a multichannel MPEG-2 Audiostream (http://www.stud.uni-siegen.de/sven.koelsch/mpeg2mc/)

DSPguru
11th March 2002, 05:53
read the audio faq, q13.