Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 702684 - media-video/ffmpeg-9999: improve nv-codec-headers dependency to accomodate legacy cards/drivers
Summary: media-video/ffmpeg-9999: improve nv-codec-headers dependency to accomodate le...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PullRequest
Depends on: 702682
Blocks:
  Show dependency tree
 
Reported: 2019-12-13 12:49 UTC by Marco Genasci
Modified: 2023-11-23 15:32 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Genasci 2019-12-13 12:49:06 UTC
media-video/ffmpeg-9999 require media-libs/nv-codec-headers-9.1.23.1 to compile

Reproducible: Always
Comment 1 Timo Rothenpieler 2020-01-15 14:00:29 UTC
It's not that simple actually.
It needs the latest version of each of the still supported version tracks:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=configure;h=46f20386273a3375fdd8f2517b3c5c4de2ad05ed;hb=HEAD#l6150

So either the latest 9.1, 9.0, 8.2 or 8.1 Version. Since each higher version has a higher nvidia-drivers requirement, the older ones are needed to support legacy nvidia cards.
Comment 2 Marco Genasci 2020-01-15 14:34:56 UTC
(In reply to Timo Rothenpieler from comment #1)
> It's not that simple actually.
> It needs the latest version of each of the still supported version tracks:
> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=configure;
> h=46f20386273a3375fdd8f2517b3c5c4de2ad05ed;hb=HEAD#l6150
> 
> So either the latest 9.1, 9.0, 8.2 or 8.1 Version. Since each higher version
> has a higher nvidia-drivers requirement, the older ones are needed to
> support legacy nvidia cards.

If I understand a possible solution is create all nv-codec-headers ebuilds for those version and then add

video_cards_nvidia? || ( 
	media-libs/nv-codec-headers:0/9.1[${MULTILIB_USEDEP}]
	media-libs/nv-codec-headers:0/9.0[${MULTILIB_USEDEP}]
	media-libs/nv-codec-headers:0/8.2[${MULTILIB_USEDEP}]
	media-libs/nv-codec-headers:0/8.1[${MULTILIB_USEDEP}]
)

as dependency in ffmpeg-9999
Comment 3 email200202 2020-06-19 08:04:38 UTC
I started to see this problem with media-video/ffmpeg-4.3.

I don't want to spend money these days on new card just because of some dependency.
Comment 4 accelerat0r 2020-07-25 13:09:14 UTC
(In reply to email200202 from comment #3)
> I started to see this problem with media-video/ffmpeg-4.3.
> 
> I don't want to spend money these days on new card just because of some
> dependency.

Maybe is a nasty solution but I just removed

        >=x11-drivers/nvidia-drivers-435.21[${MULTILIB_USEDEP}]

and add 

        >=x11-drivers/nvidia-drivers-390.25[${MULTILIB_USEDEP}]

to the nv-codec-headers ebuild and ffmpeg-4.3.1 did compile
Comment 5 Faraclas 2021-01-08 15:20:23 UTC
I am seeing the same issue.  I have a laptop with an older nvidia video card in it and can only use the nvidia-drivers-390 series.
Comment 6 Stephan Litterst 2021-01-23 07:05:13 UTC
Same here:
Using an old machine with an old nvidia-card wich requires nvidia-drivers-390 series.
Comment 7 Stephan Litterst 2021-04-03 10:00:06 UTC
I modified the nv-codec-headers ebuild as accelerat0r suggested.
I also had to change the USE flags as mentioned in ticket 777174.
This semms to work (at the moment).
Comment 8 Anon Emuss 2021-08-06 17:19:58 UTC
(In reply to Stephan Litterst from comment #7)
> I modified the nv-codec-headers ebuild as accelerat0r suggested.
> I also had to change the USE flags as mentioned in ticket 777174.
> This semms to work (at the moment).

I just wanted to comment that the ebuild change may not be necessary if modifying the USE flags.  ffmpeg[-video_cards_nvidia] should not even pull in nv-codec-headers, making any changes to nv-codec-headers unnecessary.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-13 20:22:04 UTC
I think this is solved by the nvenc global change: https://gitweb.gentoo.org/repo/gentoo.git/commit/media-video/ffmpeg?id=55690b2a098006300bbc2624a15c41f47396cd5c, kind of, in that it at least won't be pulled in by default if you have nvidia and don't care about ffmpeg acceleration via it.
Comment 10 Larry the Git Cow gentoo-dev 2022-03-26 00:23:42 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a0f07ad1543157d46d8f3aed5af1be63762fdbc

commit 3a0f07ad1543157d46d8f3aed5af1be63762fdbc
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2022-03-26 00:15:44 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2022-03-26 00:23:30 +0000

    media-libs/nv-codec-headers: Remove RDEPEND on nvidia-drivers
    
    Bug: https://bugs.gentoo.org/702684
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 media-libs/nv-codec-headers/nv-codec-headers-11.1.5.1-r1.ebuild | 2 --
 1 file changed, 2 deletions(-)
Comment 11 Anon Emuss 2023-01-09 00:43:32 UTC
Could this be closed?  I was affected by the problem, but it does appear to have been fixed by the switch to the nvenc USE flag.
Comment 12 Ștefan Talpalaru 2023-11-23 14:23:24 UTC
It's fixed for ffmpeg-6.0.1, but all other versions have unneeded restrictions:

/usr/portage/media-video/ffmpeg/ffmpeg-9999.ebuild:     nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 )
/usr/portage/media-video/ffmpeg/ffmpeg-6.0.1.ebuild:    nvenc? ( media-libs/nv-codec-headers )
/usr/portage/media-video/ffmpeg/ffmpeg-4.4.4-r8.ebuild: nvenc? ( <media-libs/nv-codec-headers-12 )
/usr/portage/media-video/ffmpeg/ffmpeg-6.1.ebuild:      nvenc? ( >=media-libs/nv-codec-headers-11.1.5.3 )
/usr/portage/media-video/ffmpeg/ffmpeg-4.4.4-r6.ebuild: nvenc? ( <media-libs/nv-codec-headers-12 )
/usr/portage/media-video/ffmpeg/ffmpeg-6.0-r9.ebuild:   nvenc? ( <media-libs/nv-codec-headers-12 )
/usr/portage/media-video/ffmpeg/ffmpeg-5.1.4-r1.ebuild: nvenc? ( <media-libs/nv-codec-headers-12 )
/usr/portage/media-video/ffmpeg/ffmpeg-6.0-r10.ebuild:  nvenc? ( <media-libs/nv-codec-headers-12 )
/usr/portage/media-video/ffmpeg/ffmpeg-5.1.4.ebuild:    nvenc? ( <media-libs/nv-codec-headers-12 )
/usr/portage/media-video/ffmpeg/ffmpeg-5.1.3-r5.ebuild: nvenc? ( <media-libs/nv-codec-headers-12 )
/usr/portage/media-video/ffmpeg/ffmpeg-4.4.4-r7.ebuild: nvenc? ( <media-libs/nv-codec-headers-12 )