Ashyni / mpv-scripts

dynamic-crop.lua script for mpv player/lib.
MIT License
81 stars 4 forks source link

Problem with HEVC 10bit videos and strange lua error #3

Closed nipkownix closed 3 years ago

nipkownix commented 3 years ago

First of all, thanks for your work. This script is really shaping up to be amazing.

Unfortunately, I'm having a couple of issues. The first one is this:

image

I noticed it seems to happen whenever I start mpv in a paused state, which is how I always do it. Deleting lines 513, 514 and 516 allows me to proceed, but I'm not sure what's going on here.

The other issue is related to HEVC 10bit video files. This "loop" happens when playing such files:

image

The formats keep changing during the entire playback. This causes some heavy stutter on my machine, specially if I'm using vapoursynth filters.

I'm not sure if anything can be done about this, but if you want to test for yourself, the HEVC 10bit video I used is "jellyfish-90-mbps-hd-hevc-10bit.mkv" from this page: https://jell.yfish.us/

Ashyni commented 3 years ago

Hello, i have fix the first error but i can't reproduce the second one with jellyfish-90-mbps-hd-hevc-10bit.mkv.

If you can post your mpv.conf, i will try it.

nipkownix commented 3 years ago

Thanks for taking a look. I'm glad the first issue is fixed.

About the second one, I was also suspecting my mpv.conf could be the issue, and apparently the issue only happens if I use hwdec=auto-copy and hwdec-codecs=all. It is weird I'm hitting this problem only with HEVC 10bit videos though, so... maybe it is a driver issue, considering these options are related to hardware decoding?

In any case, here's my mpv.conf:

https://pastebin.com/ngL3CUk8

Ashyni commented 3 years ago

Hey, it's a big config file compare to mine, from what i have read about hwdec (mpv-doc), it's better to leave it disable =no to avoid issue. You can still use gpu-api= (mpv-doc) because vo=gpu is the default (mpv-doc).

Here is my mpv.conf

## General
profile=gpu-hq
gpu-api=vulkan # if driver issue, use opengl/d3d11
fbo-format=rgba16hf #rgba16f for gpu-api=opengl, rgba16hf for vulkan/d3d11
# sub-fix-timing=yes
# pause

## Log - Debug
# log-file=C:\Users\<username>\AppData\Roaming\mpv\mpv.log

## Scripts
script=C:\Users\<username>\source\repos\mpv-scripts\autocrop.lua
#script=C:\Users\<username>\source\repos\mpv-scripts\splitter.lua
#script=C:\Users\<username>\source\repos\mpv-scripts\autotop.lua

## Load external with (almost) the same name as the video
#audio-file-auto=fuzzy #default exact
#sub-auto=fuzzy #default exact

## Interpolation, need to check v-sync option in driver.
# interpolation
# video-sync=display-resample
# tscale=box
# tscale-window=sphinx
# tscale-radius=0.9 #lower (e.g. 0.95) = sharper; higher (e.g. 1.05) = smoother 
# tscale-clamp=0.0    

## Shaders
linear-downscaling=no # for SSimDownscaler
# sigmoid-upscaling=no #for adaptive-sharpen
glsl-shader="C:\Users\<username>\AppData\Roaming\mpv\shaders\FSRCNNX_x2_8-0-4-1.glsl"
glsl-shader="C:\Users\<username>\AppData\Roaming\mpv\shaders\KrigBilateral.glsl"
glsl-shader="C:\Users\<username>\AppData\Roaming\mpv\shaders\SSimSuperRes.glsl"
glsl-shader="C:\Users\<username>\AppData\Roaming\mpv\shaders\SSimDownscaler.glsl"
# glsl-shader="C:\Users\<username>\AppData\Roaming\mpv\shaders\adaptive-sharpen.glsl" # anime    

Can't really do much more, i let you close the issue.

nipkownix commented 3 years ago

Alright, not messing with hwdec works for me. Thanks a lot!