Log in

View Full Version : Audio - Video sync issue


ect5150
24th August 2011, 04:59
Hey guys... I have a problem that has come up and just want some expert eyes. I have what I consider a standard script:

video = DirectShowSource(".\graph.grf", audio=false).AssumeFPS(24000,1001)
audio = DirectShowSource(".\TDK.ac3")
AudioDub(video,audio)
trim(110000,110999)

I've used things like this in the past, but the audio and video are WAY out of sync. Oddly enough, if I do NOT trim the video or audio and encode the entire movie - there is no sync issue as it is a straight rip from a disc to the harddrive when the two streams are muxxed.

Through my own testing, apparently the video isn't seeking properly, and the frame number 110,000 isn't actually displaying frame number 110,000 - but apparently the sound is spot on.

Here is the clip imported into VitrualDubMod (click to enlarge):
http://i119.photobucket.com/albums/o150/ect5150/misc/th_453c217f.jpg (http://i119.photobucket.com/albums/o150/ect5150/misc/453c217f.jpg)
Please note the frame number that VirtualDubMod displays is not the frame number that the ffdshow OSD displays.

Also, here is my graph from graph edit if it matters:
http://i119.photobucket.com/albums/o150/ect5150/misc/th_b8dd9b71.jpg (http://i119.photobucket.com/albums/o150/ect5150/misc/b8dd9b71.jpg)


Any suggestions? What am I doing wrong - or let me know if I need give more info? I've reinstalled most of the software and still get the same problem.

Emulgator
24th August 2011, 09:00
A:Why Assumefps here? It is not needed at all and if this assumption is wrong, everything that follows is wrong.
B: DirectShowSource is convenient for straight playback, but may well be not frame-accurate, especially for seeking.
(I guess the called libavcodec is rather built for straight playing back without seeking or frameserving in mind.)

If your source is VC-1 (WVC1) and you happen to have a recent NVIDIA Card,
for any serious frameserving you will want to use neuron2's DGDecNV (15USD), now in version 2040,
or nevcairiel's LAV CUVID Decoder or nevcairiel's LAVFilter (free), the latter both I haven't tested yet.

Because you have mkv as container, the choice of the splitter is important too.
In Graph Edit: Right-click on source-> Properties. The used splitter will show.
I use an older Haali (1.9.42.0), a newer LAV Splitter should work as well, nevcairiel has made some fixes recently.

ect5150
24th August 2011, 11:25
A:Why Assumefps here? It is not needed at all and if this assumption is wrong, everything that follows is wrong.It seemed I once had one encode that needed it, so I just left it in as a standard line in my script. I have tried to remove it once already though with no success.

B: DirectShowSource is convenient for straight playback, but may well be not frame-accurate, especially for seeking.
(I guess the called libavcodec is rather built for straight playing back without seeking or frameserving in mind.)

If your source is VC-1 (WVC1) and you happen to have a recent NVIDIA Card,
for any serious frameserving you will want to use neuron2's DGDecNV (15USD), now in version 2040,
or nevcairiel's LAV CUVID Decoder or nevcairiel's LAVFilter (free), the latter both I haven't tested yet.

I suspected this somewhat, but didn't really know of the many alternatives. I knew of DGDecNV but I wasn't aware of the others. I'll give those a shot.

Because you hve mkv as container, the choice of the splitter is important too.
In Graph Edit: Right-click on source-> Properties. The used splitter will show.
I use an older Haali (1.9.42.0), a newer LAV Splitter should work as well, nevcairiel has made some fixes recently.

The splitter is Haali 1.11.96.14. I'll play around with those as well. I appreciate the help and will report back when i get chance to swap some of these out.

Thanks!

ect5150
25th August 2011, 00:43
Well, just to report. The problem is fixed. I'm in one of those situations where I'm not 100% positive what did it. I tried everything mentioned above with no success. I finally uninstalled everything and installed the CCCP pack. That actually fixed the issue.

I do appreciate the help though! Thanks! :thanks: