VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 33
  1. Hello everyone,

    I've done a lot of avi editing with VirtualDub and Avisynth recently, mostly just cutting videos to shorter versions, fading in and out and filling the space between clips with BlankClip. The problem I have is that often in the resulting avi the point where one clip ends and the next one starts is not clean. Tiny fragments of the video are inserted randomly at the junctions, sometimes at the very beginning of the resulting avi. Sometimes it does not happen, I don't see a pattern. My Avisynth scripts usually look something like this:

    clip1=AviSource("video.avi").Trim(0,733).FadeOut(2 5)
    clip2=AviSource("video.avi").Trim(16775,17060).Fad eIn(25).FadeOut(25)
    clip3=AviSource("video.avi").Trim(17875,18237).Fad eIn(25).FadeOut(25)
    BlankClip(clip1,25)+clip1+BlankClip(clip1,5)+clip2 +BlankClip(clip2,5)+clip3+BlankClip(clip3,100)

    Does anyone have an idea what could cause this? Any help would be greatly appreciated since this issue costs me a lot of time and nerves.
    Quote Quote  
  2. Member gadgetguy's Avatar
    Join Date
    Feb 2002
    Location
    West Mitten, USA
    Search Comp PM
    Try using ++ (aligned splice) instead of + (unaligned splice).
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  3. Originally Posted by gadgetguy View Post
    Try using ++ (aligned splice) instead of + (unaligned splice).
    Thank you, doesn't help though

    Could it have something to do with the frame numbers? With the video I'm editing right now, the transition between clip1 and clip2 is super smooth every time I play it in Virtualdub, but between 2 and 3 it always stumbles. Same source video.
    Quote Quote  
  4. Remux the clips with packed bitstream using Mpeg4Modifier.
    Quote Quote  
  5. Originally Posted by jagabo View Post
    Remux the clips with packed bitstream using Mpeg4Modifier.
    The "Pack" option is greyed out ...
    Quote Quote  
  6. Member gadgetguy's Avatar
    Join Date
    Feb 2002
    Location
    West Mitten, USA
    Search Comp PM
    What type of avi is your source?
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  7. Originally Posted by gadgetguy View Post
    What type of avi is your source?
    Avi 2.0 Xvid
    Quote Quote  
  8. Member gadgetguy's Avatar
    Join Date
    Feb 2002
    Location
    West Mitten, USA
    Search Comp PM
    Instead of loading it 3 times, load it once and trim the segments.
    ie:
    Source=AVISource("Video.avi")
    clip1=Trim(Source,0,733)
    clip2=Trim(Source,16775,17060)
    clip3=Trim(Source,17875,18237)
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  9. Member gadgetguy's Avatar
    Join Date
    Feb 2002
    Location
    West Mitten, USA
    Search Comp PM
    Also try using Dissolve instead of FadeIn and FadeOut
    ie:

    Source=AVISource("Video.avi")
    clip1=Trim(Source,0,733)
    clip2=Trim(Source,16775,17060)
    clip3=Trim(Source,17875,18237)
    Space=Blankclip(Source,56)
    Dissolve(Space,clip1,Space,clip2,Space,clip3,Space ,25)
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  10. Originally Posted by gadgetguy View Post
    Also try using Dissolve instead of FadeIn and FadeOut
    ie:

    Source=AVISource("Video.avi")
    clip1=Trim(Source,0,733)
    clip2=Trim(Source,16775,17060)
    clip3=Trim(Source,17875,18237)
    Space=Blankclip(Source,56)
    Dissolve(Space,clip1,Space,clip2,Space,clip3,Space ,25)
    I think we're getting somewhere! Haven't encoded yet, but in VD it looks good. I'll try. Thanks a lot!
    What do the numbers 56 and 25 in the last two lines mean?
    Quote Quote  
  11. Member gadgetguy's Avatar
    Join Date
    Feb 2002
    Location
    West Mitten, USA
    Search Comp PM
    56 is the length of the Blank Clip, 25 is the number of frames to overlap each clip with the next.
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  12. Originally Posted by gadgetguy View Post
    56 is the length of the Blank Clip, 25 is the number of frames to overlap each clip with the next.
    Works like a charm, thank you very much!
    Quote Quote  
  13. ... I had to dig this up - it turns out it's not entirely solved. Your code works much better and I always use something like it now. However, there still is one glitch after the first BlankClip. One frame (or a couple) that belong somewhere later in the video get(s) inserted. This is the script I'm working with:

    Source=DirectShowSource("grace.mp4", convertfps = true)
    clip1=Trim(Source,28693,40947)
    clip2=Trim(Source,51000,56740)
    clip3=Trim(Source,63174,68187)
    Space1=BlankClip(Source,125)
    Space2=BlankClip(Source,70)
    Dissolve(Space1,clip1,Space2,clip2,Space2,clip3,Sp ace1,25)

    Any ideas? Thank you!
    Quote Quote  
  14. DirectShowSource() is known not to be frame accurate. Use ffmpegSource() instead.

    http://code.google.com/p/ffmpegsource/

    Or Convert the video to a lossless intermediate like huffyuv or lagarith. Then perform all the editing and final encode with that lossless intermediate.
    Quote Quote  
  15. Originally Posted by jagabo View Post
    DirectShowSource() is known not to be frame accurate. Use ffmpegSource() instead.

    http://code.google.com/p/ffmpegsource/

    Or Convert the video to a lossless intermediate like huffyuv or lagarith. Then perform all the editing and final encode with that lossless intermediate.
    Thanks, but I can't get it to work I copied ffms2.dll, ffms2.avsi and ffmsindex.exe to the Avisynth plugin folder and ran the .exe, but VirtualDub keeps saying "Script error: there is no function named "ffmpegSource"". Can you tell me how to properly install it? The documentation doesn't say so much about that.

    And just out of interest, how would a conversion to HuffYUV solve this? Do you know what causes the problem?
    Quote Quote  
  16. Originally Posted by Sebastian2011 View Post
    I copied ffms2.dll, ffms2.avsi and ffmsindex.exe to the Avisynth plugin folder and ran the .exe, but VirtualDub keeps saying "Script error: there is no function named "ffmpegSource"".
    Maybe you should be trying 'FFVideoSource' instead? Or 'FFmpegSource2', if wanting to include the audio and video together in one line?
    And just out of interest, how would a conversion to HuffYUV solve this?
    Then you can use AVISource on the resulting AVI. It'll be frame accurate and the filtering can be done without worries. If it were I, I'd say don't ever use DirectShowSource if you can possibly avoid it.
    Quote Quote  
  17. I should have been more clear. After installing the ffmpegsource plugins use:

    Code:
    aud=ffAudioSource("filename.ext")
    vid=ffVideoSource("filename.ext")
    AudioDub(vid,aud)
    TheRestOfYourFilters()
    Or:

    Code:
    FFMpegSource2("video.ext", atrack=-1)
    TheRestOfYourFilters()
    Quote Quote  
  18. Thanks, I'll try that out later and report back.
    Quote Quote  
  19. Hm ... VirtualDub still gives me the "Script error: there is no function named "ffmpegSource"" message. I tried both variants.
    Quote Quote  
  20. It ffmpegsource2(). Note the "2".
    Quote Quote  
  21. Originally Posted by jagabo View Post
    It ffmpegsource2(). Note the "2".
    Same error, only with a "2" added.
    Quote Quote  
  22. Did you put ffms2.dll ffmsindex.exe and ffms2.avsi in your avisynth plugins folder? You might as well put ffms2.html there too for easy access.
    Quote Quote  
  23. Originally Posted by jagabo View Post
    Did you put ffms2.dll ffmsindex.exe and ffms2.avsi in your avisynth plugins folder? You might as well put ffms2.html there too for easy access.
    Yes, it's all there!
    Quote Quote  
  24. Are you running 64 bit Windows? 64 bit programs require 64 bit components (readers, splitters, codecs, filters), 32 bit programs require 32 bit components. Ie, if you're running 64 bit VirtualDub you need 64 bit AviSynth and 64 bit filters.
    Quote Quote  
  25. Originally Posted by jagabo View Post
    Are you running 64 bit Windows? 64 bit programs require 64 bit components (readers, splitters, codecs, filters), 32 bit programs require 32 bit components. Ie, if you're running 64 bit VirtualDub you need 64 bit AviSynth and 64 bit filters.
    No, it's all 32. Just downloaded the latest (newer) ffmpegsource version and made sure it wasn't the 64 one. Same problem. Weird. DirectShowSource.dll is in the same plugins folder and that one works.
    Quote Quote  
  26. I don't know what the problem is at this point. It sounds like you have everything set up properly. Try using ffvideosource("filename.ext") and see if that works just to get the video.
    Quote Quote  
  27. Originally Posted by jagabo View Post
    I don't know what the problem is at this point. It sounds like you have everything set up properly. Try using ffvideosource("filename.ext") and see if that works just to get the video.
    Didn't work, but I googled around and found a script that used a line like

    LoadPlugin("D:\path\ffms2.dll")

    at the beginning, tried it, and now it works! I'm very sorry if it was stupid of me not to put that in, but I never needed something like it before. Thanks for all your effort!
    Quote Quote  
  28. Weird, dll plugins in the plugins folder are suppose to load automatically.
    Quote Quote  
  29. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Are you sure you are putting the plugins in the right folder?
    Avisynth gets the plugin folder name from registry key
    HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth\plugindir2_5

    You can use RegEdit to check if this folder matches what you expect.
    Quote Quote  
  30. Originally Posted by Gavino View Post
    Are you sure you are putting the plugins in the right folder?
    Avisynth gets the plugin folder name from registry key
    HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth\plugindir2_5

    You can use RegEdit to check if this folder matches what you expect.
    This is it. I installed AviSynth on partition D but it still put the plugins folder in C:\program files\Avisynth. I got fooled because there is a plugins folder in the AviSynth directory on D as well. Not sure how DirectShow made it into the right one, but whatever ...

    Thanks a bunch!
    Quote Quote  



Similar Threads

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