View Full Version : how to apply filter to just a range of frames?
verydoomed
8th March 2011, 12:52
I want to use the msu filter(msufrc) to slow down part of a clip, so far I have this but it doesnt work as I dont really know how to select a group of consecutive frames.
Avisource("D:\DOCUMENTS\My Videos\CAPTURES\Rouen&Portugal_d2v_vfapi.avi")
Bob()
ConvertToYV12().MSU_FRC(12, "fast")
ApplyRange(764,801,)
AssumeFPS(25)
--------------------------------
have tried this but get the message, slice video framerate doen't match
Avisource("D:\DOCUMENTS\My Videos\CAPTURES\Rouen&Portugal_d2v_vfapi.avi")
Bob()
ConvertToYV12()
A=Trim(0,763)
B=Trim(764,800).MSU_FRC(12, "fast")
C=Trim(800,0)
A+B+C
AssumeFPS(25)
IanB
8th March 2011, 14:33
Avisource("D:\DOCUMENTS\My Videos\CAPTURES\Rouen&Portugal_d2v_vfapi.avi")
Bob()
ConvertToYV12()
A=Trim(0,763)
B=Trim(764,800).MSU_FRC(12, "fast").AssumeFPS(Last)
C=Trim(800,0)
A+B+C
verydoomed
8th March 2011, 15:27
Thanks a million, I will try that. Yep tried it and it works.
I also thought of trying to get smooth slowmotion by using Avisynth MSU Frame Rate Conversion, adding 2 virtual frames between 2 real ones. But dont know how I would write that in a script?
IanB
8th March 2011, 22:53
The methodology is the same. Cut the source into segment clips that you want to process separately. Process the segment clips as required. Adjust the parameters of segment clips that require it to match the rest of the segment clips, e.g. height, width, rate, colour space, audio, etc... Join then back together.
Framerate is frame count divided by duration. If you interpolate extra frames between existing frames and want to display them for the same duration then you must increase the framerate, subject motion will be the same. If you maintain the original frame rate then the duration will be longer, subject motion will be slow-mo.
So use MSU to convert to a faster framerate, 50 or 75fps, this will increase the frame count, then AssumeFPS() it back to the original rate. More frames at the original rate equals longer duration. Also don't forget the audio, TimeStretch() can maintain the pitch while adjusting the duration. ResampleAudio() or SSRC() can adjust the samplerate while leaving the pitch low.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.