Hey all,
I'm having a problem with audio synch. My work flow is AVSPmod -> Virtualdub. I have a string of video clips I would like to process by adding them to my script like avisource "D:\Tape Transfers\File01.avi", "D:\Tape Transfers\File02.avi:, ................"
The AVI files are Huffyuv with no audio synch issues. Audio = 48k 16bit.
When I string the files together in my AVS file and render them back to Huffyuv through Virtualdub the audio falls terribly out of synch by the end of the avi. It starts out in synch then by about the middle of say a 12min video it falls out of synch by a good half second at the end.
If I process the clips seperately using the same filters and workflow the audio is fine on each clip.
Any clues as to what is going on? I like to string stuff together so I can do a big 9-10 hour ru nwhile I'm away from the computer. Doing these one at a time is a slow process.
+ Reply to Thread
Results 1 to 16 of 16
-
-
In Virtualdub, select video/frame rate. Does it say anything about a mismatch between video and audio length ?
-
-
Since you're using AviSynth, AlignedSplice should keep the synch when joining:
http://avisynth.org/mediawiki/AlignedSplice
Or:
http://avisynth.org/mediawiki/EnsureVBRMP3Sync
Any clues as to what is going on? -
Ya, but the final render the audio and video are exactly the same length. On'y the audio is off. Like the sample rate is wonky or something. I dunno.
I'll check out alignsplice. -
It says "AlignedSplice cuts off the first sound track or inserts silence as necessary to ensure that the second sound track remains synchronized with the video. "
Sounds like what I need. So if I have clip1, clip2, clip3 then clip1 will have no sound? I would need to put a buffer AVI as my first clip? -
Clip one will have sound. If the audio is longer than the video, it cuts off the extra. That's what it means by 'cuts off the first sound track'.
Last edited by manono; 17th Sep 2011 at 19:59.
-
What is your actual script?
(ALWAYS give your script when asking an Avisynth question, then everyone can see exactly what you're talking about.)
Something like this should work if the video and audio specs are compatible:
Code:Avisource("File01.avi") ++\ Avisource("File02.avi") ++\ Avisource("File03.avi") ++\ Avisource("File04.avi") ++\ Avisource("File05.avi")
If the AVS file and all the source files are in the same folder you don't need the full path name. -
Thanks for the help everyone. This seems to work:
AlignedSplice(AviSource("D:\Tape Transfers\VHS\Video-Cap1.avi"),AviSource("D:\Tape Transfers\VHS\Video-Cap2.avi"),AviSource("D:\Tape Transfers\VHS\Video-Cap3.avi"),AviSource("D:\Tape Transfers\VHS\Video-Cap4.avi"),AviSource("D:\Tape Transfers\VHS\Video-Cap5.avi"))
But AlanHK, your version looks easier to type. -
Thanks for the clarification. So I would assume, like in my problem, the issue was more like source 3 or 4 in the string of clips. The function seems to truncate the audio on any clip that exceeds to video length in the string. I dunno, it works. I could be magic. Magic is an acceptable explination for me
-
Yep, if the audio is longer than the video, it cuts the audio so it's the same length as the video. That's how you maintain audio synch when joining clips.
You could, I suppose, add black frames to the end of the video to bring it up to the length of the audio. Or duplicate the last video frame as many times as necessary. In some ways that might be preferable since you'd never lose any audio doing it that way. But AllignedSplice works only on the audio. -
Right now I'm rendering using the ++\ we'll see how that works. I like the syntax better. I don't mind droping audio to keep it matching. This is all family footage that will be edited in an NLE after rendering anyway. It's more importent to keep the sound matching the lips.
-
Avisource("File01.avi") ++\
Avisource("File02.avi") ++\
Avisource("File03.avi") ++\
Avisource("File04.avi") ++\
Avisource("File05.avi")
Works swimmingly. Thanks for the help. I just needed clarification on the syntax. -
NB: the "\" means to ignore the linebreak
So it's equivalent to :
Code:Avisource("File01.avi") ++Avisource("File02.avi") ++Avisource("File03.avi") ++Avisource("File04.avi") ++Avisource("File05.avi")
Similar Threads
-
Cutting a flv in Virtualdub - audio synch problems
By Faufiffon in forum Video ConversionReplies: 3Last Post: 1st Sep 2011, 14:49 -
Audio synch problems
By davehaze in forum Newbie / General discussionsReplies: 0Last Post: 18th Jul 2011, 07:27 -
Audio/video synch problems ... again ...
By Diana (Cda) in forum Newbie / General discussionsReplies: 1Last Post: 6th Jul 2011, 21:59 -
Confusion with DGIndex, AviSynth, VirtualDub and audio files
By fatcharlie in forum Newbie / General discussionsReplies: 10Last Post: 1st Mar 2011, 15:49 -
Audio synch problems
By zinc in forum AudioReplies: 4Last Post: 6th Jul 2007, 22:22