Variable Framerate H.264 to record GSYNC/FreeSync?

Advanced display talk, display hackers, advanced game programmers, scientists, display researchers, display manufacturers, vision researchers & Advanced Display Articles on Blur Busters. The masters on Blur Busters.
Post Reply
User avatar
Chief Blur Buster
Site Admin
Posts: 11647
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Variable Framerate H.264 to record GSYNC/FreeSync?

Post by Chief Blur Buster » 19 Jun 2017, 14:52

Hello,

A little known tidbit is that H.264 video supports variable frame rates.

Normally designed to transition between 24fps, 30fps and 60fps, it can transition framerate every frame interval.

Has anyone ever conducted experiments with variable-framerate video recording to flawlessly record GSYNC/FreeSync gameplay videos?

Obviously, we'd need a specific video player that outputted the frames to Direct3D to allow GSYNC/FreeSync to sync to the video framerate in realtime.
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

Image
Forum Rules wrote:  1. Rule #1: Be Nice. This is published forum rule #1. Even To Newbies & People You Disagree With!
  2. Please report rule violations If you see a post that violates forum rules, then report the post.
  3. ALWAYS respect indie testers here. See how indies are bootstrapping Blur Busters research!

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

Re: Variable Framerate H.264 to record GSYNC/FreeSync?

Post by RealNC » 19 Jun 2017, 16:08

I'm using mpv for g-sync playback (with the SMPlayer front-end), but I don't know of any recording tool that can produce VRR video.

The options to make mpv work well with g-sync are:

Code: Select all

--video-sync=audio --opengl-backend=win --opengl-swapinterval=0 --blend-subtitles=video
The can be added in the "Advanced" section of SMPlayer, in the "MPlayer/mpv" tab. It works in fullscreen; windowed mode cannot be g-synced.

The options are documented here:

https://mpv.io/manual/master

The crucial option is "--opengl-backend=win", which results in the player using an exclusive OpenGL context when in full-screen. This also means that the UI of SMPlayer is not visible though when in full-screen (the playback bar at the bottom cannot be displayed.) mpv can also be used on its own without a front-end, in which case you get a UI (rendered by mpv itself in OpenGL.) Obviously this means it's a bare-bone player in that case. However, it's probably the best video player you can find for g-sync.
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
sharknice
Posts: 295
Joined: 23 Dec 2013, 17:16
Location: Minnesota
Contact:

Re: Variable Framerate H.264 to record GSYNC/FreeSync?

Post by sharknice » 19 Jun 2017, 21:37

Maybe someone could try adding it to Open Broadcaster Software. It's open source recording and streaming software.

https://github.com/jp9000/obs-studio

User avatar
Chief Blur Buster
Site Admin
Posts: 11647
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: Variable Framerate H.264 to record GSYNC/FreeSync?

Post by Chief Blur Buster » 20 Jun 2017, 13:25

Great to hear that mpv/SMPlayer is a video player that works with both GSYNC/FreeSync.

One of us may need to test an existing variable frame rate file (A file with two frame rates in one MP4 file) and see if GSYNC/FreeSync adapts. If so, then we might have player already compatible with VRR recordings. Now we need to generate a true VRR video test file to test the concept.

They are considered problematic by many players, and are not hosted by video services. One of us might have to just splice together a 24fps and a 60fps file together in a VRR video file, and see how mpv reacts to that.

We were the world's first website with a HTML5 embedded 120fps 1080p gameplay video, so we're ready to help trailblaze VRR gameplay video. Web browsers won't be VRR for a long time yet (but we're helping to change that) but at least we have SMPlayer, potentially.

If both the recorder and player can co-operate with variable-framerate H.264 video files, this would be a fantastic demonstration of fully preserved variable-refresh-rate video.

And a funny side effect is that GSYNC gameplay video recordings would work on FreeSync systems. And vice-versa.

BlurBusters would be happy to start a BountySource pot for this feature... I'd even personally throw in an initial $100!

Would anybody be interested in coding VRR game recording & playback?
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

Image
Forum Rules wrote:  1. Rule #1: Be Nice. This is published forum rule #1. Even To Newbies & People You Disagree With!
  2. Please report rule violations If you see a post that violates forum rules, then report the post.
  3. ALWAYS respect indie testers here. See how indies are bootstrapping Blur Busters research!

Post Reply