I'm having a problem where frames are being cut off, and placed out of order. I can't seem to figure just what the mistake might be in the code:
AudioDub(FFAudioSource("Clip1.mp4"),FFVideoSource( "Clip1.mp4",fpsnum=30000, fpsden=1001,threads=1)).Trim(4533,4788)Amplify(0)+ AudioDub(FFAudioSource("Clip2.mp4"),FFVideoSource( Clip2.mp4",fpsnum=30000, fpsden=1001,threads=1)).Trim(150, 5596)+Trim(6024, 6238)+Trim(6684, 6886)
The problem seems to be that Clip 2 leaves out the last two trims entirely, and bumps the last two frames of Clip1 to the very end.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
-
Probably an issue with "implied last" . The last few trims don't specify which clip you are referring to, so it references the last one (the one that is already trimmed previously)
If you explicitly tell which clip reference to apply trim to, you should avoid those problems
Also you should use "aligned splice" when joining clips with audio ("++")
Code:clip1=AudioDub(FFAudioSource("Clip1.mp4"),FFVideoSource("Clip1.mp4",fpsnum=30000, fpsden=1001,threads=1)) clip2=AudioDub(FFAudioSource("Clip2.mp4"),FFVideoSource("Clip2.mp4",fpsnum=30000, fpsden=1001,threads=1)) clip1.Trim(4533,4788).Amplify(0) ++ clip2.Trim(150, 5596) ++ clip2.Trim(6024, 6238) ++ clip2.Trim(6684, 6886)
-
Ah okay, that worked perfectly. I'll have to remember to put "Clip" before Audiodub from now on. Thank you very much.
-
And Thank You from me also poisondeathray for the same problem I had been having with a GUI I have been working on that occasionally did the same thing. Big Thank You!
-
Just a little tip or two.... you can make it a bit more readable and easier to modify when the trim count is high like this:
Code:clip1=AudioDub(FFAudioSource("Clip1.mp4"),FFVideoSource("Clip1.mp4", fpsnum=30000, fpsden=1001, threads=1)) clip2=AudioDub(FFAudioSource("Clip2.mp4"),FFVideoSource("Clip2.mp4", fpsnum=30000, fpsden=1001, threads=1)) clip1.Trim(4533,4788).Amplify(0)\ ++ clip2.Trim(150, 5596)\ ++ clip2.Trim(6024, 6238)\ ++ clip2.Trim(6684, 6886)
For the record, ffmpegsource2 combines video and audio from the same source and the function is built into ffms2.dll these days. You do have to specifically enable the audio with "atrack", but I thought I'd mention it as I find the simpler I can make a script, the less confused and bewildered I become.
Code:clip1=ffmpegsource2("Clip1.mp4", fpsnum=30000, fpsden=1001, threads=1, atrack=-1) clip2=ffmpegsource2("Clip2.mp4", fpsnum=30000, fpsden=1001, threads=1, atrack=-1) clip1.Trim(4533,4788).Amplify(0)\ ++ clip2.Trim(150, 5596)\ ++ clip2.Trim(6024, 6238)\ ++ clip2.Trim(6684, 6886)
-
It's actually the helper function in the .avsi, not the .dll . Some people don't use the .avsi and have to call FFAudioSource, FFVideoSource explicitly
EDIT: You're right, they changed it in v 2.22, the function is merged into the .dll
Another option if many trim calls are being made, or different filtered versions of videos are being combined in different sections is to use RemapFrames, RemapFramesSimple, or clipclopLast edited by poisondeathray; 9th Aug 2016 at 09:32.
Similar Threads
-
Problem with multiple using of 'Trim' filter in Avisynth
By Balbes in forum Video ConversionReplies: 6Last Post: 19th Dec 2015, 07:15 -
avisynth: how trim using for example 0:00:31.040000 ?
By marcorocchini in forum Newbie / General discussionsReplies: 9Last Post: 31st Oct 2014, 15:07 -
Avisynth, need image duration help (trim?)
By Genex9 in forum EditingReplies: 10Last Post: 23rd Jan 2014, 18:53 -
AviSynth Overlay and Trim Help
By NMeade in forum Newbie / General discussionsReplies: 20Last Post: 1st Apr 2012, 07:53 -
How do I trim audio with AVIsynth?
By Nagashi in forum AudioReplies: 4Last Post: 2nd Oct 2011, 10:13