Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634802 - media-tv/kodi 17.4-r1 with media-video/ffmpeg-3.4: video playback does not work
Summary: media-tv/kodi 17.4-r1 with media-video/ffmpeg-3.4: video playback does not work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-19 17:37 UTC by Mark Nowiasz
Modified: 2018-01-19 15:29 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Nowiasz 2017-10-19 17:37:14 UTC
After updating ffmpeg-3.4 and restarting kodi, kodi is unable to play any video, it justed displays a black screen when trying to start a video.
Comment 1 Tomasz Golinski 2017-10-20 12:25:18 UTC
I also have the problem. To be precise - the time is moving forward, only video and audio are not being played. Seeking in a file displays a fixed frame from target point in stream. 

The problem seems to be related to audio decode part of the stream, since I was able to play files with AC3/DTS stream via passthrough without any problem. However music playback works correctly.
Comment 2 Kenneth Miller 2017-10-22 05:35:16 UTC
I have the same issue kodi-17.4-r1 and ffmpeg-3.4 cause video to not play. Downgrading ffmpeg to 3.3.4 resolves issue.
Comment 3 Louis Sautier (sbraz) gentoo-dev 2017-10-22 21:20:19 UTC
Same here, I should mention I'm using pulseaudio, probably like everybody else?
With ffmpeg 3.3.4, it works fine.
Comment 4 Carl Eugen Hoyos 2017-10-23 09:25:26 UTC
This will need a bisect to find the FFmpeg commit introducing the issue.
Comment 5 bastien-jacquot 2017-10-24 17:53:12 UTC
It seems ffmpeg 3.4 is not supported in kodi 17.x (personnaly tried 17.4 and 17.5) as said in this thread, and kodi developers would'nt fixed this bug :

https://forum.kodi.tv/showthread.php?tid=322777&pid=2658002#pid2658002
https://github.com/xbmc/xbmc/commit/5ba6eb7cadc41d5eb86ef94e3661b833b62953ff

it seems we should wait for kodi 18.

could be great to modify kodi's ebuild to indicate this dependency.
thx.
Comment 6 Larry the Git Cow gentoo-dev 2017-10-24 19:09:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4094bbbc44aa7e0dee193fffdc8cda30524ea3f

commit d4094bbbc44aa7e0dee193fffdc8cda30524ea3f
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2017-10-24 19:06:00 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2017-10-24 19:06:31 +0000

    media-tv/kodi: 17.* requires <media-video/ffmpeg-3.4
    
    Closes: https://bugs.gentoo.org/634802
    Package-Manager: Portage-2.3.12, Repoman-2.3.3

 media-tv/kodi/{kodi-17.5.ebuild => kodi-17.5-r1.ebuild} | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 7 Craig Andrews gentoo-dev 2017-10-24 19:12:56 UTC
If you want to use ffmpeg 3.4 (or later), you have two options:
1) Use Kodi 18 (or later). There hasn't been an RC yet, but you can use kodi-9999.
2) use USE="-system-ffmpeg". Note that this use flag is hard masked. I don't recommend you use this option; using bundled libraries is generally not a good. For example, if there's a vulnerability in ffmpeg, Gentoo will likely very quickly release an update, but if you're using Kodi's bundled ffmpeg, you'll need to wait for them to make a release.

I recommend that users stick with Kodi 17 and simply use ffmpeg < 3.4
Comment 8 Alexis Ballier gentoo-dev 2017-10-25 08:02:36 UTC
(In reply to Craig Andrews from comment #7)
> If you want to use ffmpeg 3.4 (or later), you have two options:
> 1) Use Kodi 18 (or later). There hasn't been an RC yet, but you can use
> kodi-9999.
> 2) use USE="-system-ffmpeg". Note that this use flag is hard masked. I don't
> recommend you use this option; using bundled libraries is generally not a
> good. For example, if there's a vulnerability in ffmpeg, Gentoo will likely
> very quickly release an update, but if you're using Kodi's bundled ffmpeg,
> you'll need to wait for them to make a release.
> 
> I recommend that users stick with Kodi 17 and simply use ffmpeg < 3.4

This is not really fixed as this will cause downgrades and possibly users using a ffmpeg version with security vulnerabilities once we stop supporting older ffmpeg versions. reopening, I'll see what I can do about it.
Comment 9 Paolo Pedroni 2017-10-25 12:14:09 UTC
Does this happen even if you rebuild kodi after upgrading to ffmpeg-3.4.0? I seem to remember that doing that fixed the problem for me. (I can't check because my kodi box suffered an hardware failure shortly after the upgrade to ffmpeg-3.4).
Comment 10 Pertti Kosunen 2017-10-25 13:22:41 UTC
(In reply to Paolo Pedroni from comment #9)
> Does this happen even if you rebuild kodi after upgrading to ffmpeg-3.4.0?

Yes, rebuilding Kodi does not help.
Comment 11 Mark Nowiasz 2017-10-25 17:07:44 UTC
(In reply to Alexis Ballier from comment #8)
> (In reply to Craig Andrews from comment #7)

> This is not really fixed as this will cause downgrades and possibly users
> using a ffmpeg version with security vulnerabilities once we stop supporting
> older ffmpeg versions. reopening, I'll see what I can do about it.

Well, how about removing the line


media-tv/kodi system-ffmpeg

in package.use.force, hence enabling the user to choose to build kodi with -system-ffmpeg. Apart from the fact that this gives the user the choice back (and isn't Linux and especially Gentoo all about giving people free choices?) kodi will run with a version of ffmpeg guaranteed to work - in this case ffmpeg 3.1 (which is - according to kodi - the only supported ffmpeg version by 17.x)

Let the Kodi bunch decide to backport security fixes - even if there are security problems, only kodi (and not the other programs depending on ffmpeg) are affected. There's also a bonus: enabling vaapi might stop causing kernel panics(yes, that happened to me when enabling vaapi using system-ffmpeg >3.1, intel graphics).

I think this would be the best way of handling the situation.
Comment 12 Craig Andrews gentoo-dev 2017-10-25 17:21:28 UTC
(In reply to Mark Nowiasz from comment #11)
> (In reply to Alexis Ballier from comment #8)
> > (In reply to Craig Andrews from comment #7)
> 
> > This is not really fixed as this will cause downgrades and possibly users
> > using a ffmpeg version with security vulnerabilities once we stop supporting
> > older ffmpeg versions. reopening, I'll see what I can do about it.
> 
> Well, how about removing the line
> 
> 
> media-tv/kodi system-ffmpeg
> 
> in package.use.force, hence enabling the user to choose to build kodi with
> -system-ffmpeg. Apart from the fact that this gives the user the choice back
> (and isn't Linux and especially Gentoo all about giving people free
> choices?) kodi will run with a version of ffmpeg guaranteed to work - in
> this case ffmpeg 3.1 (which is - according to kodi - the only supported
> ffmpeg version by 17.x)
> 
> Let the Kodi bunch decide to backport security fixes - even if there are
> security problems, only kodi (and not the other programs depending on
> ffmpeg) are affected. There's also a bonus: enabling vaapi might stop
> causing kernel panics(yes, that happened to me when enabling vaapi using
> system-ffmpeg >3.1, intel graphics).
> 
> I think this would be the best way of handling the situation.

The user has the choice already, for, as you pointed out, there is a "system-ffmpeg" use flag. It is hard masked - if the user cannot determine how to un-hard-mask it (overriding the package.use.force), then they shouldn't be using it. :)

Gentoo has a policy (of which I agree) to not allow bundled libraries: https://wiki.gentoo.org/wiki/Why_not_bundle_dependencies I'm not going to debate the policy here (except to say your security argument is scary... a Kodi compromise could lead to full system compromise, at least I bet it does on most installations, or at least a compromise of the network the Kodi system is on).

I've provided my recommendation, but there is one other thing you can do: help. You can do so by figuring out what patches are necessary to ffmpeg and/or Kodi in order to bring ffmeg 3.4 compatibility to Kodi 17. Both the ffmpeg and Kodi Gentoo maintainers would be happy to work with you (or anyone else) towards getting such patches upstreamed and/or into portage for everyone to enjoy.
Comment 13 James Cowgill 2017-11-04 18:57:47 UTC
I believe this is this upstream ffmpeg bug:
https://trac.ffmpeg.org/ticket/6775

Kodi 18 works because they rewrote all the ffmpeg calls to use the new decoding API (avcodec_send_packet, avcodec_receive_frame).
Comment 14 Larry the Git Cow gentoo-dev 2018-01-13 12:47:41 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c4b195d0e944d418f80a85650a10cbde26ac332

commit 5c4b195d0e944d418f80a85650a10cbde26ac332
Author:     Alexis Ballier <aballier@gentoo.org>
AuthorDate: 2018-01-13 12:47:20 +0000
Commit:     Alexis Ballier <aballier@gentoo.org>
CommitDate: 2018-01-13 12:47:32 +0000

    media-tv/kodi: Tweak ffmpeg dep to mark only 3.4 as broken with Kodi.
    
    The patch fixing Kodi & gst has been applied to 3.4.1, so from that version onwards it is fine to use.
    
    Closes: https://bugs.gentoo.org/634802
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 media-tv/kodi/kodi-17.6-r2.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 15 Mark Nowiasz 2018-01-15 19:55:22 UTC
I'm not sure if it's really fixed. Sure, kodi 17.x (17.6-r2 in my case) now compiles fine with ffmpeg 3.4.1. However, when playing videos the sound quality is just plain awful in most of the cases - especially the lower frequency parts of the sound track (it sounds like the loudspeakers are broken).

When using -system-ffmpeg audio playback (at least, when playing movies) is working just fine again.
Comment 16 Kajzer 2018-01-18 22:33:03 UTC
I can confirm audio issues with ffmpeg 3.4.1 and 17.6-r2
Hard to explain what's going on with audio but it's mostly crackling noise mixed in with the sound, it's just bad, unwatchable.
Comment 17 faminebadger 2018-01-19 15:29:17 UTC
I was unaware of this bug, so I raised https://bugs.gentoo.org/645000 for the same audio issues discussed in the previous couple of comments.