Skip to contentSkip to conversation

gst-ffmpeg: Use internal libav instead of external ffmpeg

PATCH Superseded Bernd Kuhls 5 participants 10 messages Jan 15, 2014 – Jan 30, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gst-ffmpeg: Use internal libav instead of external ffmpeg

External ffmpeg 1.2.4 is incompatible, gst-ffmpeg suggests to always use internal libav.

Adding two patches:
Allow uClibc compilation: gst-ffmpeg-uclibc.patch
Fixes compiling with gcc-4.7: gst-ffmpeg-0.10.13_gcc47.patch (taken from Slackware)

Fixes
http://autobuild.buildroot.net/results/ab8/ab8ec4904020ceb848a1e50f1865f594f46b8295//
http://autobuild.buildroot.net/results/f0a/f0a420015a92ebb8868c41c0dbf82cf27b2bdd0f//

---
 package/gstreamer/gst-ffmpeg/Config.in             |    4 --
 .../gst-ffmpeg/gst-ffmpeg-0.10.13_gcc47.patch      |   65 ++++++++++++++++++++
 .../gstreamer/gst-ffmpeg/gst-ffmpeg-uclibc.patch   |   16 +++++
 package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk         |    9 ++-
 4 files changed, 88 insertions(+), 6 deletions(-)
 create mode 100644 package/gstreamer/gst-ffmpeg/gst-ffmpeg-0.10.13_gcc47.patch
 create mode 100644 package/gstreamer/gst-ffmpeg/gst-ffmpeg-uclibc.patch
package/gstreamer/gst-ffmpeg/Config.in +0 -4
index da254ef..d879f5e 100644
@@ -1,10 +1,6 @@
 config BR2_PACKAGE_GST_FFMPEG
 	bool "gst-ffmpeg"
 	select BR2_PACKAGE_GST_PLUGINS_BASE
-	select BR2_PACKAGE_FFMPEG
-	select BR2_PACKAGE_FFMPEG_GPL
-	select BR2_PACKAGE_FFMPEG_POSTPROC
-	select BR2_PACKAGE_FFMPEG_SWSCALE
 	depends on BR2_LARGEFILE
 	depends on BR2_INET_IPV6
 	help
package/gstreamer/gst-ffmpeg/gst-ffmpeg-0.10.13_gcc47.patch new file +65 -0

65 lines not on this page · raw message

package/gstreamer/gst-ffmpeg/gst-ffmpeg-uclibc.patch new file +16 -0
new file mode 100644
index 0000000..82a7ffb
@@ -0,0 +1,16 @@
+libav configure: Allow uClibc compilation
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+diff -uNr gst-ffmpeg-0.10.13.org/gst-libs/ext/libav/configure gst-ffmpeg-0.10.13/gst-libs/ext/libav/configure
+--- gst-ffmpeg-0.10.13.org/gst-libs/ext/libav/configure	2011-11-02 16:16:24.000000000 +0100
++++ gst-ffmpeg-0.10.13/gst-libs/ext/libav/configure	2014-01-14 21:03:07.496887791 +0100
+@@ -2471,7 +2471,7 @@
+         enable dos_paths
+         add_cppflags -U__STRICT_ANSI__
+         ;;
+-    linux)
++    linux|linux-uclibc)
+         add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
+         enable dv1394
+         ;;
package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk +7 -2
index fc59c30..c57a8c8 100644
@@ -8,11 +8,16 @@ GST_FFMPEG_VERSION = 0.10.13
 GST_FFMPEG_SOURCE = gst-ffmpeg-$(GST_FFMPEG_VERSION).tar.bz2
 GST_FFMPEG_SITE = http://gstreamer.freedesktop.org/src/gst-ffmpeg
 GST_FFMPEG_INSTALL_STAGING = YES
-GST_FFMPEG_DEPENDENCIES = host-pkgconf gstreamer gst-plugins-base ffmpeg
-GST_FFMPEG_CONF_OPT = --with-system-ffmpeg
+GST_FFMPEG_DEPENDENCIES = host-pkgconf gstreamer gst-plugins-base
+
+ifeq ($(BR2_X86_CPU_HAS_MMX),y)
+GST_FFMPEG_DEPENDENCIES += host-yasm
+endif
 
 ifeq ($(BR2_PACKAGE_BZIP2),y)
 GST_FFMPEG_DEPENDENCIES += bzip2
 endif
 
+GST_FFMPEG_CONF_OPT = --with-ffmpeg-extra-configure="--cross-prefix=$(TARGET_CROSS)"
+
 $(eval $(autotools-package))
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 gst-ffmpeg: Use internal libav instead of external ffmpeg

Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bernd" == Bernd Kuhls <[email protected]> writes:

External ffmpeg 1.2.4 is incompatible, gst-ffmpeg suggests to always use internal libav.

Adding two patches:
Allow uClibc compilation: gst-ffmpeg-uclibc.patch
Fixes compiling with gcc-4.7: gst-ffmpeg-0.10.13_gcc47.patch (taken from Slackware)

Quoted 7 lines

Fixes
http://autobuild.buildroot.net/results/ab8/ab8ec4904020ceb848a1e50f1865f594f46b8295//
http://autobuild.buildroot.net/results/f0a/f0a420015a92ebb8868c41c0dbf82cf27b2bdd0f//

+GST_FFMPEG_CONF_OPT = --with-ffmpeg-extra-configure="--cross-prefix=$(TARGET_CROSS)"

It seems like we atleast also need to pass --target-os=linux, otherwise configure fails:

Configuring included Libav instance with args --prefix=/usr --disable-ffserver --disable-ffplay --disable-ffmpeg --disable-ffprobe --enable-static --enable-pic --disable-encoder=flac --disable-decoder=cavs --disable-protocols --disable-devices --disable-network --disable-hwaccels --disable-filters --disable-doc --enable-optimizations --enable-postproc --enable-gpl --enable-cross-compile --target-os=linux-uclibcgnueabi --arch=arm --cross-prefix=arm-buildroot-linux-uclibcgnueabi- --cross-prefix=/home/peko/source/buildroot/output/host/usr/bin/arm-linux- Unknown OS 'linux-uclibcgnueabi'.

If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the libav-user at libav.org mailing list or IRC #libav on irc.freenode.net. Include the log file "config.log" produced by configure as this will help solving the problem.
config.status: error: Failed to configure embedded Libav tree

But what about all the CPU optimization flags we have in ffmpeg? Don't we need to reproduce those as well here?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 gst-ffmpeg: Use internal libav instead of external ffmpeg

Quoted 2 lines · Peter Korsgaard

But what about all the CPU optimization flags we have in ffmpeg? Don't we need to reproduce those as well here?

I'm a bit wary about using the builtin ffmpeg support at all, all of the security fixes from newer versions of the unbundled library will be gone. And i also think the bump was fine, it was time to move along (and mpd's support for ffmpeg needed it for example, it won't work with oldish ffmpeg versions).
Maybe it's a bit harsh but we should consider deprecating gst-ffmpeg? Regards.

#3 lore raw

PATCH 1/1 gst-ffmpeg: Use internal libav instead of external ffmpeg

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Quoted 2 lines · Peter Korsgaard

But what about all the CPU optimization flags we have in ffmpeg? Don't we need to reproduce those as well here?

Quoted 6 lines

I'm a bit wary about using the builtin ffmpeg support at all, all of the security fixes from newer versions of the unbundled library will be gone. And i also think the bump was fine, it was time to move along (and mpd's support for ffmpeg needed it for example, it won't work with oldish ffmpeg versions).
Maybe it's a bit harsh but we should consider deprecating gst-ffmpeg?

s/gst-ffmpeg/gstreamer 0.10/, but yeah. Upstream officially announced that almost a year ago:

http://lists.freedesktop.org/archives/gstreamer-announce/2013-March/000273.html

I do think moving to the internal libav copy for gst-ffmpeg until we can completely remove it is OK though. If people really need it, then the (outdated) bundled library is still better than no gst-ffmpeg.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 1/1 gst-ffmpeg: Use internal libav instead of external ffmpeg

Hi,

Quoted 13 lines · Peter Korsgaard
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Quoted 2 lines · Peter Korsgaard

But what about all the CPU optimization flags we have in ffmpeg? Don't we need to reproduce those as well here?

Quoted 6 lines

I'm a bit wary about using the builtin ffmpeg support at all, all of the security fixes from newer versions of the unbundled library will be gone. And i also think the bump was fine, it was time to move along (and mpd's support for ffmpeg needed it for example, it won't work with oldish ffmpeg versions).
Maybe it's a bit harsh but we should consider deprecating gst-ffmpeg?

Quoted 8 lines

s/gst-ffmpeg/gstreamer 0.10/, but yeah. Upstream officially announced that almost a year ago:

http://lists.freedesktop.org/archives/gstreamer-announce/2013-March/000273.html

I do think moving to the internal libav copy for gst-ffmpeg until we can completely remove it is OK though. If people really need it, then the (outdated) bundled library is still better than no gst-ffmpeg.

Are you interested in a patch that adds gst1-libav (version 1.2.x) ? We are using this for a while now. Our package uses the internally bundled library though.

Regards,
Sven

Signature · 19 lines
Sven Neumann
Senior System Architect

Lautsprecher Teufel GmbH
Gewerbehof B?lowbogen, Aufgang D1
B?lowstr. 66
10783 Berlin
Germany

Direkt   +49 (0) 30 / 300 930-153
Telefon  +49 (0) 30 / 300 930-0

neumann at teufel.de

Registernummer HRB 20271 beim Amtsgericht Berlin-Charlottenburg
Gesch?ftsf?hrer: J?rgen Schneider, Edgar van Velzen
Umsatzsteuer-ID: DE136745959

www.teufel.de - www.teufelaudio.com - www.raumfeld.com
#5 lore raw

PATCH 1/1 gst-ffmpeg: Use internal libav instead of external ffmpeg

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Sven" == Sven Neumann <[email protected]> writes:

Hi,

Quoted 7 lines

I do think moving to the internal libav copy for gst-ffmpeg until we can

Quoted 2 lines

completely remove it is OK though. If people really need it, then the (outdated) bundled library is still better than no gst-ffmpeg.

Are you interested in a patch that adds gst1-libav (version 1.2.x) ? We are using this for a while now. Our package uses the internally bundled library though.

Sure!

Signature · 1 line
Bye, Peter Korsgaard
#6 lore raw

PATCH 1/1 gst-ffmpeg: Use internal libav instead of external ffmpeg

Hi,

Quoted 5 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Sven" == Sven Neumann <[email protected]> writes:

Hi,

Quoted 1 line

I do think moving to the internal libav copy for gst-ffmpeg until we can

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

completely remove it is OK though. If people really need it, then the (outdated) bundled library is still better than no gst-ffmpeg.

Are you interested in a patch that adds gst1-libav (version 1.2.x) ? We are using this for a while now. Our package uses the internally bundled library though.

Sure!

To be honest, our version of the gst1-libav package disables almost everything and just builds a handful of audio decoder plug-ins. But I'll remove these hacks and submit a full version. I can not guarantee that it will build cleanly though.

Regards,
Sven

Signature · 19 lines
Sven Neumann
Senior System Architect

Lautsprecher Teufel GmbH
Gewerbehof B?lowbogen, Aufgang D1
B?lowstr. 66
10783 Berlin
Germany

Direkt   +49 (0) 30 / 300 930-153
Telefon  +49 (0) 30 / 300 930-0

neumann at teufel.de

Registernummer HRB 20271 beim Amtsgericht Berlin-Charlottenburg
Gesch?ftsf?hrer: J?rgen Schneider, Edgar van Velzen
Umsatzsteuer-ID: DE136745959

www.teufel.de - www.teufelaudio.com - www.raumfeld.com
#7 lore raw

PATCH 1/1 gst-ffmpeg: Use internal libav instead of external ffmpeg

In reply to Peter Korsgaard

Dear Peter Korsgaard,

Quoted 4 lines · Peter Korsgaard
Quoted 1 line

+GST_FFMPEG_CONF_OPT = --with-ffmpeg-extra-configure="--cross-prefix=$(TARGET_CROSS)"

It seems like we atleast also need to pass --target-os=linux, otherwise configure fails:

Then if you pass --target-os=linux, probably the gst-ffmpeg-uclibc.patch added by Bernd is no longer necessary?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#8 lore raw

PATCH 1/1 gst-ffmpeg: Use internal libav instead of external ffmpeg

Thomas Petazzoni
<[email protected]> wrote
in news:20140129090028.01079137 at skate:

Quoted 2 lines

Then if you pass --target-os=linux, probably the gst-ffmpeg-uclibc.patch added by Bernd is no longer necessary?

Hi,

v2 of my patch was committed to git:
http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/74563

Changes v1 -> v2:
- replaced gst-ffmpeg-uclibc.patch with configure option --target-os=linux (Peter)

gst-ffmpeg-uclibc.patch was never added to git.

Regards, Bernd

#9 lore raw

PATCH 1/1 gst-ffmpeg: Use internal libav instead of external ffmpeg

Dear Bernd Kuhls,

Quoted 8 lines · Bernd Kuhls

v2 of my patch was committed to git:
http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/74563

Changes v1 -> v2:
- replaced gst-ffmpeg-uclibc.patch with configure option --target-os=linux (Peter)

gst-ffmpeg-uclibc.patch was never added to git.

Ok, thanks for the confirmation!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com