Skip to content
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

VC-1 videos played with nvdec or vdpau show green screen #15715

Open
6 tasks done
seadra opened this issue Jan 21, 2025 · 12 comments · May be fixed by #15737
Open
6 tasks done

VC-1 videos played with nvdec or vdpau show green screen #15715

seadra opened this issue Jan 21, 2025 · 12 comments · May be fixed by #15737

Comments

@seadra
Copy link

seadra commented Jan 21, 2025

mpv Information

mpv v0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Nov 27 2024 18:31:26
libplacebo version: v7.349.0
FFmpeg version: n7.1
FFmpeg library versions:
   libavcodec      61.19.100
   libavdevice     61.3.100
   libavfilter     10.4.100
   libavformat     61.7.100
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100

Other Information

- Linux version: Arch Linux
- Kernel Version: Linux desktop 6.6.68-1-lts #1 SMP PREEMPT_DYNAMIC Fri, 27 Dec 2024 15:16:06 +0000 x86_64 GNU/Linux
- GPU Model: 3070
- Mesa/GPU Driver Version: OpenGL version string: 4.6.0 NVIDIA 565.77
- Window Manager and Version: kwin_wayland 6.2.5
- Source of mpv: official Arch Linux mpv package
- Latest known working version:
- Issue started after the following happened:

Reproduction Steps

As reported in issue #4820 (closed without being fixed), playing VC-1 videos with hwdec=nvdec or vdpau causes a green screen to be shown only.
vo=gpu with hwdec=auto-safe and hwdec=auto also results in the same issue, but not specifying hwdec at all fixes the green screen issue.

Expected Behavior

Video to be shown

Actual Behavior

Green screen is shown

Log File

mpv-log.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@llyyr
Copy link
Contributor

llyyr commented Jan 21, 2025

Probably not a mpv bug, VC-1 hwdec is known to be broken on many GPUs (and is also useless, therefore no real desire to fix). Report to Nvidia if you care I guess

@guidocella
Copy link
Contributor

I had the same issue and saw multiple other users with it who couldn't even understand that hwdec was the cause, which is why I proposed not hardware decoding VC-1 by default in #12407

@ValeZAA
Copy link

ValeZAA commented Jan 21, 2025

Nvidia does support VC-1, and on windows with nvdec-copy it works just fine; besides seeking, that causes "BUG in ffmpeg" warnings.

CPUs no longer support it since Intel Arrow Lake.

VC-1 was broken before, but meh #5131

@seadra
Copy link
Author

seadra commented Jan 21, 2025

Since it somehow doesn't work on Linux, shouldn't hwdec=auto-safe (and perhaps hwdec=auto as well) disable hardware decoding for VC-1?

Having hwdec somehow on is necessary (for >=4K H.265 and AV1 videos for example), so it would be nice to have a hwdec which turns it on with the exception of some known blacklisted cases, like VC-1 on nvdec on Linux. Based on the documentation, I think hwdec=auto-safe is supposed to do this

--hwdec=<api1,api2,...|no|auto|auto-safe|auto-copy>
Specify the hardware video decoding API that should be used if possible. Whether hardware decoding is actually done depends on the video codec. If hardware decoding is not possible, mpv will fall back on software decoding.

so that part is an mpv issue, no?

@seadra
Copy link
Author

seadra commented Jan 21, 2025

As a workaround, I changed my mpv.conf as follows to disable hardware decoding on vc1 only:

vo=gpu
hwdec=nvdec
hwdec-codecs=h264,hevc,vp8,vp9,av1,prores

@amariami
Copy link

As a workaround, I changed my mpv.conf as follows to disable hardware decoding on vc1 only:

hwdec-codecs=h264,hevc,vp8,vp9,av1,prores 

--vd=help --hwdec=help that's a lot

@Dudemanguy
Copy link
Member

Do we care about hardware decoding VC-1 by default? I'm guessing not really and if so I'd be in favor of just merging #12407 and calling it a day since nvidia is probably never going to fix this. Otherwise, we could design some kind of fancy auto value for hwdec-codecs that changes depending on the hwdec API but I'd rather not go through all that effort.

@kasper93
Copy link
Contributor

kasper93 commented Jan 25, 2025

I'd be in favor of just merging #12407 and calling it a day

In this case, could we add a warning when hwdec=yes and codec is excluded in hwdec-codecs which would otherwise be used? Probably only if it is at default value. hwdec-codecs is pretty obscure config option and people most likely will never notice why decoding is disabled and at best blame driver/hardware support.

@Dudemanguy
Copy link
Member

A warning sounds OK to me in that case.

@philipl
Copy link
Member

philipl commented Jan 25, 2025

That's reasonable to me too.

Dudemanguy added a commit to Dudemanguy/mpv that referenced this issue Jan 25, 2025
It's known to be broken on several drivers/hwdecs. hwdec for vc1 is
probably not very useful in practice so just disable it by default.

Closes mpv-player#15715.
Dudemanguy added a commit to Dudemanguy/mpv that referenced this issue Jan 25, 2025
It's known to be broken on several drivers/hwdecs. hwdec for vc1 is
probably not very useful in practice so just disable it by default.

Closes mpv-player#15715.
@truexfan81
Copy link

not sure about nvidia or intel but amd radeon 7000 series cards don't support hwdec for mpeg2video or vc1

guidocella added a commit to guidocella/mpv that referenced this issue Jan 25, 2025
We have reports of vc1 videos showing a green screen on both nvdec and
vaapi, and new AMD GPUs don't support it all, so remove it from the
default hwdec-codecs.

Fixes mpv-player#15715.
guidocella added a commit to guidocella/mpv that referenced this issue Jan 25, 2025
We have reports of VC-1 videos showing a green screen on both nvdec and
vaapi, and new AMD GPUs don't support it all. Also there is no need to
hardware decode VC-1 videos since nobody produces 4k VC-1 videos. So
remove it from the default hwdec-codecs.

Fixes mpv-player#15715.
@guidocella guidocella linked a pull request Jan 25, 2025 that will close this issue
guidocella added a commit to guidocella/mpv that referenced this issue Jan 25, 2025
VC-1 with nvdec shows a green screen, and users may not understand that
it is caused by hwdec and that disabling it is the fix. It can break
displaying videos on vaapi too
(https://gitlab.freedesktop.org/mesa/mesa/-/issues/12525).

Also new AMD GPUs don't support hardware decoding VC-1 at all
(https://en.wikipedia.org/wiki/Video_Core_Next). This slows down startup
time if hardware decoding is attempted anyway, especially with
--hwdec=auto.

Also there is no need to hardware decode VC-1 videos since nobody
produces 4k VC-1 videos.

Just remove it from the default hwdec-codecs, it is not worth
implementing a system to guess whether it will work depending on the
GPU.

Fixes mpv-player#15715.
guidocella added a commit to guidocella/mpv that referenced this issue Jan 26, 2025
VC-1 with nvdec shows a green screen, and users may not understand that
it is caused by hwdec and that disabling it is the fix. It can break
displaying videos on vaapi too
(https://gitlab.freedesktop.org/mesa/mesa/-/issues/12525).

Also there is no need to hardware decode VC-1 videos since nobody
produces 4k VC-1 videos.

Just remove it from the default hwdec-codecs, it is not worth
implementing a system to guess whether it will work depending on the
GPU.

Fixes mpv-player#15715.
guidocella added a commit to guidocella/mpv that referenced this issue Jan 26, 2025
VC-1 with nvdec shows a green screen, and users may not understand that
it is caused by hwdec and that disabling it is the fix. Also there is no
need to hardware decode VC-1 videos since nobody produces 4k VC-1
videos.

Just remove it from the default hwdec-codecs, it is not worth
implementing a system to guess whether it will work depending on the
GPU.

Fixes mpv-player#15715.
@kasper93
Copy link
Contributor

Since this is a NVIDIA proprietary driver issue on Linux. The only way to resolve this issue is to open support ticket or warranty claim for the product you own. This way the issue can be forwarded to people who actually can fix it. There is nothing we can do on mpv to fix hwdec here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants