View Full Version : Help for advanced frame conversion
Willyfan
17th January 2014, 21:40
I need to write a script for a frame conversion from 25 to 24 fps, but all internal filter are not good for me. I MUST have the same duration of the clip, frame blending is too distructive and frame drop is annoying.
What I want is a results like some hardware Frame Converter.
Many frame converter (not motion compensated) not blend every frame, but only some frames around there is the biggest temporal difference. Sometimes you can set this "window".
For example, if I want a 5 frames "windows" for this conversion (25 to 24) i need to bring, for every second, a clip with frames from 1 to 14, a clip with frames from 11 to 25 and cross-dissolve the first clip with second clip with a 5 frames overlap. So, I have at the end 24 frames from 25 with little impact on image quality 'cause I have only a few frames with "ghost".
Someone can help me?
Many thanks
cretindesalpes
17th January 2014, 23:30
BlankClip (fps=25)
ScriptClip ("ShowFrameNumber (x=sin(current_frame*0.25)*200+320, y=cos(current_frame*0.25)*200+240)")
fps_num = 24
fps_den = 1
smooth = 4
ChangeFPS (FrameRateNumerator () * smooth, FrameRateDenominator ())
ConvertFPS (fps_num * smooth, fps_den)
SelectEvery (smooth, 0)
Willyfan
18th January 2014, 00:46
This script don't work... I have an error: "script error: the named argument "x" to ShowFrameNumber had the wrong type - ([ScriptClip], line 1)
And.. I not understand how it work.... I suppose that this is a test with a blank numbered clip...
Willyfan
18th January 2014, 01:16
Ok, I created an AVI clip numbered and it work. But on my system also function FrameRateNumerator () and FrameRateDenominator () don't work, I changed with 25 and 1:
AviSource("test_numbered.avi")
#BlankClip (fps=25)
#ScriptClip ("ShowFrameNumber (x=sin(current_frame*0.25)*200 + 320, y=cos(current_frame*0.25)*200 + 240)")
fps_num = 24
fps_den = 1
smooth = 4
ChangeFPS (25 * smooth, 1)
ConvertFPS (fps_num * smooth, fps_den)
SelectEvery (smooth, 0)
This work ok!
foxyshadis
21st January 2014, 03:12
You REALLY need to update your Avisynth if you don't have FrameRateNumerator(). That was added in 2.55, 10 years ago.
2Bdecided
21st January 2014, 16:42
Some things you could try: re-edit it. remove a frame or two at every cut / scene-change. only re-time moments when there is little movement. something like that.
I can't imagine how bad ghosting coming and going 5 frames every second looks on, say, a smooth pan. I'm guessing it's horrible. Depends on the content.
Alternatively, you could create different converted versions, and cut between them to always use the best (least bad). e.g. sometimes AVIsynth motion-compensated standards conversion works great, sometimes it falls apart. Sometimes just dropping frames won't be noticeable.
Or just accept the increase in duration from a slow down. :) Pitch-correct the audio if it annoys you.
Some of these ideas are far easier to do on a 3 minute music video than a 90 minute movie. You didn't say what you were working on.
Cheers,
David.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.