ffmpeg, mpv: enable hardware-accelerated decoding with CUDA #54392
+4
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
NVIDIA users can now use
mpv --hwdec=nvdec
to play videos that the software decoders cannot keep up with.I did not touch any configure options, so this should hopefully not cause build errors on unsupported platforms/versions.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)I tested a very similar change applied to
master
, and I don't really have the build resources to teststaging
right now, so I am hoping someone can test this onstaging
.Test with
mpv --hwdec=nvdec --msg-level=vd=debug ...
and check mpv's output to make sure it doesn't fall back to software decoding.8K test content that plays fine at 1.0-1.7x on a 1080 Ti:
Dumb problems that can occur while testing:
Fix: check
journalctl -b
for NVIDIA version mismatch and reboot to fix.Fix:
modprobe nvidia-uvm
if it was previously unloaded or never loaded.