After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 774278 - gst-libav fails when built --with-system-libav and ffmpeg has nvenc and qsv support
gst-libav fails when built --with-system-libav and ffmpeg has nvenc and qsv s...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
1.10.0
Other Linux
: Normal normal
: 1.10.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 775098 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-11-11 16:03 UTC by leigh123linux@googlemail.com
Modified: 2016-11-25 16:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to disable external ffmpeg hw encoders (1.15 KB, patch)
2016-11-11 16:03 UTC, leigh123linux@googlemail.com
committed Details | Review

Description leigh123linux@googlemail.com 2016-11-11 16:03:25 UTC
Created attachment 339632 [details] [review]
patch to disable external ffmpeg hw encoders

At rpmfusion we recently enabled nvenc and qsv support for ffmpeg.
Building gst-libva against system ffmpeg breaks it, here's the bug report

https://bugzilla.rpmfusion.org/show_bug.cgi?id=4334


19:13:06.484278 0:00:11.200583028  4381       0xfe3140 DEBUG                  libav gstavvidenc.c:451:gst_ffmpegvidenc_set_format:<avenc_nvenc_h264-1> codec flags 0x00000000
19:13:06.484285 0:00:11.200617266  4381       0xfe3140 INFO                   libav :0:: This encoder is deprecated, use 'h264_nvenc' instead
19:13:06.484293 0:00:11.200774292  4381       0xfe3140 ERROR                  libav :0:: Cannot load libcuda.so
19:13:06.484300 0:00:11.200778855  4381       0xfe3140 INFO                   libav :0:: Nvenc unloaded
19:13:06.484307 0:00:11.200785705  4381       0xfe3140 DEBUG                  libav gstavvidenc.c:530:gst_ffmpegvidenc_set_format:<avenc_nvenc_h264-1> avenc_nvenc_h264: Failed to open libav codec


I note your commit

https://cgit.freedesktop.org/gstreamer/gst-libav/commit/ext/libav/gstavviddec.c?id=5f4bd291c1368bfb7c702cea100a5ab45ae065d2

It misses some nvenc encoders

$ gst-inspect-1.0 | grep -i nvenc
libav:  avenc_nvenc_hevc: libav NVIDIA NVENC hevc encoder encoder
libav:  avenc_nvenc_h264: libav NVIDIA NVENC H.264 encoder encoder
libav:  avenc_nvenc: libav NVIDIA NVENC H.264 encoder encoder


and doesn't include qsv


08:51:02.537595 0:00:07.255697413 12156      0x1d46320 DEBUG                  libav gstavcodecmap.c:2995:gst_ffmpeg_caps_with_codecid: no codec data
08:51:02.537617 0:00:07.255709949 12156      0x1d46320 DEBUG                  libav gstavvidenc.c:451:gst_ffmpegvidenc_set_format:<avenc_h264_qsv1> codec flags 0x80000000
08:51:02.537640 0:00:07.256596554 12156      0x1d46320 ERROR                  libav :0:: Error initializing an internal MFX session
08:51:02.537663 0:00:07.256607513 12156      0x1d46320 DEBUG                  libav gstavvidenc.c:530:gst_ffmpegvidenc_set_format:<avenc_h264_qsv1> avenc_h264_qsv: Failed to open libav codec

I have attached a patch that cleans up the rest of ffmpegs hw encoders
Comment 1 Sebastian Dröge (slomo) 2016-11-12 08:34:41 UTC
commit 3c3be3125fe1bcd2c453d65241dc518891b0693c
Author: leigh123linux@googlemail.com <leigh123linux@googlemail.com>
Date:   Fri Nov 11 16:03:00 2016 +0000

    avvidenc/dec: Disable more hardware encoder/decoders
    
    Important when using a system ffmpeg/libav.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774278
Comment 2 Sebastian Dröge (slomo) 2016-11-25 16:58:28 UTC
*** Bug 775098 has been marked as a duplicate of this bug. ***