As an example of my approach, here is what I used for the Gekisou Sentai Car Ranger encode to Youtube:
function Blend(clip c, float oa) {
Layer(SelectEvery(c, 2, 0), SelectEvery(c, 2, 1), level=int(round(oa * 257)))
}
function Blend2(clip c, float oa) {
Layer(SelectEvery(c, 2, -1), SelectEvery(c, 2, 0), level=int(round(oa * 257)))
}
function Blend3(clip c, float oa) {
Interleave(Layer(SelectEvery(c, 4, 0), SelectEvery(c, 4, 1), level=int(round(oa * 257))),
\ Layer(SelectEvery(c, 4, 2), SelectEvery(c, 4, 3), level=int(round((1.0 - oa) * 257))))
}
AVISource("z.avi")
b=ConvertToRGB32()
AVISource("gekisoulogo.avi")
ConvertToRGB32()
logo=ResampleAudio(48000)
logo=monotostereo(logo,logo)
logo++b
text="Gekisou Sentai Car Ranger TAS\nTime: 6:56.90\nRerecords: 7746\nAuthor: FractalFusion"
subtitle(text,-1,0,771,1071, "Arial", 14, $FFFFFF, lsp=1, align=8)
text="This is a tool-assisted recording.\nFor more information,\nsee http://TASVideos.org/"
b=subtitle(text,-1,0,1071,1371, "Arial", 14, $FFFFFF, lsp=1, align=8)
x1=Trim(b,0,11719)
x2=Trim(b,11720,25403)
x3=Trim(b,25404,27033)
x4=Trim(b,27034,27099)
x5=Trim(b,27100,33380)
y1=Blend(x1,0.75)
y2=Blend2(x2,0.75)
y3=Blend(x3,0.75)
y4=Blend3(x4,0.55)
y5=Blend(x5,0.75)
y1++y2++y3++y4++y5
#27033-27099
#SelectEvery(1,0,0)
#StackHorizontal(b)
I use a simple
...|ev|od|ev|od|...
...|33|66|33|66|...
...| | |...
as the function Blend. Without regard to flicker, this gives a suitable interpolation of motion.
The function Blend2 is the same as Blend, but with even and odd frames reversed. This is useful in some cases. When my character takes damage, the game uses a 3 on 1 off flicker pattern. So Blend might come up with the following situation:
...|1 |1 |0 |1 |1 |1 |0 |1 |...
...|33|66|33|66|33|66|33|66|...
...| 100 | 66 | 100 | 66 |...
So there is not much flicker. However, if I reverse the parity by using Blend2:
...|1 |1 |1 |0 |1 |1 |1 |0 |...
...|33|66|33|66|33|66|33|66|...
...| 100 | 33 | 100 | 33 |...
Here, the flicker is more pronounced.
Finally, I use
...|33|66|66|33|33|66|66|33|...
...| | | | |...
for the 30Hz flicker scene of the Earth turning into fireworks.
I chose the parameters 0.75 (75%) for Blend and Blend2. To me this seems to have the best tradeoff between motion and blur. I chose the parameter 0.55 (55%) for Blend3; I chose not to portray a full-effect flicker due to seizure considerations. For a full-effect flicker at 15Hz, the parameter 1.00 (100%) is used. The flicker level I chose is 10x weaker.
To apply the various blends, I cut the clip into pieces with Trim, applied the appropriate Blend to each one, then spliced them back together.
The SelectEvery and StackHorizontal at the end are commented out; when not, these are used to help compare the frame-blended 30fps video with the original 60fps.
Anyway, the message here is that one single method cannot handle all the deficiencies of 30fps. For example, see
this issue regarding site TASBlend. I find it easier to adjust the video carefully based on particular segments, applying appropriate blends to each one.
Edit: Changed TASBlend to Blend.