Log in

View Full Version : Am I handling Audio Delay Correctly? Any potential A/V Sync Issues?


rkr1958
2nd December 2007, 20:45
Here's what I'm doing.

1. I'm converting VHS tapes to DVD via VCR to Hauppauge USB2 external capture card.

2. Video is 720 x 480. VBR w/max = 6000 kbps & average determined by run time of the video to fit on a SL DVDR.

3. Audio is MPEG1 layer 2 at 384 kbps. I plan audio to convert this audio to ac3 at 192 kbps, which gives me a little more bit rate for the video. However, the biggest reason I want to convert is in order to clean it up using Goldware.

4. After capture, I use DGIndex to generate a d2v file and to extract the audio.

5. I then use VirtualDub to open the d2v file w/audio via an avs script and then save the audio as an wav file for cleanup with Goldwave.

6. Here is an example of the avs script that I use, LoadPlugin(plugin_dir+"DGDecode.dll")
LoadPlugin(plugin_dir+"mpasource.dll")

# source video.
video = MPEG2Source("__20071202_100632.d2v").ConvertToRGB

# load & add audio
audio = MPASource("__20071202_100632 T01 DELAY -44ms.mpa").DelayAudio(-0.044)
# AudioDub(video,audio)
AudioDub(video,audio)

# Get Info (Load file in VirtualDub)
# info()

7. Does my method, as illustrated by the above script, properly account for audio delay?

8. After clean up, including volume adjustment, using Goldwave, I use ffmpeggui to encode the audio to ac3 at 192 kbps.

9. I author using TDA 1.6.

10. In addition to whether or not I'm correctly handing the audio delay, are there any other things in my method that might cause audio/video sync issues?

Guest
9th December 2007, 17:23
This is all beyond the scope of DGIndex. Are you having a sync problem?

Wilbert
9th December 2007, 17:58
Not sure whether that works correctly, try delaying after muxing with the video:

LoadPlugin(plugin_dir+"DGDecode.dll")
LoadPlugin(plugin_dir+"mpasource.dll")

# source video.
video = MPEG2Source("__20071202_100632.d2v").ConvertToRGB

# load & add audio
audio = MPASource("__20071202_100632 T01 DELAY -44ms.mpa")
AudioDub(video,audio).DelayAudio(-0.044)

mgh
12th December 2007, 04:44
Not sure whether that works correctly, try delaying after muxing with the video:

LoadPlugin(plugin_dir+"DGDecode.dll")
LoadPlugin(plugin_dir+"mpasource.dll")

# source video.
video = MPEG2Source("__20071202_100632.d2v").ConvertToRGB

# load & add audio
audio = MPASource("__20071202_100632 T01 DELAY -44ms.mpa")
AudioDub(video,audio).DelayAudio(-0.044)


Have been following above method-both for files from VCDs and DVDs-never faced any sync problems.

Terranigma
12th December 2007, 19:00
For delaying the audio, you should use delaycut (http://jsoto.posunplugged.com/tools/delaycut_1212_exe.zip), and you shouldn't save your audio that way. There's an external avisynth plugin called SoundOut (http://forum.doom9.org/showthread.php?t=120025) by sh0dan, which'll allow you to save your audio to various formats (including pcm).

So, imo.. you should first delay your audio, import it in avisynth, then use soundout to generate the audio file.

rkr1958
15th December 2007, 04:38
This is all beyond the scope of DGIndex. Are you having a sync problem?No sync issue that I've noticed. But I don't know how noticeable 44 msec would be to me. I'm basically wanting to know if my approach is correct or not. I guess to really find out I need a demux with a bigger delay. Then I could try it both ways. However, given Wilbert's experience level versus mine I'm changing my script to add the delay after muxing (as he suggested).

@Terranigma. I'll definitely give your approach a try too.

Thanks for the responses and suggestions.