I originally filed this bug upstream at http://trac.xbmc.org/ticket/14019 but since upstream won't fix it I'll file another bug here. The original report was for 12.0_rc3, but the issue is still present in 12.1. "When playing a file or bluray playlist with PGS subtitles I've seen two different scenarios: 1. no subtitles are displayed or 2. Subtitles are mangled, many subtitle lines are displayed on top of each other and not at all in sync with the movie. All tested files works fine in Eden. Text subtitles and vobsubs seems to work fine." For a sample file, use the attachment to the original bug report or contact me and I'll send you one. I managed to narrow it down to the use of external ffmpeg, but I don't really know where to go from there: "Seems to be related to external ffmpeg after all. Compiling git manually (with --disable-mysql --disable-ssh) works fine, but compiling the same source with --enable-external-ffmpeg makes the problem reappear. This is true even when using ffmpeg-0.10.2 (which appears to be the ffmpeg-version boundled with xbmc)" Unfortunately, the bug at xbmc.org was closed with the following comment: "External ffmpeg is not supported by us. Talk to packagers that insist on turning i ton." Here is the current depgraph: # equery depgraph =media-tv/xbmc-12.1 * Searching for xbmc12.1 in media-tv ... * dependency graph for media-tv/xbmc-12.1 `-- media-tv/xbmc-12.1 ~amd64 `-- app-arch/bzip2-1.0.6-r3 (app-arch/bzip2) amd64 `-- app-arch/unzip-6.0-r3 (app-arch/unzip) ~amd64 `-- app-arch/zip-3.0-r1 (app-arch/zip) ~amd64 `-- app-i18n/enca-1.14 (app-i18n/enca) ~amd64 `-- app-pda/libplist-1.8-r1 (app-pda/libplist) amd64 `-- dev-lang/python-3.2.3-r2 (>=dev-lang/python-2.4) ~amd64 `-- dev-libs/boost-1.52.0-r6 (dev-libs/boost) ~amd64 `-- dev-libs/fribidi-0.19.5-r1 (dev-libs/fribidi) amd64 `-- dev-libs/libcdio-0.83 (dev-libs/libcdio) amd64 [-minimal] `-- dev-libs/libcec-2.1.1 (>=dev-libs/libcec-2.1) ~amd64 `-- dev-libs/libpcre-8.32 (dev-libs/libpcre) ~amd64 [cxx] `-- dev-libs/lzo-2.06 (>=dev-libs/lzo-2.04) amd64 `-- dev-libs/tinyxml-2.6.2-r2 (dev-libs/tinyxml) amd64 [stl] `-- dev-libs/yajl-2.0.4 (dev-libs/yajl) ~amd64 `-- dev-python/simplejson-3.1.3 (dev-python/simplejson) ~amd64 `-- media-libs/alsa-lib-1.0.26-r2 (media-libs/alsa-lib) ~amd64 `-- media-libs/flac-1.2.1-r4 (media-libs/flac) ~amd64 `-- media-libs/fontconfig-2.10.2 (media-libs/fontconfig) ~amd64 `-- media-libs/freetype-2.4.11 (media-libs/freetype) amd64 `-- media-libs/glew-1.9.0 (>=media-libs/glew-1.5.6) ~amd64 `-- media-libs/jasper-1.900.1-r6 (media-libs/jasper) ~amd64 `-- media-libs/jbigkit-2.0-r1 (media-libs/jbigkit) amd64 `-- media-libs/libass-0.10.1 (>=media-libs/libass-0.9.7) ~amd64 `-- media-libs/libbluray-0.2.3 (media-libs/libbluray) amd64 `-- media-libs/libdvdcss-1.2.13 (media-libs/libdvdcss) amd64 `-- media-libs/libmad-0.15.1b-r7 (media-libs/libmad) amd64 `-- media-libs/libmodplug-0.8.8.4 (media-libs/libmodplug) amd64 `-- media-libs/libmpeg2-0.5.1-r1 (media-libs/libmpeg2) ~amd64 `-- media-libs/libogg-1.3.0 (media-libs/libogg) amd64 `-- media-libs/libpng-1.6.1-r1 (media-libs/libpng) ~amd64 `-- media-libs/libprojectm-2.1.0-r1 (media-libs/libprojectm) ~amd64 `-- media-libs/libsamplerate-0.1.8 (media-libs/libsamplerate) ~amd64 `-- media-libs/libsdl-1.2.15-r2 (media-libs/libsdl) amd64 [audio opengl video X] `-- media-libs/taglib-1.8-r1 (>=media-libs/taglib-1.8) ~amd64 `-- media-libs/libvorbis-1.3.3 (media-libs/libvorbis) ~amd64 `-- media-libs/sdl-gfx-2.0.24 (media-libs/sdl-gfx) ~amd64 `-- media-libs/sdl-image-1.2.12 (>=media-libs/sdl-image-1.2.10) amd64 [gif jpeg png] `-- media-libs/sdl-mixer-1.2.12-r3 (media-libs/sdl-mixer) ~amd64 `-- media-libs/sdl-sound-1.0.3 (media-libs/sdl-sound) amd64 `-- media-libs/tiff-4.0.3-r1 (media-libs/tiff) ~amd64 `-- media-sound/pulseaudio-3.0 (media-sound/pulseaudio) ~amd64 `-- media-sound/wavpack-4.60.1 (media-sound/wavpack) amd64 `-- media-libs/libpostproc-0.8.0.20121125 (media-libs/libpostproc) amd64 `-- media-video/ffmpeg-1.0.6 (media-video/ffmpeg) ~amd64 `-- virtual/ffmpeg-0.10.3 (>=virtual/ffmpeg-0.6) ~amd64 [encode] `-- media-video/rtmpdump-2.4 (media-video/rtmpdump) ~amd64 `-- net-dns/avahi-0.6.31-r1 (net-dns/avahi) ~amd64 `-- net-fs/libnfs-1.5.0 (net-fs/libnfs) ~amd64 `-- net-libs/libmicrohttpd-0.9.26 (net-libs/libmicrohttpd) ~amd64 [messages] `-- net-libs/libssh-0.5.4 (net-libs/libssh) amd64 `-- net-misc/curl-7.30.0 (net-misc/curl) ~amd64 `-- net-fs/samba-3.6.13 (>=net-fs/samba-3.4.6) ~amd64 [smbclient] `-- net-wireless/bluez-4.101-r5 (net-wireless/bluez) amd64 `-- sys-apps/dbus-1.6.8-r1 (sys-apps/dbus) ~amd64 `-- sys-libs/libcap-2.22-r1 (sys-libs/libcap) ~amd64 `-- sys-libs/zlib-1.2.7 (sys-libs/zlib) ~amd64 `-- virtual/jpeg-0 (virtual/jpeg) amd64 `-- virtual/libusb-1 (virtual/libusb) amd64 `-- virtual/mysql-5.5 (virtual/mysql) ~amd64 `-- virtual/glu-9.0 (virtual/glu) ~amd64 `-- virtual/opengl-7.0 (virtual/opengl) amd64 `-- x11-libs/libva-1.1.1 (x11-libs/libva) ~amd64 [opengl] `-- x11-libs/libvdpau-0.5-r1 (x11-libs/libvdpau) ~amd64 `-- x11-drivers/nvidia-drivers-313.30 (>=x11-drivers/nvidia-drivers-180.51) amd64 `-- x11-apps/xdpyinfo-1.3.0-r1 (x11-apps/xdpyinfo) amd64 `-- x11-apps/mesa-progs-8.1.0 (x11-apps/mesa-progs) ~amd64 `-- x11-libs/libXinerama-1.1.2-r1 (x11-libs/libXinerama) ~amd64 `-- x11-libs/libXrandr-1.4.0-r1 (x11-libs/libXrandr) ~amd64 `-- x11-libs/libXrender-0.9.7-r1 (x11-libs/libXrender) ~amd64 `-- app-arch/xz-utils-5.0.4-r1 (app-arch/xz-utils) ~amd64 `-- dev-lang/swig-2.0.9 (dev-lang/swig) ~amd64 `-- dev-util/gperf-3.0.4 (dev-util/gperf) amd64 `-- x11-proto/xineramaproto-1.2.1-r1 (x11-proto/xineramaproto) ~amd64 `-- dev-util/cmake-2.8.10.2-r2 (dev-util/cmake) ~amd64 `-- dev-lang/nasm-2.10.07 (dev-lang/nasm) amd64 `-- virtual/jre-1.7.0 (virtual/jre) ~amd64 `-- dev-lang/python-2.7.3-r3 (=dev-lang/python-2.7*) ~amd64 `-- dev-lang/python-2.6.8-r1 (=dev-lang/python-2.6*) amd64 `-- sys-devel/automake-1.12.6 (>=sys-devel/automake-1.12) ~amd64 `-- sys-devel/autoconf-2.69 (>=sys-devel/autoconf-2.68) ~amd64 `-- sys-devel/libtool-2.4.2 (sys-devel/libtool) ~amd64 `-- sys-fs/udisks-1.0.4-r5 (sys-fs/udisks) ~amd64 `-- sys-power/upower-0.9.20-r2 (sys-power/upower) amd64 [ media-tv/xbmc-12.1 stats: packages (84), max depth (1) ]
sounds like a bug in ffmpeg
sounds like https://github.com/xbmc/xbmc/pull/2666 could you please check if the commit in this PR fixes your problem ?
(In reply to comment #2) > sounds like https://github.com/xbmc/xbmc/pull/2666 > > could you please check if the commit in this PR fixes your problem ? Unfortunately this commit does not fix this issue. Regarding if this is a bug in xbmc or ffmpeg: I figured this was a xbmc bug since other media players built against ffmpeg shows PGS subtitles as expected (I tried at least mplayer and VLC).
http://trac.xbmc.org/ticket/14019#comment:9 Apparently the developers are not going to fix this and instead ask for external ffmpeg support to be disabled, could that be changed in the tree? I did it locally and everything works fine.
(In reply to comment #4) we don't bundle libraries
I managed to use the internal ffmpeg with info from http://forum.xbmc.org/showthread.php?tid=148803 I only needed to add: --disable-external-ffmpeg \ to the src_configure() -> econf section of the ebuild. after this run: ebuild "the path to your ebuild" digest emerge xbmc and problem solved. Seems xbmc with external jpeg is broken in different ways. Simon
In reply to comment #5. I can fully understand why the gentoo devs don't want to bundle libraries. See Flameeyes blogs: https://blog.flameeyes.eu/2013/04/bundling-libraries-for-trouble and the links in it for an explanation the reasons. That being said: in my opinion the most important thing is to deliver a working, secury and easy to maintain system. Splitting out the librearies is a means to that end. This means that in my opinion splitting libraries out can and should only be done when it doesn't affect functionality. So I think comment #5 is a bit to short sighted. Simon
ok, so this commit seems to fix your sample here: https://github.com/xbmc/xbmc/commit/0066076ee4a26cc1a82414b584ca25fc8995cac9 could you please check it fixes all the problems ?
(In reply to Alexis Ballier from comment #8) > ok, so this commit seems to fix your sample here: > https://github.com/xbmc/xbmc/commit/0066076ee4a26cc1a82414b584ca25fc8995cac9 > > could you please check it fixes all the problems ? It's the same commit you wrote earlier. At first I tried it against ffmpeg-0.10.6 and the problem persisted, but after an upgrade to ffmpeg-1.0.7 PGS subtitles seems to work fine.
(In reply to Fredrik Eriksson from comment #9) > (In reply to Alexis Ballier from comment #8) > > ok, so this commit seems to fix your sample here: > > https://github.com/xbmc/xbmc/commit/0066076ee4a26cc1a82414b584ca25fc8995cac9 > > > > could you please check it fixes all the problems ? > > It's the same commit you wrote earlier. At first I tried it against > ffmpeg-0.10.6 and the problem persisted, but after an upgrade to > ffmpeg-1.0.7 PGS subtitles seems to work fine. yep, ffmpeg 0.10 is starting to be very old. xbmc team probably backported some patches to make it work; I'd rather get ffmpeg 1.0 stable and get rid of 0.10.
+*xbmc-12.2-r1 (13 Jun 2013) + + 13 Jun 2013; Alexis Ballier <aballier@gentoo.org> +xbmc-12.2-r1.ebuild: + Backport some FFmpeg related fixes from master. + Fixes bugs #466718, #463588 and should improve libav compatibility. + -> fixed if you use ffmpeg 1.0