*** Add Intel QuickSync support to ffmpeg ***
v3 cover *** Add Intel QuickSync support to ffmpeg ***
In addition of the existing VAAPI for hardware encoding, Intel provides the libmfx API embeded in its Intel MediaSDK. Intel MediaSDK improves encoding quality, is faster, and makes use of all encoding capabilities on Intel platforms.
MFX test procedure (h264):
1. Retrieve sample data (https://github.com/Intel-Media-SDK/samples)
2. Run ./sample_multi_transcode -i::h264 test_stream.264 -o::h264 out.264.
3. Test should pass.
FFMpeg QuickSync test procedure (h264):
1. Download test video: https://peach.blender.org/trailer-page/
2. Run ffmpeg -y -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v h264_qsv -i /trailer_1080p.mov -c:v h264_qsv -framerate 60 -acodec copy out.mp4
Louis-Paul Cordier (4):
package/intel-mediadriver: new package
package/intel-mediasdk: new package
package/ffmpeg: bump to version 4.1
package/ffmpeg: enable Intel QuickSync support.
Config.in.legacy | 6 ++ DEVELOPERS | 2 + package/Config.in | 2 + package/ffmpeg/0001-ffmpeg-pthreads.patch | 34 ------ ...cenc-Fix-building-with-libfdk-aac-v2.patch | 100 ------------------ ...stently-use-a-proper-version-check-m.patch | 99 ----------------- ...dk-aac-Don-t-use-defined-in-a-define.patch | 72 ------------- package/ffmpeg/Config.in | 6 -- package/ffmpeg/ffmpeg.hash | 2 +- package/ffmpeg/ffmpeg.mk | 15 +-- package/intel-mediadriver/Config.in | 21 ++++ .../intel-mediadriver/intel-mediadriver.hash | 3 + .../intel-mediadriver/intel-mediadriver.mk | 30 ++++++ package/intel-mediasdk/Config.in | 15 +++ package/intel-mediasdk/intel-mediasdk.hash | 3 + package/intel-mediasdk/intel-mediasdk.mk | 17 +++ 16 files changed, 108 insertions(+), 319 deletions(-) delete mode 100644 package/ffmpeg/0001-ffmpeg-pthreads.patch delete mode 100644 package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patch delete mode 100644 package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patch delete mode 100644 package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patch create mode 100644 package/intel-mediadriver/Config.in create mode 100644 package/intel-mediadriver/intel-mediadriver.hash create mode 100644 package/intel-mediadriver/intel-mediadriver.mk create mode 100644 package/intel-mediasdk/Config.in create mode 100644 package/intel-mediasdk/intel-mediasdk.hash create mode 100644 package/intel-mediasdk/intel-mediasdk.mk
Signature · 1 line
2.20.1
PATCH v3 1/4 package/intel-mediadriver: new package
---
v2 -> v3: (feedback Thomas Petazzoni)
- Fix commit title.
- Update DEVELOPERS file.
- Replicate dependencies of selected packages.
- Fix blank line.
- Add hash for LICENSE file.
- Update from 18.3.0 to 18.4.0.
- Fix package license.
- Various fixes in makefile.
v1 -> v2: (feedback Baruch Siach)
- Let default install target.
DEVELOPERS | 1 + package/Config.in | 1 + package/intel-mediadriver/Config.in | 21 +++++++++++++ .../intel-mediadriver/intel-mediadriver.hash | 3 ++ .../intel-mediadriver/intel-mediadriver.mk | 30 +++++++++++++++++++ 5 files changed, 56 insertions(+) create mode 100644 package/intel-mediadriver/Config.in create mode 100644 package/intel-mediadriver/intel-mediadriver.hash create mode 100644 package/intel-mediadriver/intel-mediadriver.mk
DEVELOPERS +1 -0
@@ -1265,6 +1265,7 @@ F: package/ti-sgx-um/ N: Louis-Paul Cordier <[email protected]> F: package/intel-gmmlib/ +F: package/intel-mediadriver/ N: Luca Ceresoli <[email protected]> F: board/olimex/a20_olinuxino/
package/Config.in +1 -0
@@ -1266,6 +1266,7 @@ menu "Graphics" source "package/ijs/Config.in" source "package/imlib2/Config.in" source "package/intel-gmmlib/Config.in" + source "package/intel-mediadriver/Config.in" source "package/irrlicht/Config.in" source "package/jasper/Config.in" source "package/jpeg/Config.in"
package/intel-mediadriver/Config.in new file +21 -0
@@ -0,0 +1,21 @@ +config BR2_PACKAGE_INTEL_MEDIADRIVER + bool "intel-mediadriver" + depends on BR2_x86_64 + depends on !BR2_STATIC_LIBS # mesa3D/libva + depends on BR2_INSTALL_LIBSTDCPP # mesa3D + depends on BR2_TOOLCHAIN_HAS_SYNC_1 # mesa3D + depends on BR2_TOOLCHAIN_HAS_THREADS # libva/libdrm/libpthread-stubs + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mesa3D + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_INTEL_GMMLIB + select BR2_PACKAGE_LIBPCIACCESS + select BR2_PACKAGE_LIBVA + select BR2_PACKAGE_MESA3D + select BR2_PACKAGE_XLIB_LIBX11 + help + The Intel(R) Media Driver for VAAPI is a new VA-API (Video + Acceleration API) user mode driver supporting hardware + accelerated decoding, encoding, and video post processing for + GEN based graphics hardware. + + https://github.com/intel/media-driver
package/intel-mediadriver/intel-mediadriver.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally computed +sha256 57a5c0d4dc7e34d7940d23346bbdee2b6cdfbfa81d64f5b77506da8b4298df43 intel-media-18.4.0.tar.gz +sha256 74979d5aaee78b8da82e3aafd415a216b6131dfff6d95d6930927c8a4e3bded3 LICENSE.md
package/intel-mediadriver/intel-mediadriver.mk new file +30 -0
@@ -0,0 +1,30 @@ +################################################################################ +# +# intel-mediadriver +# +################################################################################ + +# based on https://software.intel.com/en-us/articles/build-and-debug-open-source-media-stack + +INTEL_MEDIADRIVER_VERSION = 18.4.0 +INTEL_MEDIADRIVER_SITE = http://github.com/intel/media-driver/archive +INTEL_MEDIADRIVER_SOURCE= intel-media-$(INTEL_MEDIADRIVER_VERSION).tar.gz +INTEL_MEDIADRIVER_LICENSE = MIT,BSD-3-Clause +INTEL_MEDIADRIVER_LICENSE_FILES = LICENSE.md + +INTEL_MEDIADRIVER_DEPENDENCIES = \ + intel-gmmlib \ + libpciaccess \ + libva \ + mesa3d \ + xlib_libX11 + +INTEL_MEDIADRIVER_SUPPORTS_IN_SOURCE_BUILD = NO + +INTEL_MEDIADRIVER_CONF_OPTS = -DMEDIA_VERSION="2.0.0"\ + -DBUILD_ALONG_WITH_CMRTLIB=1 \ + -DINSTALL_DRIVERS_SYSCONF=OFF \ + -DMEDIA_RUN_TEST_SUITE=OFF \ + -DRUN_TEST_SUITE=OFF + +$(eval $(cmake-package))
Signature · 1 line
2.20.1
PATCH v3 1/4 package/intel-mediadriver: new package
Hello,
Quoted 1 line · On Tue, 5 Feb 2019 19:19:43 +0100 Louis-Paul Cordier <[email protected]> wrote:
Signed-off-by Louis-Paul Cordier <[email protected]>
I have applied after doing a few changes, see below.
Quoted 6 lines
package/intel-mediadriver/Config.in new file +0
-0
package/intel-mediadriver/Config.in line 8
Quoted 8 lines
package/intel-mediadriver/Config.in new file +8
-0@@ -0,0 +1,21 @@ +config BR2_PACKAGE_INTEL_MEDIADRIVER + bool "intel-mediadriver" + depends on BR2_x86_64 + depends on !BR2_STATIC_LIBS # mesa3D/libva + depends on BR2_INSTALL_LIBSTDCPP # mesa3D + depends on BR2_TOOLCHAIN_HAS_SYNC_1 # mesa3D + depends on BR2_TOOLCHAIN_HAS_THREADS # libva/libdrm/libpthread-stubs + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # mesa3D
mesa3D -> mesa3d
but more importantly, when you have dependencies, there should be corresponding Config.in comments. So I've added:
+comment "intel-mediadriver needs X.org"
+ depends on BR2_x86_64 && BR2_TOOLCHAIN_HAS_SYNC_1
+ depends on !BR2_PACKAGE_XORG7
+
+comment "intel-mediadriver needs a toolchain w/ dynamic library, C++, NPTL"
+ depends on BR2_x86_64 && BR2_TOOLCHAIN_HAS_SYNC_1
+ depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP || \
+ !BR2_TOOLCHAIN_HAS_THREADS_NPTL
package/intel-mediadriver/Config.in line 12
Quoted 4 lines
package/intel-mediadriver/Config.in new file +4
-0+INTEL_MEDIADRIVER_VERSION = 18.4.0 +INTEL_MEDIADRIVER_SITE = http://github.com/intel/media-driver/archive +INTEL_MEDIADRIVER_SOURCE= intel-media-$(INTEL_MEDIADRIVER_VERSION).tar.gz +INTEL_MEDIADRIVER_LICENSE = MIT,BSD-3-Clause
A space should have been used to separate the licenses.
Besides that, the build was failing with a non-SSP capable toolchain, so I've added a quick patch package/intel-mediadriver/0001-Drop-hardening-related-flags.patch to drop -fstack-protector from the build flags.
Could you work on an improved solution that can be submitted upstream ? The best solution is to provide an option to enable/disable usage of hardening related options.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 2/4 package/intel-mediasdk: new package
In reply to Louis-Paul Cordier---
v2 -> v3: (feedback Thomas Petazzoni)
- Fix commit title.
- Update DEVELOPERS file.
- Add project URL.
- Bump from 18.3.1 to 18.4.0.
- Various fixes in makefile.
v1 -> v2:
- Let default install target. (feedback Baruch Siach)
- Fix missing dependencies.
- Remove useless CMake options.
DEVELOPERS | 1 + package/Config.in | 1 + package/intel-mediasdk/Config.in | 15 +++++++++++++++ package/intel-mediasdk/intel-mediasdk.hash | 3 +++ package/intel-mediasdk/intel-mediasdk.mk | 17 +++++++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 package/intel-mediasdk/Config.in create mode 100644 package/intel-mediasdk/intel-mediasdk.hash create mode 100644 package/intel-mediasdk/intel-mediasdk.mk
DEVELOPERS +1 -0
@@ -1266,6 +1266,7 @@ F: package/ti-sgx-um/ N: Louis-Paul Cordier <[email protected]> F: package/intel-gmmlib/ F: package/intel-mediadriver/ +F: package/intel-mediasdk/ N: Luca Ceresoli <[email protected]> F: board/olimex/a20_olinuxino/
package/Config.in +1 -0
@@ -1267,6 +1267,7 @@ menu "Graphics" source "package/imlib2/Config.in" source "package/intel-gmmlib/Config.in" source "package/intel-mediadriver/Config.in" + source "package/intel-mediasdk/Config.in" source "package/irrlicht/Config.in" source "package/jasper/Config.in" source "package/jpeg/Config.in"
package/intel-mediasdk/Config.in new file +15 -0
@@ -0,0 +1,15 @@ +config BR2_PACKAGE_INTEL_MEDIASDK + bool "intel-mediasdk" + depends on BR2_x86_64 + select BR2_PACKAGE_INTEL_MEDIADRIVER + help + Intel(R) Media SDK provides an API to access + hardware-accelerated video decode, encode and filtering on + Intel? platforms with integrated graphics. + + Supported video encoders: HEVC, AVC, MPEG-2, JPEG + Supported Video decoders: HEVC, AVC, VP8, MPEG-2, VC1, JPEG + Supported video pre-processing filters: Color Conversion, + Deinterlace, Denoise, Resize, Rotate, Composition + + http://mediasdk.intel.com/
package/intel-mediasdk/intel-mediasdk.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally computed +sha256 259d9b57df4fca316898b6dbe7b4d561ce42160fa953f36e2a4b357e86116bf9 intel-mediasdk-18.4.0.tar.gz +sha256 dfd67773578903698f9ff4a61eb8f2d84810cbecd56f3f3cee8c649f813b6ea6 LICENSE
package/intel-mediasdk/intel-mediasdk.mk new file +17 -0
@@ -0,0 +1,17 @@ +################################################################################ +# +# intel-mediasdk +# +################################################################################ + +INTEL_MEDIASDK_VERSION = 18.4.0 +INTEL_MEDIASDK_SITE = http://github.com/Intel-Media-SDK/MediaSDK/archive +INTEL_MEDIASDK_LICENSE = MIT +INTEL_MEDIASDK_LICENSE_FILES = COPYING + +INTEL_MEDIASDK_INSTALL_STAGING = YES +INTEL_MEDIASDK_DEPENDENCIES = intel-mediadriver + +INTEL_MEDIASDK_CONF_OPTS = -DMFX_INCLUDE="$(@D)/api/include" + +$(eval $(cmake-package))
Signature · 1 line
2.20.1
PATCH v3 2/4 package/intel-mediasdk: new package
Hello,
Quoted 1 line · On Tue, 5 Feb 2019 19:19:44 +0100 Louis-Paul Cordier <[email protected]> wrote:
Signed-off-by Louis-Paul Cordier <[email protected]>
I have applied as well, with some changes, see below.
package/intel-mediasdk/Config.in line 4
Quoted 10 lines
package/intel-mediasdk/Config.in new file +4
-0@@ -0,0 +1,15 @@ +config BR2_PACKAGE_INTEL_MEDIASDK + bool "intel-mediasdk" + depends on BR2_x86_64 + select BR2_PACKAGE_INTEL_MEDIADRIVER
You can't select a package like this without replicating all its dependencies. So I've done that.
Also, it was missing a select BR2_PACKAGE_LIBDRM_INTEL, without which it doesn't build.
And for this package as well, -fstack-protector usage breaks with non-SSP toolchains, so I added package/intel-mediasdk/0001-Don-t-force-fstack-protector.patch to work around that. Could you work on an upstreamable solution to this issue ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 3/4 package/ffmpeg: bump to version 4.1
In reply to Louis-Paul CordierFFserver is not supported anymore
Remove patch 0001: fixed upstream in cae6f806a6367c7760ab6ed059d343d4a8eebd56 Remove patch 0002 to 0004: accepted upstream
---
v2 -> v3: (feedback Thomas Petazzoni)
- Fix commit title.
- Check and explain why patches are removed.
- Populate Config.in.legacy with ffeserver removal.
Config.in.legacy | 6 ++ package/ffmpeg/0001-ffmpeg-pthreads.patch | 34 ------ ...cenc-Fix-building-with-libfdk-aac-v2.patch | 100 ------------------ ...stently-use-a-proper-version-check-m.patch | 99 ----------------- ...dk-aac-Don-t-use-defined-in-a-define.patch | 72 ------------- package/ffmpeg/Config.in | 6 -- package/ffmpeg/ffmpeg.hash | 2 +- package/ffmpeg/ffmpeg.mk | 8 +- 8 files changed, 8 insertions(+), 319 deletions(-) delete mode 100644 package/ffmpeg/0001-ffmpeg-pthreads.patch delete mode 100644 package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patch delete mode 100644 package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patch delete mode 100644 package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patch
Config.in.legacy +6 -0
@@ -168,6 +168,12 @@ config BR2_TARGET_GENERIC_PASSWD_MD5 The default has been moved to SHA256 and all C libraries now support that method by default +config BR2_PACKAGE_FFMPEG_FFSERVER + bool "Build ffserver" + depends on BR2_USE_MMU # fork() + help + On July 10th, 2016, ffserver program has been dropped. + comment "Legacy options removed in 2018.11" config BR2_TARGET_XLOADER
package/ffmpeg/0001-ffmpeg-pthreads.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From patchwork Wed Oct 25 13:32:36 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [FFmpeg-devel] configure: v4l2_m2m depends on pthreads -From: Mark Thompson <[email protected]> -X-Patchwork-Id: 5688 -Message-Id: <[email protected]> -To: FFmpeg development discussions and patches <[email protected]> -Date: Wed, 25 Oct 2017 14:32:36 +0100 - -Fixes build with --disable-pthreads. - -Downloaded from upstream patchworks: -https://patchwork.ffmpeg.org/patch/5688/ - -Signed-off-by: Bernd Kuhls <[email protected]> ---- - configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure b/configure -index c86e578..76523c8 100755 ---- a/configure -+++ b/configure -@@ -2780,7 +2780,7 @@ omx_rpi_select="omx" - qsvdec_select="qsv" - qsvenc_select="qsv" - vaapi_encode_deps="vaapi" --v4l2_m2m_deps_any="linux_videodev2_h" -+v4l2_m2m_deps="linux_videodev2_h pthreads" - - hwupload_cuda_filter_deps="cuda" - scale_npp_filter_deps="cuda libnpp"
package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patch deleted +0 -100
100 lines not on this page · raw message
package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patch deleted +0 -99
99 lines not on this page · raw message
package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patch deleted +0 -72
72 lines not on this page · raw message
package/ffmpeg/Config.in +0 -6
@@ -63,12 +63,6 @@ config BR2_PACKAGE_FFMPEG_FFPLAY comment "ffplay needs a toolchain w/ dynamic library" depends on BR2_STATIC_LIBS -config BR2_PACKAGE_FFMPEG_FFSERVER - bool "Build ffserver" - depends on BR2_USE_MMU # fork() - help - FFserver is a streaming server for both audio and video. - config BR2_PACKAGE_FFMPEG_FFPROBE bool "Build ffprobe" help
package/ffmpeg/ffmpeg.hash +1 -1
@@ -1,5 +1,5 @@ # Locally calculated -sha256 741cbd6394eaed370774ca4cc089eaafbc54d0824b9aa360d4b3b0cbcbc4a92c ffmpeg-3.4.5.tar.xz +sha256 a38ec4d026efb58506a99ad5cd23d5a9793b4bf415f2c4c2e9c1bb444acd1994 ffmpeg-4.1.tar.xz sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING.GPLv2 sha256 b634ab5640e258563c536e658cad87080553df6f34f62269a21d554844e58bfe COPYING.LGPLv2.1 sha256 73d99bc83313fff665b426d6672b4e0479102bc402fe22314ac9ce94a38aa5ff LICENSE.md
package/ffmpeg/ffmpeg.mk +1 -7
@@ -4,7 +4,7 @@ # ################################################################################ -FFMPEG_VERSION = 3.4.5 +FFMPEG_VERSION = 4.1 FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.xz FFMPEG_SITE = http://ffmpeg.org/releases FFMPEG_INSTALL_STAGING = YES
@@ -84,12 +84,6 @@ else FFMPEG_CONF_OPTS += --disable-ffplay endif -ifeq ($(BR2_PACKAGE_FFMPEG_FFSERVER),y) -FFMPEG_CONF_OPTS += --enable-ffserver -else -FFMPEG_CONF_OPTS += --disable-ffserver -endif - ifeq ($(BR2_PACKAGE_FFMPEG_AVRESAMPLE),y) FFMPEG_CONF_OPTS += --enable-avresample else
Signature · 1 line
2.20.1
PATCH v3 3/4 package/ffmpeg: bump to version 4.1
Quoted 5 lines · On Tue, 5 Feb 2019 19:19:45 +0100 Louis-Paul Cordier <[email protected]> wrote:
FFserver is not supported anymore
Remove patch 0001: fixed upstream incae6f806a6367c7760ab6ed059d343d4a8eebd56Remove patch 0002 to 0004: accepted upstreamSigned-off-by Louis-Paul Cordier <[email protected]>
As was previously discussed, we cannot merge this if all packages that depend on ffmpeg are not compatible with ffmpeg 4.x.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 3/4 package/ffmpeg: bump to version 4.1
Quoted 17 lines
De : Thomas Petazzoni <[email protected]>
? : Louis-Paul Cordier <[email protected]>
Sujet : Re: [Buildroot] [PATCH v3 3/4] package/ffmpeg: bump to version 4.1 Date : 06/02/2019 09:47:27 Europe/ParisCopie ? : buildroot at buildroot.org; Bernd Kuhls <[email protected]>; MahyarKoshkouei <[email protected]>; Martin Storsj?? <[email protected]>Quoted 4 lines · On Tue, 5 Feb 2019 19:19:45 +0100 Louis-Paul Cordier <[email protected]> wrote:
FFserver is not supported anymore
Remove patch 0001: fixed upstream incae6f806a6367c7760ab6ed059d343d4a8eebd56Remove patch 0002 to 0004: accepted upstream
Quoted 10 lines
Quoted 1 line
Signed-off-by Louis-Paul Cordier <[email protected]>As was previously discussed, we cannot merge this if all packages that depend on ffmpeg are not compatible with ffmpeg 4.x.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Hi again,
What decision should be taken on this? We have 2 solutions has Bernd stated: either bumping GStreamer to a more recent version (that seems to be not welcomed by some people), or applying Bernd patch. What about the latter?
I can modify my patch serie to include Bernd's patch. Would it possibly convince everyone for a final merge?
In the meantime, I think you can merge intel media driver and mediasdk patches. Thanks for your time!
BR,
Louis-Paul CORDIER
PATCH v3 3/4 package/ffmpeg: bump to version 4.1
Hello,
(It would be good to configure your e-mail client to wrap lines at 72 characters)
Quoted 7 lines · On Wed, 6 Feb 2019 10:33:48 +0100 (CET) lpdev at cordier.org wrote:
What decision should be taken on this? We have 2 solutions has Bernd
stated: either bumping GStreamer to a more recent version (that seems to be not welcomed by some people), or applying Bernd patch. What about the latter?I can modify my patch serie to include Bernd's patch. Would it possibly convince everyone for a final merge?
Is there a stable version of gstreamer that was released and that is compatible with ffmpeg 4.x ? If so, that's what we want to use.
If not, then presumably there are upstream GStreamer changes that make it compatible with ffmpeg 4.x, and we would like to see those patches backported rather than using home-grown patches.
Quoted 2 lines
In the meantime, I think you can merge intel media driver and mediasdk patches. Thanks for your time!
Yes, sure thing.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 3/4 package/ffmpeg: bump to version 4.1
Hi,
Am Wed, 06 Feb 2019 10:47:49 +0100 schrieb Thomas Petazzoni:
Quoted 2 lines
Is there a stable version of gstreamer that was released and that is compatible with ffmpeg 4.x ? If so, that's what we want to use.
no:
https://bugzilla.gnome.org/show_bug.cgi?id=792900#c14
"I wouldn't worry about the backwards compatibility, but we would have to wait until 1.16 in that case. Can't be included in 1.14."
https://github.com/GStreamer/gst-libav/blob/master/NEWS
"GStreamer 1.16 has not been released yet. It is scheduled for release in January/February 2019."
Only unstable 1.15.1 was released yet.
Quoted 3 lines
If not, then presumably there are upstream GStreamer changes that make it compatible with ffmpeg 4.x, and we would like to see those patches backported rather than using home-grown patches.
No, upstream says backporting is not possible:
https://github.com/GStreamer/gst-libav/commit/
8886a016fce625e1c25a4902be4021196a6784a2#diff-
ff4e2dc4962dc25a1512353299992c8dR1400
"- The gst-libav module in 1.14 will only build against older ffmpeg
3.x versions and won?t build against the newly-released ffmpeg 4.0 (as in RPM Fusion for Fedora 28) due to API changes. Use the internal ffmpeg copy instead if you build using autotools. This is fixed in git master / upcoming 1.16, but won?t be backported to the 1.14 branch as it is rather intrusive and difficult to support both old and new APIs at the same time."
Regards, Bernd
PS: ffmpeg 4.1.1 was released.
PATCH v3 3/4 package/ffmpeg: bump to version 4.1
Hello,
Quoted 8 lines · On Sun, 10 Feb 2019 11:01:05 +0100 Bernd Kuhls <[email protected]> wrote:
no:
https://bugzilla.gnome.org/show_bug.cgi?id=792900#c14
"I wouldn't worry about the backwards compatibility, but we would have to wait until 1.16 in that case. Can't be included in 1.14."https://github.com/GStreamer/gst-libav/blob/master/NEWS
"GStreamer 1.16 has not been released yet. It is scheduled for release in January/February 2019."
OK.
Quoted 11 lines
Only unstable 1.15.1 was released yet.
Quoted 3 lines
If not, then presumably there are upstream GStreamer changes that make it compatible with ffmpeg 4.x, and we would like to see those patches backported rather than using home-grown patches.
No, upstream says backporting is not possible:
https://github.com/GStreamer/gst-libav/commit/
8886a016fce625e1c25a4902be4021196a6784a2#diff-
ff4e2dc4962dc25a1512353299992c8dR1400
Quoted 7 lines
"- The gst-libav module in 1.14 will only build against older ffmpeg
3.x versions and won?t build against the newly-released ffmpeg 4.0 (as in RPM Fusion for Fedora 28) due to API changes. Use the internal ffmpeg copy instead if you build using autotools. This is fixed in git master / upcoming 1.16, but won?t be backported to the 1.14 branch as it is rather intrusive and difficult to support both old and new APIs at the same time."
Then, what about temporarily using the internal ffmpeg copy in gst-libav, until a new version of gst-libav gets released ?
But anyway, it's too late to bump ffmpeg to 4.x for 2019.02, so it will anyway be done for the next release, and by then, the new GStreamer release should be available.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 3/4 package/ffmpeg: bump to version 4.1
Am Sun, 10 Feb 2019 11:27:02 +0100 schrieb Thomas Petazzoni:
Quoted 2 lines
Then, what about temporarily using the internal ffmpeg copy in gst-libav, until a new version of gst-libav gets released ?
Hi Thomas,
sent patch: http://patchwork.ozlabs.org/patch/1039476/
test-pkg with this defconfig
BR2_PACKAGE_GSTREAMER1=y
BR2_PACKAGE_GST1_LIBAV=y
looks good:
arm-aarch64 [ 1/48]: OK
armv5-ctng-linux-gnueabi [ 2/48]: OK
armv7-ctng-linux-gnueabihf [ 3/48]: OK
br-aarch64-glibc [ 4/48]: OK
br-arcle-hs38 [ 5/48]: OK
br-arm-basic [ 6/48]: SKIPPED
br-arm-cortex-a9-glibc [ 7/48]: OK
br-arm-cortex-a9-musl [ 8/48]: OK
br-arm-cortex-m4-full [ 9/48]: SKIPPED
br-arm-full [10/48]: OK
br-arm-full-nothread [11/48]: SKIPPEDRegards, Bernd
PATCH v3 4/4 package/ffmpeg: enable Intel QuickSync support.
In reply to Louis-Paul Cordier---
v1 -> v2:
- Fix typo.
package/ffmpeg/ffmpeg.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/ffmpeg/ffmpeg.mk +7 -0
@@ -309,6 +309,13 @@ else FFMPEG_CONF_OPTS += --disable-libbluray endif +ifeq ($(BR2_PACKAGE_INTEL_MEDIASDK),y) +FFMPEG_CONF_OPTS += --enable-libmfx +FFMPEG_DEPENDENCIES += intel-mediasdk +else +FFMPEG_CONF_OPTS += --disable-libmfx +endif + ifeq ($(BR2_PACKAGE_RTMPDUMP),y) FFMPEG_CONF_OPTS += --enable-librtmp FFMPEG_DEPENDENCIES += rtmpdump
Signature · 1 line
2.20.1
Thomas Petazzoni
AppliedPATCH v3 4/4 package/ffmpeg: enable Intel QuickSync support.
Quoted 4 lines · On Tue, 5 Feb 2019 19:19:46 +0100 Louis-Paul Cordier <[email protected]> wrote:
Signed-off-by Louis-Paul Cordier <[email protected]>---
v1 -> v2:
- Fix typo.
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
v3 cover *** Add Intel QuickSync support to ffmpeg ***
In reply to Louis-Paul CordierQuoted 49 lines
De : Louis-Paul Cordier <[email protected]>
? : buildroot at buildroot.org
Sujet : [PATCH v3 0/4] *** Add Intel QuickSync support to ffmpeg *** Date : 05/02/2019 19:19:42 Europe/Paris
Copie ? : Louis-Paul Cordier <[email protected]>;
Bernd Kuhls <[email protected]>;
Mahyar Koshkouei <[email protected]>In addition of the existing VAAPI for hardware encoding, Intel provides the libmfx API embeded in its Intel MediaSDK. Intel MediaSDK improves encoding quality, is faster, and makes use of all encoding capabilities on Intel platforms.
MFX test procedure (h264):
1. Retrieve sample data (https://github.com/Intel-Media-SDK/samples)
2. Run ./sample_multi_transcode -i::h264 test_stream.264 -o::h264 out.264.
3. Test should pass.FFMpeg QuickSync test procedure (h264):
1. Download test video: https://peach.blender.org/trailer-page/
2. Run ffmpeg -y -hwaccel qsv -qsv_device/dev/dri/renderD128-c:vh264_qsv-i /trailer_1080p.mov -c:vh264_qsv-framerate 60 -acodec copy out.mp4Louis-Paul Cordier (4):
package/intel-mediadriver: new package
package/intel-mediasdk: new package
package/ffmpeg: bump to version 4.1
package/ffmpeg: enable Intel QuickSync support.Config.in.legacy | 6 ++
DEVELOPERS | 2 +
package/Config.in | 2 +package/ffmpeg/0001-ffmpeg-pthreads.patch| 34 ------...cenc-Fix-building-with-libfdk-aac-v2.patch | 100 ------------------ ...stently-use-a-proper-version-check-m.patch | 99 ----------------- ...dk-aac-Don-t-use-defined-in-a-define.patch | 72 -------------package/ffmpeg/Config.in | 6 -- package/ffmpeg/ffmpeg.hash | 2 +-
package/ffmpeg/ffmpeg.mk| 15 +-- package/intel-mediadriver/Config.in | 21 ++++ .../intel-mediadriver/intel-mediadriver.hash | 3 +.../intel-mediadriver/intel-mediadriver.mk| 30 ++++++ package/intel-mediasdk/Config.in | 15 +++ package/intel-mediasdk/intel-mediasdk.hash | 3 +package/intel-mediasdk/intel-mediasdk.mk| 17 +++16 files changed, 108 insertions(+), 319 deletions(-)
Quoted 14 lines
delete mode 100644
package/ffmpeg/0001-ffmpeg-pthreads.patch
delete mode 100644package/ffmpeg/0002-libfdk-aacenc-Fix-building-with-libfdk-aac-v2.patchdelete mode 100644package/ffmpeg/0003-libfdk-aac-Consistently-use-a-proper-version-check-m.patchdelete mode 100644package/ffmpeg/0004-libfdk-aac-Don-t-use-defined-in-a-define.patchcreate mode 100644 package/intel-mediadriver/Config.in
create mode 100644 package/intel-mediadriver/intel-mediadriver.hash
create mode 100644package/intel-mediadriver/intel-mediadriver.mk
create mode 100644 package/intel-mediasdk/Config.in
create mode 100644 package/intel-mediasdk/intel-mediasdk.hash
create mode 100644package/intel-mediasdk/intel-mediasdk.mkSignature · 1 line
2.20.1
Hi all, any news on the merge of these patches?
Thanks
Louis-Paul CORDIER