[FFe] For Focal, build ffmpeg 4 with external headers for NVENC

Bug #1810649 reported by Mikhail Novosyolov
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
ffmpeg (Debian)
Fix Released
Unknown
ffmpeg (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

See https://www.archlinux.org/packages/extra/any/ffnvcodec-headers/

ffmpeg -codecs 2>/dev/null | grep nvenc
should show available codecs and does show on Ubuntu 18.04, I think it does not on 19.04, because ffmpeg has moved compat/nvenc to a separate git repository, and you have to explicitly enable --enable-nvenc --enable-nvdec after packaging those headers.

[FFe rational for focal]

Full description can be found in the needs-packaging bug for the external headers.

https://bugs.launchpad.net/ubuntu/+bug/1866709

I am using this bug for the FFe, so as to preserve the history of the needs-packaging bug for future ref.

While technically a new feature for implementation of ffmpeg4 series in Ubuntu, and for anyone upgrading from Eoan who did come via previous upgrades, this is restoring a feature that was available in Bionic.

Martin Wimpress has prepared and tested packages in this PPA.

https://launchpad.net/~flexiondotorg/+archive/ubuntu/ffmpeg

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ffmpeg (Ubuntu):
status: New → Confirmed
Revision history for this message
flip101 (flip101) wrote :

On ubuntu 18.10 the hevc_nvenc codec is also missing. ffmpeg doesn't list --enable-nvenc as one of it's configure flags that was used.

Revision history for this message
Luca Osvaldo Mastromatteo (lukycrociato) wrote :

Hi, I was wondering the same question. Why did it worked in the past and now not anymore?

Revision history for this message
PaJoe (flhtcu) wrote :

Is there a detailed work around for this?

I tried adding and recompiling ffmpeg worked ok 18.10 but doing the same after upgrading to 19.04 did not work for me, not sure if I did something wrong.

sudo apt-get install make git
mkdir $HOME/nv-codec-headers_build && cd $HOME/nv-codec-headers_build
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers
make && sudo make install

ffmpeg:

https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

original help:

https://askubuntu.com/questions/778100/how-to-install-compile-nvenc-in-ubuntu

Revision history for this message
DiegoRivera (diego-rivera) wrote :

The help at https://askubuntu.com/questions/778100/how-to-install-compile-nvenc-in-ubuntu is how I got to build working packages in my system (19.04 fresh install).

Hopefully this gets fixed shortly. Maybe come up with a .deb that includes the NVENC headers so they're easier to incorporate into the base build? Dunno if any licensing issues would apply, though...

Cheers.

Revision history for this message
Mikhail Novosyolov (mikhailnov) wrote :

NVENC now have a seperate upstream and are a build dependency of other packages, not onl;y ffmpeg, but e.g. also e.g. handbrake

Revision history for this message
DiegoRivera (diego-rivera) wrote :

All the more reason this issue should be easily fixable by referencing that package as a builddep... again, unless licensing issues come into play.

Revision history for this message
Mikhail Novosyolov (mikhailnov) wrote :

Yes, it is very simple to fix, I built all that for ROSA Linux, nothing unusual

Changed in ffmpeg (Debian):
status: Unknown → New
Revision history for this message
Rik Mills (rikmills) wrote :

nv-codec-headers is now in Focal proposed pocket (pending new binary acceptance) LP: #1866709

A ffmpeg upload is being prepared to re-enable things again once that clears the checks.

Changed in ffmpeg (Ubuntu):
status: Confirmed → Triaged
summary: - ffmpeg 4 requires external headers for NVENC
+ build ffmpeg 4 with external headers for NVENC
Rik Mills (rikmills)
summary: - build ffmpeg 4 with external headers for NVENC
+ Regression in Cosmic onwards: build ffmpeg 4 with external headers for
+ NVENC
Revision history for this message
DiegoRivera (diego-rivera) wrote : Re: Regression in Cosmic onwards: build ffmpeg 4 with external headers for NVENC

Will this be backported to Eoan?

Rik Mills (rikmills)
Changed in ffmpeg (Ubuntu Focal):
status: Triaged → Confirmed
Rik Mills (rikmills)
summary: - Regression in Cosmic onwards: build ffmpeg 4 with external headers for
- NVENC
+ [FFe] For Focal, build ffmpeg 4 with external headers for NVENC
Rik Mills (rikmills)
description: updated
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Since the NEW package has been reviewed and ACKed by an AA, this looks good to go. Approving the FFe.

Changed in ffmpeg (Ubuntu Focal):
status: Confirmed → Triaged
Changed in ffmpeg (Ubuntu Focal):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ffmpeg - 7:4.2.2-1ubuntu1

---------------
ffmpeg (7:4.2.2-1ubuntu1) focal; urgency=medium

  * Build with external nv-codec-headers for NVENC accelerated video
    encoding. (LP: #1810649)
    - debian/control:
      + Add B-D libffmpeg-nvenc-dev
    - debian/rules:
      + Add --enable-nvenc for amd64 only

 -- Martin Wimpress <email address hidden> Sat, 07 Mar 2020 08:39:35 +0000

Changed in ffmpeg (Ubuntu Focal):
status: Fix Committed → Fix Released
Changed in ffmpeg (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.