Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519064 - media-tv/xbmc-13.1 - xbmc uses bundled ffmpeg
Summary: media-tv/xbmc-13.1 - xbmc uses bundled ffmpeg
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Xbox project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-04 18:07 UTC by Sebastian
Modified: 2015-02-17 00:11 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ldd tree for xbmc-12.3 (xbmc-12.3.txt,2.68 KB, text/plain)
2014-08-05 20:51 UTC, Sebastian
Details
ldd tree for xbmc-13.1 (xbmc-13.1.txt,2.14 KB, text/plain)
2014-08-05 20:51 UTC, Sebastian
Details
xbmc-13.1-build.log.bz2 (xbmc-13.1-build.log.bz2,42.59 KB, application/x-bzip)
2014-08-12 18:51 UTC, Sebastian
Details
debian-patches.tar.bz2 (debian-patches.tar.bz2,6.00 KB, application/x-bzip)
2014-09-28 13:25 UTC, Sebastian
Details
xbmc-13.2-add-debian-patches-and-update-depends.patch (xbmc-13.2-add-debian-patches-and-update-depends.patch,2.27 KB, patch)
2014-09-28 13:26 UTC, Sebastian
Details | Diff
xbmc-13.2-r1.ebuild (xbmc-13.2-r1.ebuild,9.79 KB, text/plain)
2014-09-28 13:27 UTC, Sebastian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian 2014-08-04 18:07:08 UTC
Hello all,

xbmc.bin doesn't link to the system ffmpeg but instead builds its own ffmpeg and uses it:

ldd /usr/lib64/xbmc/xbmc.bin 
        linux-vdso.so.1 (0x00007fff89f0b000)
        libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007ff75334d000)
        libtinyxml.so.2 => /usr/lib64/libtinyxml.so.2 (0x00007ff753136000)
        libyajl.so.2 => /usr/lib64/libyajl.so.2 (0x00007ff752f2c000)
        libz.so.1 => /lib64/libz.so.1 (0x00007ff752d16000)
        liblzo2.so.2 => /usr/lib64/liblzo2.so.2 (0x00007ff752af4000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff7528d6000)
        libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007ff752681000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x00007ff752471000)
        libGLU.so.1 => /usr/lib64/libGLU.so.1 (0x00007ff7521f1000)
        libGLEW.so.1.10 => /usr/lib64/libGLEW.so.1.10 (0x00007ff751f61000)
        libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007ff751c2e000)
        libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 (0x00007ff75186e000)
        libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007ff75150b000)
        libxslt.so.1 => /usr/lib64/libxslt.so.1 (0x00007ff7512cf000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ff7510cb000)
        libm.so.6 => /lib64/libm.so.6 (0x00007ff750dc9000)
        libfribidi.so.0 => /usr/lib64/libfribidi.so.0 (0x00007ff750bb0000)
        libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007ff7508f4000)
        libpcrecpp.so.0 => /usr/lib64/libpcrecpp.so.0 (0x00007ff7506eb000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007ff750480000)
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007ff7501d7000)
        libtag.so.1 => /usr/lib64/libtag.so.1 (0x00007ff74fef6000)
        libcdio.so.15 => /usr/lib64/libcdio.so.15 (0x00007ff74fccd000)
        libasound.so.2 => /usr/lib64/libasound.so.2 (0x00007ff74f9e9000)
        libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3 (0x00007ff74f7ac000)
        libSDL-1.2.so.0 => /usr/lib64/libSDL-1.2.so.0 (0x00007ff74f54b000)
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007ff74f210000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007ff74effe000)
        libudev.so.1 => /lib64/libudev.so.1 (0x00007ff74edec000)
        libcap.so.2 => /lib64/libcap.so.2 (0x00007ff74ebe6000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libstdc++.so.6 (0x00007ff74e8df000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libgcc_s.so.1 (0x00007ff74e6c9000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ff74e322000)
        libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007ff74e118000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff753557000)
        libnvidia-tls.so.331.89 => /usr/lib64/libnvidia-tls.so.331.89 (0x00007ff74df15000)
        libnvidia-glcore.so.331.89 => /usr/lib64/libnvidia-glcore.so.331.89 (0x00007ff74b706000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007ff74b503000)
        libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007ff74b1d0000)
        libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007ff74af9d000)
        librt.so.1 => /lib64/librt.so.1 (0x00007ff74ad95000)
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007ff74ab74000)
        libattr.so.1 => /lib64/libattr.so.1 (0x00007ff74a96f000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007ff74a76b000)
        libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007ff74a565000)

xbmc was built with:

media-tv/xbmc-13.1  USE="X alsa caps css opengl rtmp sdl sse sse2 udisks upower usb vdpau xrandr -airplay (-altivec) -avahi -bluetooth -bluray -cec -debug -fishbmc -gles -goom -java -joystick -midi -mysql -nfs -profile -projectm -pulseaudio -pvr -rsxs -samba -sftp -upnp -vaapi -webserver" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" 0 kB

Reproducible: Always
Comment 1 Ben Kohler gentoo-dev 2014-08-04 18:54:36 UTC
What makes you think a bundled ffmpeg is being used? I think the ebuild may build a copy but it's discarded.
Comment 2 Michael Cook 2014-08-04 19:14:55 UTC
AFAIK, XBMC doesn't support external FFmpeg. Although it looks like 14.0 will once again support external FFmpeg
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-05 10:33:21 UTC
(In reply to Sebastian from comment #0)
> ldd /usr/lib64/xbmc/xbmc.bin 

You should use a better tool than ldd. `lddtree' will format the output to make a clear distinction of directly and indirectly linked libraries. `scanelf -n' will show only directly linked libraries.

And as said, we need a little more "proof" of vlc using its internal ffmpeg libraries. The ldd output doesn't show that.
Comment 4 Sebastian 2014-08-05 20:51:22 UTC
Created attachment 382356 [details]
ldd tree for xbmc-12.3
Comment 5 Sebastian 2014-08-05 20:51:45 UTC
Created attachment 382358 [details]
ldd tree for xbmc-13.1
Comment 6 Sebastian 2014-08-05 20:59:55 UTC
I've added the lddtree output for xbmc-12.3 and xbmc-13.1.

When comparing the two it appears that at least the following libraries aren't dynamically linked to anymore:

dev-libs/openssl
media-video/ffmpeg
media-libs/libsamplerate
media-video/rtmpdump

Kind regards,
Sebastian
Comment 7 Michael Cook 2014-08-06 01:04:38 UTC
XBMC also requires some custom FFmpeg patches that the Gentoo FFmpeg guys probably wouldn't want to add.
Comment 8 Paul Zander 2014-08-08 13:55:13 UTC
On a semi-related note, as of now the bundled ffmpeg ignores the job settings and defaults to -j2.

Per tools/buildsteps/README we should set BUILDTHREADS for the configure call to do that.
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-11 11:43:17 UTC
Please attach the entire media-tv/xbmc-13.1 build log to this bug report.
Comment 10 Michael Cook 2014-08-12 18:45:16 UTC
https://github.com/xbmc/xbmc/tree/13.1-Gotham/lib/ffmpeg/patches

Here are all the patches they apply to the bundled ffmpeg (1.2?) in 13.1.

Also: https://github.com/xbmc/xbmc/commit/e211654714b2266b80ba65361bda8f715d47933a

I will also add that the current alpha for 14.0 supports external FFmpeg again, but sadly that doesn't really matter since it still requires custom patches.
Comment 11 Sebastian 2014-08-12 18:51:25 UTC
Created attachment 382782 [details]
xbmc-13.1-build.log.bz2
Comment 12 SpanKY gentoo-dev 2014-08-12 23:44:43 UTC
yeah, there's not a whole lot we can do here since xbmc upstream is diverging from ffmpeg so much
Comment 13 Michael Cook 2014-08-13 17:32:32 UTC
Basically, they removed support for external ffmpeg while they cleaned up their code base. 14.0+ (aka Kodi) will support external ffmpeg. Currently it still requires at least one extra patch. In my quick test, https://github.com/xbmc/xbmc/blob/13.1-Gotham/lib/ffmpeg/patches/0024-add-public-version-of-ff_read_frame_flush.patch was the only thing that needed to be applied to media-video/ffmpeg-2.2.5. (although my testing was just commenting out the offending XBMC code and seeing it compiled)
Comment 14 Sebastian 2014-09-28 13:25:24 UTC
Created attachment 385674 [details]
debian-patches.tar.bz2

This is a bunch of patches from Debian sid. I didn't change them. I took all their patches except the one where they debianized the version string etc.
Comment 15 Sebastian 2014-09-28 13:26:39 UTC
Created attachment 385676 [details, diff]
xbmc-13.2-add-debian-patches-and-update-depends.patch

Apply debian's patches. Fix the depends accordingly.
Comment 16 Sebastian 2014-09-28 13:27:35 UTC
Created attachment 385678 [details]
xbmc-13.2-r1.ebuild

Same thing as before, only as a full ebuild (r1).
Comment 17 Sebastian 2014-09-28 13:30:38 UTC
With the debian patches xbmc again works fine with external ffmpeg (plus external libsidpay, libhdhomerun and libdvdread).

I saw the comment about xbmc's ffmpeg patchset. But using an internal ffmpeg is just too wrong to care :)
Comment 18 hal 2014-12-20 01:25:40 UTC
I just wanted to add a link to an upstream discussion about the entire topic: https://github.com/xbmc/xbmc/pull/4005
Comment 19 SpanKY gentoo-dev 2015-02-17 00:11:41 UTC
media-tv/kodi-14.1 should use the system ffmpeg now.  lets see how long that sticks :).