I'm trying to prepare NTSC film (23.976) footage for PAL (25 fps) playback without resorting to the simple speed-up technique or frame duplication (pulldown). I prefer frame blending in this particular scenario.
AVISynth's ConvertFPS function is blending almost every frame, but I'd like to experiment with blending only two frames each second to maintain the original NTSC running time. Is there a method for blending select frames within AVISynth? Something like blending frame #23 and #24 every 1 second, so that frame #24 becomes #25:
... Fr22 | Fr23 | Fr23+24 | Fr24 ...
+ Reply to Thread
Results 1 to 10 of 10
c1 = ChangeFPS(25)
c2 = Trim(0,-1)+Trim(1,0).ChangeFPS(25)
I think this actually blends frames 0 and 1 in every 24, but the effect is the same.
Since your scheme only makes sense for 24 fps (not 23.976), I've added Assume(FPS(24).
This should get you what you want assuming your avi files is progressive.
What these do is double the framerate by duplicating the frames, creating a duplicate clip and offsetting it by 1 frame then overlaying these 2 clips. This produces a clip where one frame is an overlay of the same frame (unblended frame), and the next frame is a blend of two adjacent frames. It then selects 24 of the unblended frames and one of the blended frames giving you 25fps video.
Last edited by Khaver; 22nd Jun 2010 at 16:26.
Thanks to both of you. Your code examples are very helpful.
The original audio assumes the 23.976 rate, so I'll either have to work in some additional frame correction or resample the audio to run several seconds faster over the course of the entire content (approximately 2 hrs). In this case the speed-up would be only 0.1% !!!
My code should take into account the audio changes. That's what the sync_audio=true is for. The first one takes care of the 23.97 to 24 change and the last one takes care of the 24 to 25 change. The resampleaudio just converts it back to a standard samplerate. Put whatever you need in there.
There was a slight bug in my version. Here is a correction, incorporating audio speedup similar to Khaver.
c1 = ChangeFPS(25)
c2 = Trim(0,-1).AssumeFPS(25)+Trim(1,0).ChangeFPS(25)
DGPulldown doesn't duplicate one frame every second but 2 fields every second, resulting in smoother playback. And in my opinion the result will look better than will adding a blurred frame every second which will result in an unnatural looking 'strobing' effect.
DGPulldown was my first method (23.976 > 25), and the results did not look better. I was seeing a 2-jerk/sec effect, which looks terrrible on panning shots and closing credits. It actually looks worse in my opinion than the typical pulldown effect we see on NTSC DVDs.
You're assuming the single blend frame will produce some monstruous blurr every second. It does not. Most of the blend frames throughout the movie are undetectable. Or lets just say, the frequency of prominent blur artifacts is much, much lower than the frequency of jerks. This alone makes this method worth pursuing.
Thanks again for all the comments and thoughts.
Using your expertise and suggestions, here's what I ended up with:
p2=Trim(Film,0,-1).AssumeFPS(25) + Trim(Film,1,0).ChangeFPS(25)
The second section then brings to the footage to PAL rate, but with the original running time.
In the end, the newly converted PAL version presents a running time that is only ~20 msec faster than the NTSC original! This error is less than the duration of a single video frame, so no audio adjustments are need. The original A/V sync is preserved.