VideoHelp Forum




+ Reply to Thread
Results 1 to 19 of 19
  1. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    I am currently working on a big project with Windows Movie maker. Many of the files that I'm working with have unusual framrates (30.12, 30.35, 30.11 ect.) After I put my movie together and publish it, the audio and video are often out of sync on the parts from the movies with the weird framerates. I've tried adjusting the framerate with Virtualdub, but that doesn't work succsesfully with every file, and the resulting movies often have "skips" in them from this.
    Quote Quote  
  2. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Assuming you have Avisynth installed, use a script like this which you can load into VirtualDub:

    Code:
    DirectShowSource("video.wmv", fps=29.97, ConvertFPS=True)
    EnsureVBRMP3sync()
    You can change the assumed framerate, but this locks it and keeps the sound in sync.

    You can join several clips in Avisyth:
    Code:
    DirectShowSource("video1.wmv", fps=29.97, ConvertFPS=True) ++\
    DirectShowSource("video2.wmv", fps=29.97, ConvertFPS=True) ++\
    DirectShowSource("video3.wmv", fps=29.97, ConvertFPS=True) 
    
    EnsureVBRMP3sync()
    Assuming the audio and framesize are compatible.
    You can adjust those with LanczosResize, etc.

    See http://avisynth.org/mediawiki/DirectShowSource
    Quote Quote  
  3. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    The avidsynth method works for some files, but others still come out out-of-sync
    Quote Quote  
  4. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    Use AssumeFPS instead and it should stay in sync.
    Quote Quote  
  5. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    How do I use AssumeFPS? Also, with ConvertFPS, there were still some "skips" in the audio, will AssumeFPS fix that?
    Quote Quote  
  6. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    Oh, wait wait, I don't think I completely comprehend the issue. You have a couple clips, right? Some of them got a normal fps but some got weirdass framerates. Do the weird clips contain audio? If so, is it in sync, or only when you combine them (don't even know how you do that if they got different framerates.)

    How do I use AssumeFPS?
    DirectShowSource("video1.wmv").AssumeFPS(29.97)
    Quote Quote  
  7. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Okay, I'll try to explain this the best I can.

    Yes, the weird clips do have audio. When I watch them indivdually, they're fine (whether in their orginal form or after I changed the framerate)

    Most of the files I'm using have the weird frame-rates, but each of the movies I'm making also have at least 1 normal 29.97 clip in it.

    Right now, converting the weird-framerate files to 29.97 or 30.00 (it varies depending on the clip which one will work better) with virtualdub before editing it in Movie Maker gives me the best results, however, the resulting movie from Windows Movie Maker will often have annoying "skips" in both audio and video peppered throughout it randomly. These skips don't appear when I'm playing the movie in the preview mode in Movie Maker.

    Adjusting the framerate with AssumeFPS and ConvertFPS left skips in the audio and video that were present even before publishing the edited movie with WMM (when I simply changed the framerate with virtualdub, the skips didn't appear until after the WMM movie was published)
    Quote Quote  
  8. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by Xpenguin17
    Use AssumeFPS instead and it should stay in sync.
    What?
    Convertfps in Directshowsource forces variable to constant frame rate.
    That's often a problem in WMV.
    Assumefps is for changing frame rate. They have quite different functions.

    You should always use Convertfps with a WMV regardless of whether you use Assumefps later.

    http://avisynth.org/mediawiki/FPS
    The AssumeFPS filter changes the frame rate without changing the frame count (causing the video to play faster or slower). It only sets the framerate-parameter.
    http://avisynth.org/mediawiki/DirectShowSource
    convertfps = false (in v2.56): When setting it to true, it turns variable framerate video (vfr) into constant framerate video (cfr) by adding frames. This is useful when you want to open vfr video (for example mkv, rmvb, mp4, asf or wmv with hybrid video) in AviSynth. It is most useful when the fps parameter is set to the least common multiple of the component vfr rates, e.g. 120 or 119.880.
    The "adding frames" part may be what is making it choppy, though I never noticed this myself. Depends on how "variable" your VFR is I suppose.

    You could also try FFmpegSource instead of DirectShowSource.
    The syntax is different and it has more overhead, but it gives good results.
    Quote Quote  
  9. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    What do you mean by skips? Choppy video or periodic blanks? Whatever it is, if it only happens when finalizing your project with Windows Movie Maker, I can only advise you to ditch that shit -- stop using movie maker and WMV as they both suck. Finish your movie with Virtual Dub instead and compress with XviD or x264.
    Quote Quote  
  10. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    I'm converting an .avi, not a .WMV
    Quote Quote  
  11. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Okay, just one more question, when editing with Virtualdub, how do I insert part of one clip into another?
    Quote Quote  
  12. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by DaneClark
    I'm converting an .avi, not a .WMV
    Okay, AVI doesn't have VFR, so some of the above is irrelevant.
    (I assumed WMV as why otherwise use Windows Movie Maker, and WMV is renowned for whacky frame rates.)

    If you want to get everythig to the same framerate, say 29.97, try something like :

    Code:
    AVISource("01.avi")
    EnsureVBRMP3sync() 
    Assumefps(29.97,sync_audio=true)
    SSRC(48000,false) # or ResampleAudio(48000) if SSRC throws an error

    Originally Posted by DaneClark
    Okay, just one more question, when editing with Virtualdub, how do I insert part of one clip into another?
    Copy and paste. See the Edit menu, also arrow markers.

    Though I do my editing in Avisynth, using Trim() and ++ commands; mostly I just use VirtualDub to output.
    Quote Quote  
  13. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    If you want to get everythig to the same framerate, say 29.97, try something like :

    Code:
    AVISource("01.avi")
    EnsureVBRMP3sync() 
    Assumefps(29.97,sync_audio=true)
    SSRC(48000,false) # or ResampleAudio(48000) if SSRC throws an error

    That gave me the following error when I tried to open it in virtual dub:

    "Avisynth open failure
    SSRC: could not resample between the to sample rates
    (C:/users/dane jr./desktop/sysreset/download/snorks.avs, line 4)

    Also, when I try to paste something in virtualdub, nothing happens.
    Quote Quote  
  14. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by DaneClark
    That gave me the following error when I tried to open it in virtual dub:

    "Avisynth open failure
    SSRC: could not resample between the to sample rates
    That's what I meant by "or ResampleAudio(48000) if SSRC throws an error"
    Substitute :
    ResampleAudio(48000)
    for the SSRC line. (SSRC gives better results, but doesn't work in all cases).

    Also, 48000 is the standard DVD sample rate. It should work for most other uses too, but 44100 (same as CD audio) is common for AVI and apparently preferred by some.

    Originally Posted by DaneClark
    Also, when I try to paste something in virtualdub, nothing happens.
    Sorry, can't guess what's wrong.

    If you want to start fresh, Avidemux is an excellent AVI editor, though it doesn't support Avisynth input. But it has a lot of internal filters.
    Quote Quote  
  15. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    Originally Posted by DaneClark
    Also, when I try to paste something in virtualdub, nothing happens.
    Are you sure you copied and pasted within the same virtualdub window? You can't copy from another Vdub process if that's what you were doing.

    To make your editting simpler, use the home and end keys to select frames.
    Quote Quote  
  16. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Originally Posted by AlanHK

    You can join several clips in Avisyth:
    [code]DirectShowSource("video1.wmv", fps=29.97, ConvertFPS=True) ++\
    DirectShowSource("video2.wmv", fps=29.97, ConvertFPS=True) ++\
    DirectShowSource("video3.wmv", fps=29.97, ConvertFPS=True)

    See http://avisynth.org/mediawiki/DirectShowSource
    gave me this message

    "Avisynth open failure
    splice:the audio of the two clips have different sample rates, use SSRC()/ResampleAudio()"

    Where do I put that?
    Quote Quote  
  17. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by DaneClark
    Where do I put that?
    One way:

    Code:
    DirectShowSource("video1.wmv",fps=29.97,ConvertFPS=True).ResampleAudio(48000) ++\
    DirectShowSource("video2.wmv",fps=29.97,ConvertFPS=True).ResampleAudio(48000) ++\
    DirectShowSource("video3.wmv",fps=29.97,ConvertFPS=True).ResampleAudio(48000)
    Quote Quote  
  18. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Originally Posted by AlanHK
    Originally Posted by DaneClark
    Where do I put that?
    One way:

    Code:
    DirectShowSource("video1.wmv",fps=29.97,ConvertFPS=True).ResampleAudio(48000) ++\
    DirectShowSource("video2.wmv",fps=29.97,ConvertFPS=True).ResampleAudio(48000) ++\
    DirectShowSource("video3.wmv",fps=29.97,ConvertFPS=True).ResampleAudio(48000)
    I tried that and it gave me a syntax error when I tried to open it.

    I converted the weird framerates to 29.97 and put everything together with Avidemux. When it came out, the part that was originally 29.97 played fine, but the parts that were converted from the weird framrates had the audio playing faster than the video, throwing everything out of wack.
    Quote Quote  
  19. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by DaneClark
    Originally Posted by AlanHK
    Code:
    DirectShowSource("video1.wmv",fps=29.97,ConvertFPS=True).ResampleAudio(48000) ++\
    DirectShowSource("video2.wmv",fps=29.97,ConvertFPS=True).ResampleAudio(48000) ++\
    DirectShowSource("video3.wmv",fps=29.97,ConvertFPS=True).ResampleAudio(48000)
    I tried that and it gave me a syntax error when I tried to open it.
    Please post the exact script you used and the text of the error message produced.
    Quote Quote  



Similar Threads

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