Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671040 - media-video/ffmpeg-4* missing nvenc use flag
Summary: media-video/ffmpeg-4* missing nvenc use flag
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2018-11-13 01:50 UTC by Craig Andrews
Modified: 2018-11-28 18:26 UTC (History)
1 user (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 Craig Andrews gentoo-dev 2018-11-13 01:50:52 UTC
media-video/ffmpeg-3.4.5 has an "nvenc" USE flag. media-video/ffmpeg-4* doesn't; I'm assuming that this is a mistake.
Comment 1 Alexis Ballier gentoo-dev 2018-11-13 13:38:55 UTC
See:

commit 72efc6ce0847d20ebaa7e2f4ceb042d36e97e244
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Sun Apr 22 12:52:34 2018 +0200

    media-video/ffmpeg: rework nvidia codec support
    
    Closes: https://bugs.gentoo.org/653378
    Closes: https://bugs.gentoo.org/648170
    Package-Manager: Portage-2.3.31, Repoman-2.3.9
Comment 2 Craig Andrews gentoo-dev 2018-11-13 13:49:20 UTC
The nvenc use flag activates nvenc in ffmpeg, see https://github.com/gentoo/gentoo/pull/10402/
The video_cards_nvidia activates for in ffmpeg.

Are those two different things?
Comment 3 Alexis Ballier gentoo-dev 2018-11-13 15:08:43 UTC
(In reply to Craig Andrews from comment #2)
> The nvenc use flag activates nvenc in ffmpeg, see
> https://github.com/gentoo/gentoo/pull/10402/
> The video_cards_nvidia activates for in ffmpeg.
> 
> Are those two different things?

nvenc is also activated with the video cards settings; nvenc requires video_cards_nvidia to be enabled; there's no point in having 2 useflags here
Comment 4 Craig Andrews gentoo-dev 2018-11-13 15:45:00 UTC
(In reply to Alexis Ballier from comment #3)
> (In reply to Craig Andrews from comment #2)
> > The nvenc use flag activates nvenc in ffmpeg, see
> > https://github.com/gentoo/gentoo/pull/10402/
> > The video_cards_nvidia activates for in ffmpeg.
> > 
> > Are those two different things?
> 
> nvenc is also activated with the video cards settings; nvenc requires
> video_cards_nvidia to be enabled; there's no point in having 2 useflags here

I think ffnvcodec (which is activated by video_cards_nvidia) is a decoder (as that's what the comment in ffmpeg-4.1.ebuild says it is), while we're talking about an encoder (nvenc).

I don't see where in ffmpeg-4.1.ebuild nvenc is enabled (the string "nvenc" doesn't appear in that file). Should there be:
video_cards_nvidia:nvenc
in FFMPEG_ENCODER_FLAG_MAP?
Comment 5 Craig Andrews gentoo-dev 2018-11-13 15:55:36 UTC
On IRC, Alexis explained:
it's not; it's automatic by the configure script

So that's that; no need for an nvenc use flag :)
Comment 6 barrie backhurst 2018-11-22 18:29:55 UTC
(In reply to Craig Andrews from comment #5)
> On IRC, Alexis explained:
> it's not; it's automatic by the configure script
> 
> So that's that; no need for an nvenc use flag :)


I think I must be missing something here? I have an old nvidia card

06:00.0 VGA compatible controller: NVIDIA Corporation GT215 [GeForce GT 240] (rev a2)

which requires the 340 series driver and as far as I can tell cannot use ffnvcodec. I have nvenc disabled for ffmpeg 3 series builds. 

As you say the ffnvcodec is automatically included in the ffmpeg 4 series, however looking at the configure script the following option exists

--disable-ffnvcodec

therefore I believe the nvenc use flag should be reimplemented to enable this option for older cards.
Comment 7 Alexis Ballier gentoo-dev 2018-11-28 11:01:22 UTC
(In reply to barrie backhurst from comment #6)
> (In reply to Craig Andrews from comment #5)
> > On IRC, Alexis explained:
> > it's not; it's automatic by the configure script
> > 
> > So that's that; no need for an nvenc use flag :)
> 
> 
> I think I must be missing something here? I have an old nvidia card
> 
> 06:00.0 VGA compatible controller: NVIDIA Corporation GT215 [GeForce GT 240]
> (rev a2)
> 
> which requires the 340 series driver and as far as I can tell cannot use
> ffnvcodec. I have nvenc disabled for ffmpeg 3 series builds. 
> 
> As you say the ffnvcodec is automatically included in the ffmpeg 4 series,
> however looking at the configure script the following option exists
> 
> --disable-ffnvcodec
> 
> therefore I believe the nvenc use flag should be reimplemented to enable
> this option for older cards.

just disable video_cards_nvidia on ffmpeg then; that is what controls ffnvcodec; I understand it is annoying for owners of old cards, I find video_cards more understandable than 'ffnvcodec'
Comment 8 barrie backhurst 2018-11-28 18:26:15 UTC
(In reply to Alexis Ballier from comment #7)
> (In reply to barrie backhurst from comment #6)
> > (In reply to Craig Andrews from comment #5)
> > > On IRC, Alexis explained:
> > > it's not; it's automatic by the configure script
> > > 
> > > So that's that; no need for an nvenc use flag :)
> > 
> > 
> > I think I must be missing something here? I have an old nvidia card
> > 
> > 06:00.0 VGA compatible controller: NVIDIA Corporation GT215 [GeForce GT 240]
> > (rev a2)
> > 
> > which requires the 340 series driver and as far as I can tell cannot use
> > ffnvcodec. I have nvenc disabled for ffmpeg 3 series builds. 
> > 
> > As you say the ffnvcodec is automatically included in the ffmpeg 4 series,
> > however looking at the configure script the following option exists
> > 
> > --disable-ffnvcodec
> > 
> > therefore I believe the nvenc use flag should be reimplemented to enable
> > this option for older cards.
> 
> just disable video_cards_nvidia on ffmpeg then; that is what controls
> ffnvcodec; I understand it is annoying for owners of old cards, I find
> video_cards more understandable than 'ffnvcodec'

Thanks Alexis, I had assumed that video_cards_nvidia would be more expansive than just controlling ffnvcodec. I can see your point with video_cards_nvidia being more understandable, but equally my instinct was that I had an Nvidia card and therefore video_cards_nvidia should be enabled.

I will disable the flag and try updating this evening