Call this with 25.0/100; leaving out the parameter will revert to 66:33.
function TASBlend(clip c, float "ratio") {
# reduces framerate to 1/2 but leaves flicker effects partly visible
# blends frame pairs with alternating opacity (default is 2/3+1/3;1/3+2/3)
# optional "ratio" is the opacity of the first frame out of the four
ratio = default(ratio, 2.0 / 3)
opacity1 = round((1 - ratio) * 257)
opacity2 = round(( ratio) * 257)
c
Interleave(Layer(SelectEvery(4, 0), SelectEvery(4, 1), level=opacity1),
\ Layer(SelectEvery(4, 2), SelectEvery(4, 3), level=opacity2))
}
sgrunt:
Could you change part of the TASBlend page, please?
"creaothceann suggests using this in the following fashion to select only certain segments of the clip for blending" -> "If only certain segments of the clip are to be blended, creaothceann suggests using this in the following fashion"
Alright. bsnes has the problem that the framerate of the real SNES is not exactly 60 fps so it needs some adjustment of the audio rate (SNES9x 1.53 also uses 31900 as the default); I thought this problem was related.
There's a bit more to the Youtube issue, but I'm not sure if it would belong to the page...
Some emulators emulate their system not at exactly 60.0 fps. For example SNES9x v1.43 rr17 uses 60.038, but still sets the AVI framerate to 60/1. This causes the video to lag behind the audio, which becomes noticeable in long movies (>15 minutes). It can be fixed by...
1. Setting the framerate to the correct value. But after TASBlend or ChangeFPS it's still larger than 30.0 so Youtube drops frames or halves the framerate again (not sure which one it does now).
2. Slowing the audio down a tiny bit: TimeStretch(rate=100.0 * 60.0 / 60.038)
The latter option is completely unnoticeable and leaves the video intact.
There would have to be a category "perfects all expected situations", i.e. any% with no sequence breaking, focusing simply on speed, energy management and overwhelming the enemies.
Brandon, that YT encode is quite jerky... Try this.
EDIT:
AdjustAudio isn't required if the emulator's sample rate is set to 48000.
Fix_HUD removes the flickering but adds one black line to the HUD.
Makes it easier to insert lots of changes (less typing).
Mister Epic:
Yeah I noticed it; you could also put the "c" on its own line before the Interleave call, and the "int()"s are no longer necessary.
I'm not sure if the flickering would be completely invisible, but it's not true that console games are interlaced (most of the time).
Normally a TV draws every second line, then shifts the vertical position a bit and draws every odd line. The video signal controls when this happens. If consoles (such as the SNES in their default "progressive" mode) reset the position after every half-frame, the odd lines are drawn over the even lines and you get a 60fps picture with halved resolution and black scanlines.
If you're using ConvertToRGB32, it's best to do it right away. ;)
Gimmick and Yoshi's Island are games where I noticed the motion blur being distracting (at 50%). Will try that myself...
If the player supports 60 fps then frame blending isn't required, of course.
Mister Epic:
Afaik Youtube simply drops frames until the framerate is <= 30, so your 30 and 60 uploads should be the same.
Like this. Personally I don't think the blurring is worse than having non-smooth motion or no effect at all.
Btw. don't use interlacing and weaving for this, it can lead to "line jumping" in some cases.
As for a function that "stretches" frames over time, that's what ConvertFPS does, and I think it creates clips where moving objects alternate between blurry and sharp, like bad frameblended 24 fps -> 30 fps video conversions.