Topic: Mpv 4k hdr choppy

Im using latest mpv player and Im unable to play 4k hdr 60 fps with my current setup. Its choppy regardless settings.
4790k, 16gb ram, 1080ti.
My workaround to make this work is to resize the video to 1080p and let tv upscale it.
Which processor would I need to get this to work if even possible atm?

Re: Mpv 4k hdr choppy

8-cores Ryzen is good wink
Or you can go for the full HW acceleration on Turing cards

Also ensure you're using SVP's build of mpv cause it contains 4K performance patch.

Re: Mpv 4k hdr choppy

Will try svp build when I come home.
So latest shinchiro build don't contain 4k patch?

Re: Mpv 4k hdr choppy

nope
https://github.com/mpv-player/mpv/pull/6262

5 (edited by xerno 05-04-2019 14:16:27)

Re: Mpv 4k hdr choppy

Ok I tested with svp build its better but still too chopy even at lowest settings as my cpu hits 100%. I have to get a ryzen 7 I guess tongue
btw do all turing cards peform the same in svp?

Re: Mpv 4k hdr choppy

> still too chopy even at lowest settings as my cpu hits 100%

btw, turn off "output it 10bit color depth"

>  I have to get a ryzen 7 I guess

i7-8700 or later must be good too smile

> do all turing cards peform the same in svp?

in theory - yes

Re: Mpv 4k hdr choppy

ok turning of 10bit allowed me to play 1 step over lowest quality.
But doesnt that remove alot of hdr colorspace?

Re: Mpv 4k hdr choppy

4790K @ 4.6Ghz and a GTX 1070. I watch 4K @ 48FPS HDR content without any lag. Took me a while to get the settings right. You don't need 60FPS with 4K, 48FPS works great too, here are my settings for MPV. You must be using the paid version though, create a new profile for 4K content, for 1080p content use your own working profile if you want:

Settings 1: https://i.imgur.com/LIxztsk.jpg

Settings 2: https://i.imgur.com/XHXI2KN.jpg

Also I have outer lighting DISABLED, just right click SVP, go outer lighting, and click DISABLED. Then go video frame and un-tick "detect and cut off black bars", you don't need that, especially for movies/shows that change ratios.

As for MPV, you need to create a mpv.conf in the MPV configuration folder, make sure the bold area is your username and you have hidden files enabled:

C:\Users\YourUsernameHere\AppData\Roaming\mpv

Use notepad, then change the extension to .conf

Here is what you type in the notepad document below, and save it in the MPV directory I just typed two lines above, create that mpv folder if it doesn't exist in Roaming:

profile=gpu-hq
fbo-format=rgba16hf
gpu-api=vulkan
gpu-context=winvk
hwdec=nvdec
vo=gpu
spirv-compiler=shaderc

priority=high

scale=ewa_lanczossharp
cscale=ewa_lanczossharp
dscale=ewa_lanczossharp
dither-depth=auto
correct-downscaling=yes
sigmoid-upscaling=yes
deband=yes
deband-iterations=4
deband-threshold=50
deband-range=16
deband-grain=0

vd-lavc-dr=yes
vd-lavc-threads=16

hdr-compute-peak=yes

Re: Mpv 4k hdr choppy

Hi I tried those settings but still choppy.
Here is a sample of video file info

Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 57.4 GiB
Duration                                 : 2 h 23 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 57.3 Mb/s
Movie name                               : Aquaman 4K
Encoded date                             : UTC 2019-03-15 16:15:43
Writing application                      : mkvmerge v32.0.0 ('Astral Progressions') 64-bit
Writing library                          : libebml v1.3.7 + libmatroska v1.5.0

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 2 h 23 min
Bit rate                                 : 52.7 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.265
Stream size                              : 52.8 GiB (92%)
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : R: x=0.680000 y=0.320000, G: x=0.265000 y=0.690000, B: x=0.150000 y=0.060000, White point: x=0.312700 y=0.329000
Mastering display luminance              : min: 0.0050 cd/m2, max: 4000.0000 cd/m2
Maximum Content Light Level              : 1506 cd/m2
Maximum Frame-Average Light Level        : 459 cd/m2

Re: Mpv 4k hdr choppy

xerno wrote:

ok turning of 10bit allowed me to play 1 step over lowest quality.
But doesnt that remove alot of hdr colorspace?

mpv does hdr tone mapping in all cases

Re: Mpv 4k hdr choppy

I just watched Aquaman tonight, same file size, same video file info. I had 0 dropped frames and 0 delayed with the settings I posted. Is your CPU running at default clocks or do you have a cooler on it and have it overclocked.

Oh and one thing I forgot to mention earlier, I use process lasso to set MVP & SVP to always run at VERY HIGH PRIORITY. I found it definitely helps in 4K content if they are set to VERY HIGH PRIORITY.

Re: Mpv 4k hdr choppy

Strange. Mine is oc to 4.6.
How do see osd status in mpv?

13 (edited by James D 05-04-2019 21:19:35)

Re: Mpv 4k hdr choppy

Blackfyre wrote:

Oh and one thing I forgot to mention earlier, I use process lasso to set MVP & SVP to always run at VERY HIGH PRIORITY. I found it definitely helps in 4K content if they are set to VERY HIGH PRIORITY.

Main>Setup>Priority = 2
@Chainik. I don't remember whether I informed or not but my mpv was playing very jerky when browser interactions happened until I set this to 2. Since then stutters are rare and bearable on such occasions.

Re: Mpv 4k hdr choppy

xerno wrote:

Strange. Mine is oc to 4.6.
How do see osd status in mpv?

Press "i" will show it temporarily. Use capital letters, so put CAPS LOCK on and press "I" so it stays on screen to monitor dropped frames, stats, etc.

Re: Mpv 4k hdr choppy

James D wrote:
Blackfyre wrote:

Oh and one thing I forgot to mention earlier, I use process lasso to set MVP & SVP to always run at VERY HIGH PRIORITY. I found it definitely helps in 4K content if they are set to VERY HIGH PRIORITY.

Main>Setup>Priority = 2
@Chainik. I don't remember whether I informed or not but my mpv was playing very jerky when browser interactions happened until I set this to 2. Since then stutters are rare and bearable on such occasions.

Yep big difference between setting MPV to very high priority and keeping it at normal. There's a scene in Blue Planet 2 (4K HDR), in episode 5, that starts around the 39 minute mark and continues to about 42 minutes where there is a lot of camera panning and a lot of very small fish moving very fast on screen which is by far the heaviest TASK that I have thrown at SVP video wise. Same settings, same everything, on NORMAL cpu priority it drops around 60 frames in those 3 minutes, on very high priority, 0 frames dropped. I always test that scene first whenever I make changes to my settings.

Re: Mpv 4k hdr choppy

Well, SVP actually by default should set priority of mpv to above normal instead of normal. Are you sure it doesn't for you?

Re: Mpv 4k hdr choppy

Im slowly getting it to work smoothly now with all your help.
However now I noticed this problem.
When using svp I get color banding. without svp running it shows correct.
First picture is without svp second is with.
https://imgur.com/a/8qmQsyS

Re: Mpv 4k hdr choppy

You disabled 10 bit = slight banding.

19 (edited by xerno 06-04-2019 09:16:50)

Re: Mpv 4k hdr choppy

Ok when 10bit is disabled I can get it smooth. With it on its impossible with svp index around 0.8, cpu 40%.
But 10bit is really needed because the banding is horrible on my 82 inch tv.
Resizing to 2560x1440 works aswell but if I go over that number it starts to drop frames

Re: Mpv 4k hdr choppy

which 82-inch tv doesn't have motion interpolation built-in?

Re: Mpv 4k hdr choppy

It does but it's bad. Every 3 second it drops frames

Re: Mpv 4k hdr choppy

Xerno, are you sure you done the MPV configuration I posted above? I have the same processor, running the same speed, and a slower videocard, with no issues. Also for Processing threads in the setting pictures you posted, you haven't added +6 threads to PROCESSOR Threads.

You should be able to watch 10Bit 4K HDR content fine with the settings I posted. MPV settings are very important because they set MPV to use Vulkan, which performs a lot better than DX11. I also watch on a TV, my PC is connected to my TV. CPU usage sometimes hits 90% with no frame delay or drops.

Re: Mpv 4k hdr choppy

Blackfyre I did test your settings earlier.
However when using hwdec=nvdec svp will not activate. I have to use hwdec=nvdec-copy.
I tried the +6 threads but it did no difference so I left it to default.
Another problem is using the mpv version bundled with svp is that it keep changing brightness/color depending on scene, this do not occur with latest version of mvp.
When I play a 4k hdr movie without svp my cpu is around 5% and 20% gpu.
With svp on it goes to 60-80% cpu and 20% gpu.
Now this is working without frame drops as long as its resizing to 2560x1440.
Playing the movie without resizing or scaling over 2560x1440 creates stuttering but it does not increase gpu or cpu load. and it will work if 10bit is not activated.
Its strange that we both have similiar rigs but I cant achive the same results as you.
I will get a turing card later and see if that helps with my situation.
For now this is what I use for some better hdr tonemapping.

input-ipc-server=mpvpipe
profile=gpu-hq
gpu-api=vulkan
hwdec=nvdec-copy

profile-desc=cond:p["video-params/primaries"]=="bt.2020"
hdr-compute-peak=yes
tone-mapping=reinhard
icc-profile=C:\mpv\AdobeRGB1998.icc
tone-mapping-param=0.38
icc-contrast=inf
screen=0
fs
fs-screen=0
sid=1

Re: Mpv 4k hdr choppy

> Another problem is using the mpv version bundled with svp is that it keep changing brightness/color depending on scene, this do not occur with latest version of mvp.

this's exactly what "hdr-compute-peak" option does

===
ah, I see a bunch of commits on Feb, 18 about hdr peak detection, brightness etc.
maybe it's time to update our build too smile

Re: Mpv 4k hdr choppy

Chainik wrote:

ah, I see a bunch of commits on Feb, 18 about hdr peak detection, brightness etc.
maybe it's time to update our build too smile

YAY UPDATE smile

xerno wrote:

Its strange that we both have similiar rigs but I cant achive the same results as you.
I will get a turing card later and see if that helps with my situation.

Xerno, another question, do you have the CPU Cores unparked? By that I mean is your CPU always running at 4.6Ghz? Even when idle? or does it ramp up and go down based on demand?

I have my CPU cores unparked, they're always running at 4.6GHz. Another thing I've done is use this tool below to disable "Meltdown" and "Spectre" Protection, which have a performance hit on our CPU much more than the newer CPU models. Restart after disabling both.

https://www.grc.com/inspectre.htm

Use at your own risk obviously, but I haven't had issues.