FS#65521 - [mpv, ffmpeg] add clang as build dep and add --enable-cuda to allow CUDA video filters

Attached to Project: Community Packages
Opened by Dietrich Hallentforden (aufkrawall) - Sunday, 16 February 2020, 17:43 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 13 October 2021, 11:08 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Christian Hesse (eworm)
Maxime Gauduin (Alucryd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
With the current ffmpeg packages provided by Arch, CUDA video filter functionality is missing.
Previously this was due to huge CUDA SDK being a build requirement for it and also causing licensing issues.

But this situation has been resolved, CUDA SDK is not needed anymore.
Instead, now clang is required as a build dependency (not at runtime) and ffmpeg needs to be compiled with --enable-cuda. No other changes than these to the current PKGBUILD are required.
This enables CUDA video filters while still being GPL3 compliant.

One noteworthy usecase is CUDA deinterlacing in mpv, otherwise it's not possible to use NVDEC hardware decoding and GPU deinterlacing at the same time.
An mpv rebuild is not required.

Additional info:
disussion on mpv tracker: https://github.com/mpv-player/mpv/issues/7465
ffmpeg 1:4.2.2-2
mpv 1:0.32.0-1

Steps to reproduce:
Play an interlaced video in mpv with --hwdec=nvdec and and press d to trigger deinterlacing. It fails without the changes to ffmpeg build described above, while it works flawlessly with them included.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Wednesday, 13 October 2021, 11:08 GMT
Reason for closing:  Fixed
Additional comments about closing:  2021-10-13: A task closure has been requested. Reason for request: Initial assumption for --vf=yadif_cuda not working not valid anymore.
Comment by Dietrich Hallentforden (aufkrawall) - Tuesday, 16 June 2020, 12:21 GMT
Hm, I think I reported this for ffmpeg package and not mpv?
Does the ffmpeg package maintainer even notice this ticket this way? There have been multiple new ffmpeg builds in the meantime, but unfortunately that easy change hasn't been included.
Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 13 October 2021, 01:12 GMT
Wouldn't this make ffmpeg and mpv hard-dep on cuda if it's not runtime loadable? I think that's not acceptable given the size of cuda.
Comment by Dietrich Hallentforden (aufkrawall) - Wednesday, 13 October 2021, 10:21 GMT
I think it wouldn't, if I recall correctly. However, I've just tested with "mpv --vf=yadif_cuda file" (nvdec hardware decoding in config) and it already works with the packages shipped by Arch. So perhaps the current "--enable-cuda-llvm" in ffmpeg PKGBUILD either already does the trick, or it sets "--enable-cuda" automatically when cuda is installed on the build system and it is indeed not required at runtime. So, I think we can close this. Thanks.

Loading...