Log in

View Full Version : AC3 delay corrections (re-encoding?)


Kompressor
7th December 2002, 07:07
Hi all,

I have extracted two ac3 files using DVD2AVI that both have a -88ms delay tag.

Since I would like to mux them together with the video component into OGM an container, AFAIK I'll have to manually apply a delay correction prior to muxing the video and audio files (using OGMuxer).

In the past I have always used "AC3 Delay Corrector", as by chance most of my previous encodes that required ac3 delay adjustments were delays of multiples of 32ms (1 frame).

Throwing my -88ms delayed ac3 files into AC3 Delay Corrector, it simply cuts out 96ms (3 frames) from the start, as indicated by its log files. I've tried Headac3che and it handles the delays in the same way as AC3 Delay Corrector (i think it even mentions this in one of the Headac3che readme files).

From digging through pass threads (with very limited success), I see DSPguru mentioning that re-encoding the ac3 file will be the best way to correct the delays accurately.

Would such kind of re-encoding cause any quality loss to the ac3 files? If so, are there any other ways/tools to correct such 'non-multiple of -32ms' delays without affecting the quality of the ac3 file?

@DSPguru
I see in the changelog of BeSweet v1.5b8 mentions - support for lossless delay correction of ac3&mp2 on payload mode , is this a solution to my type of delay? Can you kindly provide me with a correct commandline as to how to excute this process?

Thanks in advance!

Kompressor

DSPguru
7th December 2002, 10:09
there are two ways to correct delay - lossy and loesless.
loseless means framewise, while lossy means samplewise.
if you don't want to reduce the sound quality of your source ac3, you better remove that 96ms of your track. (i believe that lag of 8ms isn't that bad).
if you insist on shifting exactly 88ms, i would advise you to transcode that ac3 into vorbis (either 2ch or 6chogg), and then you could use -ota( -d -88 ).

as for BeSweet's commandline,
the most important thing you need to know is that "-core( -payload )" means loseless processing.
(usages : joining streams, cutting, asserting negative & positive delay, extracting streams from VOBs/AVIs).

Kompressor
7th December 2002, 17:18
Hi DSPguru!

Thanks for your detailed explanations. With the options so clearly layed out for me, it really makes choosing a lot easier and less doubtful.

As for the consequence, I opt for doing it framewise. Not so much that the quality difference will be so crucial for this situation, but that I've already got my calculations set and video encoding as we speak, and the movie will be kind of crippled if I had used one CD instead.

PS: This movie i'm encoding is a PAL 'Get Carter', the one by Michael Caine. There's a MONO movie soundtrack, and a Stereo commentary. If I happen to transcode the MONO track into ogg using OggMachine, since the lowest choice possible is the 'Stereo' mix, would it produce any ill effects for the final ogg output? As for the tickbox/checkbox for the 'Channel Mode', what kind of mix/behavior will be used if that box is left unchecked?

Kompressor

DSPguru
7th December 2002, 17:30
OggMachine,
mono streams are regarded as two channels (stereo) that have a lot in common (mid) and no difference (side).
no ill effects.

Mr Zippy
23rd December 2002, 19:45
From what I read using AC3 delay corrector or similar is a waste of time as there is no physical delay in the AC3 file, only a timecode that will allowing syncing with the video.

gizmau
7th January 2003, 00:40
cut 4 frame off the ac3 and beginn the video from frame 2, which gives a delay of zero asuming pal.

-88 + (32*4) = + 40 (div40!)

correct the offsets for subtitles and chapters.