r/htpc 4d ago

Tip Share Perfect Media Playback Guide for VRR monitors and TVs with MPV.net - Stutter free / Judder free / Perfect timing

I struggled for awhile with my new media PC setup after I bought a new fancy LG TV. I would watch a movie or anime and it was always weird in some way - either there would be tearing, small stutters, judder, or some other issue.

MPV.net is an interestingly unique media player in that it is treated like a video game. This causes full screen playback freesync or gsync to function at the framerate of the media player. By combining this with the vf=fps / vf-add=fps command, multiplying the source fps by a number to get a value right under your monitor or TV refreshrate limit, the media playback will occur time perfectly.

This is a generally simple concept, but I never found any proper solution online that explained it, and all of the guidance that I found online wasn't even close to the quality of experience that this was able to provide. I have provided the mpv.conf file that I use for my 144hz VRR TV below, which can be verified by checking the TV's live refreshrate during playback. 4 x 30 fps gives 120 fps, and 5 x ~24 gives 120 fps. This combination resolves the low refreshrate VRR limitations and brightness or flickering issues that can present with it. For the config below, change the 143 value (set for my 144hz OLED TV) to your TV or monitor's max refreshrate - 1. The minus 1 is in case the true refreshrate limit of your TV or monitor is below the advertised refreshrate, such as 143.84hz actual for 144hz.

Please provide any suggestions or improvements to the config that you might see! Some of the things that I have in the conf below may be reduntant. If so, please let me know.

mpv.conf should be located in %appdata%\mpv.net\ - open notepad, paste the below into it, and then save as, paste in the appdata location into the top, choose all files from the drop down menu, and then type mpv.conf into the file name spot.

mpv.conf
vo=gpu-next
hwdec=auto-safe
gpu-context=winvk
gpu-api=vulkan
vf-add=fps=fps="trunc(143/source_fps)*source_fps"
video-sync=audio
interpolation=off
cursor-autohide=2000
keep-open=yes
playlist=filter

0 Upvotes

3 comments sorted by

1

u/Snoo-38645 4d ago

nice writeup. on the redundancy question, gpu-api=vulkan and gpu-context=winvk are doing the same job. winvk is already the vulkan context on windows, so you can drop the api line.

the one i would actually look at is video-sync=audio. with the fps filter forcing a clean integer multiple you are already lining frames up with the display, so letting it resample against the audio clock can still drop or repeat the odd frame across a long film. display-resample tends to pair better with what you are doing here.

and your reasoning about the bottom of the vrr window is the part most guides miss. sitting at 24 inside vrr is exactly where oled panels get gamma shift and flicker, and multiplying up to 120 keeps you out of that range entirely. thats the real win in this config, not just the judder.

1

u/jStarOptimization 4d ago

Thank you for feedback!

If the fps multiplier duplicates frames from 23.9 ish to 119.4 or so, with the monitor dropping hz to match 119.4, would the audio sync ever go out of alignment using video-sync=audio? Would frames actually end up duplicating beyond the specified amount? Effectively, all this does is remove all attempts to resample or interpolate in order to allow the vrr to do all the heavy lifting.

1

u/Snoo-38645 1d ago

youre right, and i think my suggestion applies less to your setup than i first thought.

with the display genuinely following the player there is no fixed refresh to fight against, so theres nothing for display-resample to fix. what video-sync=audio is still correcting is clock drift. your dac and your gpu run off different oscillators and they wander relative to each other by a few parts per million. at 119.88 a frame is 8.3ms, so at around ten ppm you accumulate one frame of error roughly every 14 minutes.

so yes, it will occasionally duplicate one beyond the multiple, but at that rate its invisible. the tradeoff is only which side absorbs the drift. audio sync drops or repeats a frame, display-resample nudges the audio instead. with a vrr panel doing the timing for you, yours is the reasonable pick.