PDA

View Full Version : audio delays with directshowsource


magnatique
8th March 2006, 19:05
had some audio delays in the past, which I assumed I got fixed by using only directshowsource and letting it handle the sound as well as video, but my sources were all 5 minutes mov files joined together with ++ (that did the trick, or so I thought)

what happenned was the delay was under half a second by the time it'd hit the end of the mov file, and then get back to normal... so it flew under the radar.


but now, I am working with 20-40 mins mov files, and the audio delay is quite noticeable by the time I reach the end of the file..

I am using virtual dub to encode (although other tools give the same result)

I am using latest quicktime alternative for directshow filter, although earlier versions did the same results.

I tried direct stream copy for both video and audio...

I even tried using only the simplest of scripts possible
DirectShowSource("file.mov")

as the only line... still delays.


using avisynth's latest version as well.


---------

also wanted to give a shot at qtinput...

QTInput("file.mov", audio = true)

as the script... well, I uninstalled qt alternative, reinstalled qt 7 latest version, and am not getting any sound at all from it... any ideas?

foxyshadis
8th March 2006, 19:54
Try DirectShowSource("file.mov",fps=xx.xxx) where fps is whatever number makes your audio and video in sync. If that doesn't work try QTInput with AssumeFPS, although both should be equivalent.

magnatique
8th March 2006, 21:05
did a run with the fps hard set in the command, and it fixed it heh

is there any way for me to have avisynth detect which fps it is, and then writing that automatically in the directshowsource line?

I haven't yet tested the assumeFPS in qtinput you mention, I was having probs getting audio in it, I sent a sample to tateu about it, and he suggested I try something which I will do just now...

let me know if there is a way directly from avisynth if you know any ;)

thanks !

foxyshadis
8th March 2006, 22:47
The only possibility I can think of is to open via qtinput, get the framerate from that, and then feed that to directshowsource for the audio. DSS is pretty unreliable sometimes, unfortunately, and some formats/splitters don't return proper framerates.

IanB
10th March 2006, 02:45
AssumeFPS(FrameCount()*AudioRate(), AudioLength(), False)Basicly FrameRate=Frames/Duration, Duration=AudioSamples/SamplesPerSecond

As many said in the previous thread you need to get each segment correct first then join themV1=video1
A1=audio1
AV1=AudioDub(V1, A1)

V2=video2
A2=audio2
AV2=AudioDub(V2, A2)

AV1 ++ AV2 ++ ....And using ideas 1 and 2 are mutually exclusive (without gobs of stuffing around converting audio and/or video rates to a common standard)