-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hwdec=yes creates artifacts in some hdr youtube videos #14193
Comments
Can confirm, the exact same artifacts at the exact same spots in the exact same frame on a different PC. (but also an RTX 4090). Only with hwdec=yes, other params don’t change a thing. |
Can confirm that all internal hwaccel hwdec have this problem (hwdec=dxva2|d3d11va|d3d12va|nvdec), but decoder wrapper hwdec is fine (hwdec=cuda|vd=vp9_cuvid) |
Likely duplicate of #13533 |
interesting, I had a feeling this would end up another "this is ffmpeg's fault" -- hopefully they merge the pull request; maybe there's a way to reach out to the ffmpeg bois? So what do you suggest is a good bandaid fix for now? setting Or setting the ffmpeg setting mentioned in the other github issue -- and if that's better how would I go about editing an ffmpeg setting; never messed with it before? And would it be possible to have that setting changed only for yt videos -- like be part of my autoprofile
thank you! |
@philipl said he'll merge the patch next week, in the meantime you can build mpv yourself with that commit included in ffmpeg |
Awesome! I dont have any IDEs setup on my current windows install, so this can wait until next week <3 Out of curiosity: If the issue stems from ffmpeg, how come players like MPC-HC and VLC exhibit the same exact issue? Or is the issue not ffmpeg's "fault" -- but ffmpeg is just responsible for the fix? |
You don't need install VS, just use WSL2 to build your own mpv in half an hour.
The bug is caused by ffvp9, so any player using ffmpeg's internal hwaccel will have the same bug, but hwdec=cuda is fine because cuvid uses its own decoder implementation. |
Thanks for the info also sadly hwdec=cuda doesnt actually use my entire gpu I tested it vs. an av1 high bitrate video; and it still pegged my 14900k and dropped a ton of frames -- while hwdec=yes played it back just fine so I'll just wait for the mpv update; my little auto-profile for yt videos with hwdec=cuda will work just fine for now |
If you need, you can try my personal build with vp9 patch. |
Thank you so much <3 |
ffmpeg patch has been merged as FFmpeg/FFmpeg@2b11a8b |
Thanks a lot guys <3 Just for clarification, for the issue to be resolved; do I just need a new ffmpeg.exe or also a new mpv.exe? I'm using Andarwinux's build right now that he posted a bit earlier. What I'm asking is when I run updater.bat, what needs to get updated mpv.exe or just ffmpeg.exe (whenever the releases are made) |
ffmpeg |
I assume shinichiro's next nightly will have the updated ffmpeg? |
yeah it should |
It does! Thanks everybody! I'll stop replying to the issue and stop flooding your inboxs |
mpv Information
Other Information
Reproduction Steps
Enable HDR mode + Nvidia GPU, and run mpv with these commands
This WILL produce artifacts:
mpv --no-config --vo=gpu-next --target-colorspace-hint=yes --target-trc=pq --hwdec=yes https://youtu.be/yCdT448riDY
This will not produce artifacts:
mpv --no-config --vo=gpu-next --target-colorspace-hint=yes --target-trc=pq --hwdec=no https://youtu.be/yCdT448riDY
The only difference between the two commands is
hwdec=yes
(artifacts) andhwdec=no
(no artifacts)Expected Behavior
No Artifacts -.-
Not all YouTube HDR videos produce artifacts with
hwdec=yes
-- for example this video works perfectly:mpv --no-config --vo=gpu-next --target-colorspace-hint=yes --target-trc=pq --hwdec=yes https://youtu.be/njX2bu-_Vw4
Something is going on with how YouTube is compressing videos that make some of them go rip
Actual Behavior
You get artifacts, and they aren't due to a faulty gpu decoder or hardware. It seems to be a software issue on our side.
Window's Media Player plays the file back with no artifacts/issues (download the video with yt-dlp, and played it in Media Player)
I've had multiple friends run the command, and we got the same artifacts, like 1:1 on different gpus. A friend even tried MPC-HC and also got the same artifacts.
A friend all this on a Intel A380 (dedicated GPU) and there where no issues with
hwdec=yes
.If the artifacts are the exact same, and Chrome + Windows Media Player is able to play these videos just fine, it has to be a software issue
Log File
output.txt
Sample Files
Go to "9 seconds" in the video, and then press
.
to go 1 frame forward until the time changes from 9 to 10 seconds; and the artifacts should look something like below:The artifacts are the same regardless of CPU or even the player (MPC-HC produces the same exact artifacts)
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.Etc
As a "bandaid fix" I setup this auto-profile in my mpv.conf for all videos that get piped in from youtube:
Problem is when you pipe in something like a high bitrate av1 8k video, even my 14900k has a hard time with that with just cpu decoding :c
The text was updated successfully, but these errors were encountered: