VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. 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.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    In Virtualdub, select video/frame rate. Does it say anything about a mismatch between video and audio length ?
    Quote Quote  
  3. Originally Posted by davexnet View Post
    In Virtualdub, select video/frame rate. Does it say anything about a mismatch between video and audio length ?
    No, under that menu I see no such information. Though I am running video is full processing mode and audio in direct stream. Cound this cause the problem?
    Quote Quote  
  4. 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?
    Apparently the audio, at least for some of them, isn't the same length as the accompanying video.
    Quote Quote  
  5. 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.
    Quote Quote  
  6. 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?
    Quote Quote  
  7. 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.
    Quote Quote  
  8. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by magillagorilla View Post
    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:, ................".
    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")
    The ++ does an aligned splice.
    If the AVS file and all the source files are in the same folder you don't need the full path name.
    Quote Quote  
  9. 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.
    Quote Quote  
  10. Originally Posted by manono View Post
    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'.
    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
    Quote Quote  
  11. Originally Posted by magillagorilla View Post
    The function seems to truncate the audio on any clip that exceeds to video length in the string.
    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.
    Quote Quote  
  12. 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.
    Quote Quote  
  13. 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.
    Quote Quote  
  14. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    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")
    Shorter lines with logical breaks make it easer to manage.
    Quote Quote  
  15. Sweet, So I can use "\" anywhere in the script to ignore a linebreak?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!