Log in

View Full Version : How to deal with AC-3 audio codec


whugemann
10th July 2006, 20:13
I digitised some older video tapes by use of my digital video recorder. Now I would like to process the VOB files by rendering some short scenes into AVI. I have done that several times before using the MPEG2Source and the according PlugIn. Now for the first time, I need the audio information, too. (I usually only dump the frames to my disk.)

My video recoder encodes audio in Dolby Digital, i.e. AC-3 and MPEG2Source doe not give me the audio information (?). DirectShowSource gives me the audio, but produces errors that I used to evade by using MPEG2Source.

So how do I read the AC-3 audio from the VOB file and interweave it with the video?

Guest
10th July 2006, 21:04
Read the Quick Start guide that comes with DGMPGDec ("Sure, Sure, But What About My Audio"). Use NicAudio.dll.

http://neuron2.net/dgmpgdec/QuickStart.html

Oswald Bastable
11th July 2006, 01:50
DGIndex (from the DGMPGDec pack neuron mentioned) can demux the ac3 audio while creating a .d2v file for indexing the video frames.

Headac3he can be used to convert from ac3 to either .wav or mp3 without loss of audio sync when the video and audio is remuxed, but as far as cutting pieces of the audio and remuxing in synch with cut pieces of the video...that's beyond what I've done with the programs so far.

I've used virtualdubmod to remux after processing and the audio is always in sync, but again, that's always using the entire video and audio stream...not pieces.

Mug Funky
11th July 2006, 05:55
besplit might be able to handle lossless splitting of ac3 on a frame-by-frame basis. IIRC ac-3 has 31.25 frames per second, which is an odd sort of number. audio desync will at worse be half of that number, ie 1/62.5 = 16ms which is not much.

[edit]

oh, btw, cuttermaran can cut ac3. i'm sure there's other proggies that do it too. i use a proprietary one, so i can't really share it

Boulder
11th July 2006, 09:21
DelayCut does the trick as well.

whugemann
12th July 2006, 17:53
With your hints, I succeded, using DGMPGDec and HeadAC3che.

AC3Source does not seem to work with AVIsynth 2.5, see also http://forum.doom9.org/showthread.php?t=56571, where karl_lillevold asks "Can for instance AC3Source in Avisynth 2.5x be made to work?"

On my computer, trying to read the AC3 File via AC3Source resulted in an error: "Invalid Arguments to function AC3Source."

Possibly, the filter is outdated as the newest DLL available stems from January 2003. The link to it now resides at http://www.avisynth.org/warpenterprises/attic.html, while the link given in http://neuron2.net/dgmpgdec/QuickStart.html aims at the up-to-date filters.

In regard to the short scene rendering I have probably been misunderstood: I want to select them in VirtualDub, having read the AVS file. This seems to work perfectly.

Thanks for all your hints!

Boulder
12th July 2006, 18:18
Use NicAC3Source, you need the plugin NicAudio.dll.

However, if you import audio in the Avisynth script, it will be decoded to WAV. If you wish to use the original file, you need to cut the AC3 file with a specific tool that won't do any re-encoding.