I have recently been authoring a small program to auto-create avisynth code to splice together multiple video files that have each had the first and last few frames trimmed off of them. My avisynth abilities are only in the beginner state, however, and I am having problems with just the simple splicing. I have been using Virtual Mod to double check on everything.
Basically I have multiple files that are in an h.264 format and I have been using DirectShowSource to load them. When I attempt to splice some of them however it causes some strange problems. One most demonstrative example that I have witnessed was just doing a test with 3 files. The videos for the beginning and last one played and rendered just fine, but the middle one was stuck on the first frame. Noticeably, the sound spliced correctly for all three.
Thank You for any help you all might be able to give me, or any threads/articles you might be able to link me to.
My avisynth version I think is the most up-to-date one.
Thank You
+ Reply to Thread
Results 1 to 8 of 8
-
-
Because I had been continuing to tweak everything, I did not have the same script as the example I had stated earlier.
So I used my little program I had made to generate a small script which seems to be messed up. Sadly though parts of it work part of the time, and it was just confusing.
I left the trim part in there in hopes of hitting two birds with one stone, as it seems to offset the audio a little leaving blank spots at the end of each subclip. Though that question does not necessarily have to be answered in this post.
Code:clip=DirectShowSource("C:\Users\Adam\Videos\The_Fan_Film\VID00002.AVI") smallclip=DirectShowSource("C:\Users\Adam\Videos\The_Fan_Film\VID00003.AVI") smallclip=trim(smallclip,5,FrameCount(smallclip)-5,true) clip=clip++smallclip smallclip=DirectShowSource("C:\Users\Adam\Videos\The_Fan_Film\VID00004.AVI") smallclip=trim(smallclip,5,FrameCount(smallclip)-5,true) clip=clip++smallclip smallclip=DirectShowSource("C:\Users\Adam\Videos\The_Fan_Film\VID00008.AVI") smallclip=trim(smallclip,5,FrameCount(smallclip)-5,true) clip=clip++smallclip Return clip
Because it seems to work in certain situations I think it may just be a rendering problem. As I said before I'm using VirtualMod to test this. -
If the audio is VBR use
EnsureVBRMP3sync()
which does what it says. Otherwise you lose sync when doing any Trims or joins.
You don't need "true" in the Trims, that's the default.
Currently clips 1,3, and 4 all play with sound, but the 2nd clip does not load the video.
You might try ffmpegsource2() instead of DirectShowSource.
Though if you have ffdshow, it pretty much amounts to the same thing. -
I don't know if the audio is VBR, but I will check.
I meant that 2.avi, 4.avi, and 8.avi all played the video, whereas 3.avi did not.
I had ffdshow installed, but I am not sure if everything is enabled correctly.
And just now I installed the ffms2 plugin and put it into avisynth's directly. I also have the haali media splitter installed. For some reason though, even with the LoadPlugin, it is not recognizing the FFmpegSource2() function. I tried out FFvideoSource() and that at least loads (I've yet to know if my person problem would still be encountered). Do you know why it's not recognizing the function?
Do I need to have ffdshow or Haali Media Splitter configured any special way or anything?
Thank You for your assistance. -
-
While away from an internet connection I was able to write the code with just the video/audio sources as separate, but I now have the FFmpegSource2 working properly also. So thank you very much. Everything is now working just fine.
So if I'm going to be working with other avi formats, or other film formats in general, am I going to have to change which plugin it uses every time? -
There are several specialised "Source" filters.
See http://avisynth.org/mediawiki/Importing_media
Often several filters can open a media file, but there may be advantages in choosing one over the other -- as you've seen.
DirectShowSource() can open most files, using your Windows codecs. But it can be inaccurate as to seeking to an exact frame. So take care when trimming.
ffmeg2source can also open almost everything and is very robust. You'll notice it builds an index file the first time it is called on a file, once that's done it's pretty quick and accurate. So this might be a good choice if you wanted to choose one for your batch files to generate.
AviSource() is the simplest though and I always try that first. Sometimes it doesn't give all the audio to the end of a video, so I first check that the audio and video length are the same (to within a second), using the Info command in VDub.Last edited by AlanHK; 14th Jul 2010 at 02:24.
Similar Threads
-
Splicing WVC-1?
By Tim likes movies in forum EditingReplies: 2Last Post: 21st Feb 2011, 18:54 -
Noob needs help trimming, splicing, audio with AviSynth
By PapaDmitry in forum EditingReplies: 39Last Post: 6th Jul 2010, 09:53 -
splicing HD and SD formats together with AviSynth
By PapaDmitry in forum EditingReplies: 2Last Post: 5th Jul 2010, 05:25 -
AVISynth splicing many AVCHD clips - is it possible?
By Redrussky in forum Video ConversionReplies: 4Last Post: 4th May 2008, 18:18 -
tape splicing
By CogoSWSDS in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 9Last Post: 3rd Jan 2008, 07:44