Log in

View Full Version : Appended ogg playback broken


Kent Wang
20th December 2003, 05:47
I'm ripping Lord of the Rings Extended Edition into a 3-CD Xvid/Ogg OGM. The feature, because it's so long, is spanned over two DVDs.

I'm creating the video stream in DVD2AVI by simply opening both discs' VOBs at once. This seems to work fine for the video, but the audio is a few seconds late after the transititon point between discs. So, I decided to still use the video stream but generate a new audio stream by using DVD2AVI to demux each disc at a time to generate two audio streams which I can then append together to hopefully form a single properly synced audio stream.

After much Googling it appears that the proper way to append an Ogg stream to another is to simply use "cat 2.ogg >> 1.ogg" (or the equivalent MS DOS copy command). The resulting Ogg works fine in Winamp but I'm unable to get it to work in an OGM.

I first tried using OggMux which generated an undersized file, the difference in size seemed to be attributable to the second half of the stream. Manually muxing in VDubMod generated a properly sized OGM, but there is no audio when playing back the second half of the film.

Any suggestions? Even if I could get this working, I'm still not sure it will be properly synced. How else would you recommend generating a 3-CD rip from a 2-DVD feature? I could generate two OGMs, one for each DVD, append them together with ogmerger then cut them into 3 CDs with ogmcutter, but that's a rather unpleasant solution.

ChristianHJW
20th December 2003, 09:57
Did you try VirtualdudMod and the 'file' 'append video segment' function on your ready made OGMs already ?

Koepi
20th December 2003, 10:01
If you simply append two OGGs you'll have "chained streams". Both start with a time index 0. It's more like a playlist.

So you will run ito trouble if you mux that into video as OggDS will use only the first (or only the second) stream.

So you have to use the ac3's, decode them to wav, cut them accoridng to the delay reported by your DVD Ripping program (best with besweet during transcoding) and then concatenate the wavs with a waveditor (i.e. the freeware Audacity, I think it's hosted on sourceforge).

After that, use i.e. OggDropXP to transcode the new long wav into OGG Vorbis.

I hope this helps,

Regards
Koepi

Kent Wang
20th December 2003, 10:27
ChristianHJW: I think you're misunderstanding my problem. I actually only have one video segment, but need two audio segments appended to each other. Of course, I could try making two audio/video streams and then append them together as you described using VDubMod, but I had already mentioned using ogmerger, which does the same thing.

Koepi: That makes a lot of sense and I'll try it out. I'll report back when I do. What is odd though is that OggDS should either understand "chained streams" or someone should write an Ogg appender. There seems to be little support from the Ogg developers for the latter as most responses I've read seem to indicate that it's rather useless. I tend to agree with them and there really should be no reason why OggDS should be confused.

gabest
20th December 2003, 16:37
By appending two ogg with "copy /b" the file becomes unseekable at that moment (as Koepi pointed out the time restarts at the second file). You don't want that, do you? :) But that's only the smaller problem, an ogg file must start with header pages from all streams, then have many normal pages and at the end a few terminating pages. Encountering header pages again in the stream would mean the possibility of new stream types or a change in their number, dshow surely couldn't adopt to this new situation on the fly.

Nibor
20th December 2003, 18:05
Hi Kent Wang!

I'm ripping The Two Towers Extended Edition to 3 discs and had the same 'problem' with the two audio streams!

My solution was:
- Demux the AC3-streams from the VOB-Files
- Now you have two AC3 with both a delay of some ms
- Then I removed this delay from both files using BeSplit
- I created a LST file with two lines, one for the filename of each AC3
- Now I took this LST file as input for BeSweet and output to a new AC3 stream
(in this step it is important that you use BeSweet v1.4 Stable, because the beta versions seem to have a problem with LST input!)
- Finally you have one big AC3 stream and can transcode it to OGG

Maybe this is all possible with less steps but at least it works :)

Ah, here is the link to BeSplit and BeSweet:
http://dspguru.doom9.org

Atamido
20th December 2003, 18:38
You could easily import both of the Ogg files into MKA using MKVMerge and then use the Matroska Stream Editor to append one track onto the other. Once that is done then you should be able to use GraphEdit to mux the Vorbis audio packets whereever you want (except AVI of course).


@Gabest: Good to hear from you mate. Hope the holidays are treating you good.

Kent Wang
23rd December 2003, 13:21
OK, report.

I first tried Nibor's solution, but LST files didn't seem to work for the DTS tracks I was decoding. So I ended up using Koepi's suggestion of converting both streams to WAV and then catenating them together. I didn't want to bother with installing an audio editor so I went looking a small freeware app that specialized in just catenating WAVs. Little did I know that this would prove to be far more work than I thought as both WaveCat and wtadd (part of the WAV-Tools suite) seemed to have trouble handling 2GB files. I ended up using BeSplit to join them, OggEnc to convert to Ogg and OggMux to mux to OGM. This worked well but the ~1sec sync delay in the second half of the flim was still present. Back to square one.

What I didn't do however was add/subtract any delay for the second half WAV file as I'm not sure where to obtain this number from. I assume you guys are referring to the number present in the DTS filename generated by DVD2AVI but the delay in the filename was reported only as 0ms. Also, the DVD2AVI-computed delay is usually no more than 128ms while in my case the difference seems to be around 500ms-1s.

I think at this point I'm either getting the delay wrong or using DVD2AVI to open up both VOB chains together is borking the video stream so that it's the video that's broken and not the audio.

@Nibor: How did you manage to create a single D2V project? What I did was in the open VOB dialog I added the VOBs from the first disc then added the VOBs from the second disc. Is this wrong?

Nibor
23rd December 2003, 13:41
Originally posted by Kent Wang
@Nibor: How did you manage to create a single D2V project? What I did was in the open VOB dialog I added the VOBs from the first disc then added the VOBs from the second disc. Is this wrong?
No, this is the right way and it worked for me.

But what I did a different way than you is the demuxing of the audio stream. I did it right with the DVDDecrypter.
Select 'Stream processing' or something and demux the audio streams and deselect the streams you don't want.
This way you have smaller VOB-files (because only the video is stored in them) and can delete the original audio files after you transcoded them..
Because I first encode the audio and then do the video several times until I'm happy with the result :)

Cheers!
Nibor

Bluedan
14th February 2004, 15:53
I recall several times having trouble with list files not being correctly handled.
I never found out were the fault was.
Now, I had to come back to this issue with The Two Towers as well.

It's not the syntax of the list file which is very easy anyway.

I have 2 AC3 streams which should be merged within the coding process to 1 ogg file.

To me the solution was to uncheck hybrid gain.
I chose postgain and entered a manual gain that has been asserted to file when I pre-processed the first AC3 stream alone.
Just check log file for the value.
Sure this assumes that this value applies to both streams.
If you want to be super precise pre-process both files to find out if gain value matches.
Also I entered manual delay. dvd-avi checkbox is greyed out.
I hope it applies too to both streams which have the same delay... coding is running as I write here.

Now, besweet log doesn't report overflows anymore as it did with hybridgain switched on....
should have thought of this earlier.

Will report later if this transcode fails in the end.

EDIT Well. Had to correct little. To keep the functionality of "Hybrid gain" I had to check dialog normalisation and also under azid tab pregain which I set to 10dB according to hybrid gain pop up info box. Then I set postgain to 80% to achieve 2.5dB overall gain assertion which was the value computed as I mentioned above. /EDIT

Bluedan
15th February 2004, 15:53
Hope is forfeit.
Besweet log reports overflows from the beginning on. Postgain didn't assert any value at all.
So I guess the postgain/Hybrid function doesn't work at all.

@DSPGuru There have been a lot beta versions since this known problem. Are you already working on it? It's the only program that I use for audio transcoding and this issue is very annoying...