Is there any media player that can do black frame insertion?

Everything about displays and monitors. 120Hz, 144Hz, 240Hz, 4K, 1440p, input lag, display shopping, monitor purchase decisions, compare, versus, debate, and more. Questions? Just ask!
Post Reply
User avatar
RealNC
Site Admin
Posts: 3756
Joined: 24 Dec 2013, 18:32
Contact:

Is there any media player that can do black frame insertion?

Post by RealNC » 24 Sep 2016, 11:23

The usual suspects (meaning MPC-HC, MPV and VLC) do not offer any BFI mode. Is there such a thing? I would love to experiment with 60FPS video on 120Hz and BFI.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Glide
Posts: 280
Joined: 24 Mar 2015, 20:33

Re: Is there any media player that can do black frame insert

Post by Glide » 24 Sep 2016, 19:11

If you install ffdshow and AviSynth and set ffdshow as the decoder in MPC-HC, this code should work:

Code: Select all

AssumeFPS(60000,1000)
Interleave(last      , BlankClip(last      ))
AssumeFPS(120000,1000)
You're probably not going to get good results unless you're viewing this on a CRT, or possibly an OLED display though.
I used a modified version of this to have my CRT display two black frames for every film frame at 72Hz, effectively displaying a native 24Hz - which flickered terribly, but had amazing motion clarity and smoothness.

User avatar
masterotaku
Posts: 436
Joined: 20 Dec 2013, 04:01

Re: Is there any media player that can do black frame insert

Post by masterotaku » 25 Sep 2016, 08:08

This is the code I use in AviSynth:

Code: Select all

Original = last
Black=Original.Blankclip()
Interleave(Original,Black,Black,Black,Black)
That's for 24fps videos at 120Hz, for example. The number of "Black"s you need depends on the fps of the video and your refresh rate (you have to fill it completely). For 60fps videos at 120Hz, that last line would be "Interleave(Original,Black)".
CPU: Intel Core i7 7700K @ 4.9GHz
GPU: Gainward Phoenix 1080 GLH
RAM: GSkill Ripjaws Z 3866MHz CL19
Motherboard: Gigabyte Gaming M5 Z270
Monitor: Asus PG278QR

User avatar
RealNC
Site Admin
Posts: 3756
Joined: 24 Dec 2013, 18:32
Contact:

Re: Is there any media player that can do black frame insert

Post by RealNC » 25 Sep 2016, 09:24

Alright, will have to experiment. I'm on Linux (at least for video watching), and it seems I can only get Vapoursynth. Will need to see how to do this in Python.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

User avatar
RealNC
Site Admin
Posts: 3756
Joined: 24 Dec 2013, 18:32
Contact:

Re: Is there any media player that can do black frame insert

Post by RealNC » 25 Sep 2016, 12:26

Got it to work. And in the end... it's not worth the effort.

For 24FPS video, the flicker in 120Hz is extreme. However, 144Hz works perfectly fine with no flicker if you do this:

(This is for MPV, which passes "video_in".)

Code: Select all

import vapoursynth as vs

core = vs.get_core()
clip = core.std.AssumeFPS(video_in, fpsnum=24)
blank = core.std.BlankClip(clip)
clip = core.std.Interleave(clips = [blank, clip, blank, clip, blank, clip])

clip.set_output()
So basically, you're gonna get pretty much the same result as with a 72Hz strobing backlight, except the colors and contrast are worse :mrgreen: So yeah. Not worth it.

It is weird though that 120Hz produces 24Hz flicker. I would have assumed that using:

Code: Select all

[blank, clip, clip, clip, clip]
would result in 96Hz flicker. But apparently that's not the case? But most probably I don't understand the whole vapoursynth/avisynth thing yet. It's the first time I ever touched this thing.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Glide
Posts: 280
Joined: 24 Mar 2015, 20:33

Re: Is there any media player that can do black frame insert

Post by Glide » 25 Sep 2016, 14:29

RealNC wrote:So basically, you're gonna get pretty much the same result as with a 72Hz strobing backlight, except the colors and contrast are worse :mrgreen:
That's because you're using an LCD. With CRT, and theoretically OLED, color and contrast should be unchanged.
RealNC wrote:It is weird though that 120Hz produces 24Hz flicker. I would have assumed that using:

Code: Select all

[blank, clip, clip, clip, clip]
would result in 96Hz flicker. But apparently that's not the case? But most probably I don't understand the whole vapoursynth/avisynth thing yet. It's the first time I ever touched this thing.
Wouldn't that be 24Hz flicker with 80% persistence since it's only flashing the image once. (assuming sample-and-hold display)

Using 30 FPS since that divides evenly:
[blank, clip, clip, clip] would have 30Hz flicker with 75% persistence.
[blank, blank, clip, clip] would have 30Hz flicker with 50% persistence.
[blank, blank, blank, clip] would have 30Hz flicker with 25% persistence.
[blank, clip, blank, clip] would have 60Hz flicker, since you are flashing each frame twice - but this would result in double images when anything moves.

User avatar
RealNC
Site Admin
Posts: 3756
Joined: 24 Dec 2013, 18:32
Contact:

Re: Is there any media player that can do black frame insert

Post by RealNC » 25 Sep 2016, 14:50

Glide wrote:
RealNC wrote:It is weird though that 120Hz produces 24Hz flicker. I would have assumed that using:

Code: Select all

[blank, clip, clip, clip, clip]
would result in 96Hz flicker. But apparently that's not the case? But most probably I don't understand the whole vapoursynth/avisynth thing yet. It's the first time I ever touched this thing.
Wouldn't that be 24Hz flicker with 80% persistence since it's only flashing the image once. (assuming sample-and-hold display)
Oops, you are correct of course. Brain fart on my part.

The only useful thing that can be done with this, is watching 60FPS on 120Hz without the double-image effect of 120Hz strobing. But then again, 60FPS video already has low motion blur.

Of course there's the option of motion interpolation from 24 to 60, and then chain the BFI at the end. Although I don't like motion interpolation, so...
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Glide
Posts: 280
Joined: 24 Mar 2015, 20:33

Re: Is there any media player that can do black frame insert

Post by Glide » 26 Sep 2016, 06:25

Well if your display supports 144Hz that should give you more options, as you could update it at 48Hz/72Hz.
But that's still not going to look very good since you'd end up with multiple images being displayed when things move across the screen.

I had hoped that 24Hz with a high persistence might have acceptable levels of flicker, because displaying 24 FPS video at 24Hz made such a difference to the motion quality on my CRT. Video was basically as smooth as you normally see with high levels of interpolation, but without the distortion/interpolation errors.

Those are really your only options for 24 FPS video though - display it at a native 24Hz and put up with flicker, or interpolate to 48/72Hz and display with a low persistence. Anything else results in significant motion blur and/or judder.

janos666
Posts: 16
Joined: 15 Dec 2017, 18:50

Re: Is there any media player that can do black frame insert

Post by janos666 » 15 Dec 2017, 20:52

If somebody is still interested, I think I figured out how to do this for 24 fps @ 120 Hz display without annoying flickering:

Code: Select all

F = last
B = F.Blankclip()
Interleave(F,B,F,B)
SelectEvery(8, 0,1, 2,3,2, 5,4, 7,6,7)
I am not sure if this could be refined/optimized (I have very limited scripting skills) but it seems to get the job done.
I borrowed the last line from a "2:3 pulldown" example script to achieve 60/60 BFI without keeping the display at the same frame (either black or "source") for two refresh cycles (which causes disturbing flicker).

The first line is what you get without the 2:3 conversion and the second one is probably what you want instead:
FBFBFFBFBFFBFBF
FBFBFBFBFBFBFB

This is why 144 works much better (compared to 120Hz) without the last line (144Hz doesn't need this trick).

Edit: After I understood the logic behind that line I borrowed, I refined the script a little bit. It should now be easier to understand what happens: first, it creates 240 fps from 24 fps (which allows this sub-sequence to start with F and finish B [or vice versa], rather starting and ending with either F or B which results in visible flicker) and then it drops half the frames but with an eve/odd rotation (to achieve an even 60/60 distribution in the longer sequence with no doubling of FF or BB where the sub-sequences meet).

Code: Select all

F = last
B = F.Blankclip()
Interleave(F,B,F,B,F,B,F,B,F,B)
SelectEvery(4, 0,1)

Post Reply