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.
+ Reply to Thread
Results 1 to 30 of 33
-
-
Try using ++ (aligned splice) instead of + (unaligned splice).
"Shut up Wesley!" -- Captain Jean-Luc Picard
Buy My Books -
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. -
What type of avi is your source?
"Shut up Wesley!" -- Captain Jean-Luc Picard
Buy My Books -
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 -
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 -
-
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 -
-
... 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! -
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? -
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? -
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()
Code:FFMpegSource2("video.ext", atrack=-1) TheRestOfYourFilters()
-
Hm ... VirtualDub still gives me the "Script error: there is no function named "ffmpegSource"" message. I tried both variants.
-
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.
-
-
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! -
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!
Similar Threads
-
Avisynth Clips Wrong Size
By sambat in forum Newbie / General discussionsReplies: 5Last Post: 30th Jan 2011, 19:36 -
AVISynth splicing many AVCHD clips - is it possible?
By Redrussky in forum Video ConversionReplies: 4Last Post: 4th May 2008, 18:18 -
Joined avi file conversion problem
By siberian50 in forum MacReplies: 12Last Post: 26th May 2007, 19:04 -
Revised Question: Problem playing joined file on windows media player
By Johnny_Blaze in forum Newbie / General discussionsReplies: 1Last Post: 15th May 2007, 12:25 -
Problem Viewing joined hjsplit .avi file in Windows Media Player
By Johnny_Blaze in forum Newbie / General discussionsReplies: 1Last Post: 13th May 2007, 16:22