FS#56065 - [kodi][gst-libav] Recent update of ffmpeg breaks video playback
Attached to Project:
Community Packages
Opened by John (graysky) - Saturday, 21 October 2017, 12:15 GMT
Last edited by Ike Devolder (BlackEagle) - Sunday, 24 December 2017, 11:23 GMT
Opened by John (graysky) - Saturday, 21 October 2017, 12:15 GMT
Last edited by Ike Devolder (BlackEagle) - Sunday, 24 December 2017, 11:23 GMT
|
Details
Updating to ffmpeg-1:3.4-1 causes video playback from within
kodi to freeze. Downgrading to ffmpeg-1:3.3.4-1 fixes the
problem.
https://bbs.archlinux.org/viewtopic.php?id=231120 Affected versions: ffmpeg-1:3.4-1 kodi-17.4-6 |
This task depends upon
Closed by Ike Devolder (BlackEagle)
Sunday, 24 December 2017, 11:23 GMT
Reason for closing: Implemented
Sunday, 24 December 2017, 11:23 GMT
Reason for closing: Implemented
Running parole with "--gst-debug-level=1" prints the following repeatedly when using ffmpeg-1:3.4-1:
0:00:00.328109161 29520 0x7fabb0006770 ERROR libav :0:: Got unexpected packet size after a partial decode
After some time, parole pops up a dialog saying "The stream is taking too much time to load", offering to continue loading or abort it.
The error does not occur with the previous version of the package, ffmpeg-1:3.3.4-1.
EDIT: clarified package versions + parole error message
So either kodi needs to change something how the API is used with ffmpeg 3.4.x or its indeed a bug in the reconstruction code when using this compat API.
The symptoms are pretty much the same as https://trac.mplayerhq.hu/ticket/2329 which seems to have "broken" the compat API in terms of 100% backwards compatibility, mplayer
for AC3 decoding in mplayer this was fixed by svn diff -r 37945:37946 svn://svn.mplayerhq.hu/mplayer/trunk@37946
We should figure this out and possibly add a patch to kodi (plus obviously report the problem upstream).
Can you test running mplayer against the file that freezes?
@ike - One on the kodi developers see no problems with ffmpeg 3.4 on his test machine. His hypothesis is that the problem is with our stuff. See: https://forum.kodi.tv/showthread.php?tid=322777
It seems to me that if ffmpeg works elsewhere, and kodi cannot use it probably because of a changed API, then the ffmpeg installation itself is not fundamentally buggy... and also as a bug for [extra] packages it cannot be assigned to maintainers of [community].
Which is not to say ffmpeg is being completely ruled out, and if other ffmpeg consumers have the same issue then of course we can assign those packages too.
Also ffmpeg did not change the major soname, but why should they do such bloat anyway...
...
Anyway good point that the ffmpeg maintainer might have useful insight into this regardless of whose bug it is.
So it should be figured out what kodi 18 does differently. Just because latest kodi HEAD works, should not mean that the kodi devs shouldn't care at all about their latest stable released versions. again: IMO they should find out what fixes this behavior on their side.
For kodi there is a solution used in archlinuxarm where kodi is bundled with the proper ffmpeg version:
https://archlinuxarm.org/packages/aarch64/kodi-c2/files/PKGBUILD
However this doesn't solve the problem for other ffmpeg based players. OTOH I assume that sticking to the older ffmpeg version is against normal Arch Linux policy which makes the problem even tougher.
EDIT: Might be a lesser problem depending on how fast dependants are upgraded :)
So any video players using ffmpeg via gstreamer will now work, hopefully the gnome bug will be resolved soon and we can go back to the system ffmpeg.
I don't see the need, kodi master officially supports ffmpeg 3.4 as of https://github.com/xbmc/xbmc/commit/4f3875f4492ebaacf12b83a006cef71a3fcaa1b4 so it would be better to figure out which changes to backport, whereas gst-libav does not have any fixes available -- see the linked bugreport.
Note that archlinuxarm is still using a PKGBUILD based on our package, from before we moved *away* from a bundled ffmpeg in
FS#55675and you cannot really bring that as a comparison.FS#55675before.But the reasons why I mentioned bundled ffmpeg are:
* what @graysky pointed to: https://github.com/xbmc/xbmc/commit/5ba6eb7cadc41d5eb86ef94e3661b833b62953ff
* kodi 18 is not officially stable and switching to it completely may bring other sorts of issues
EDIT: corrected last sentence about kodi 18. Backporting the fix is reasonable of course.
FS#55675). If it was to allow offline builds, it doesn't achieve that goal due to other packages getting downloaded at compile (crossguid, dvdcss, dvdread, and dvdnav). The switch to external ffmpeg also pulls down additional MBs of ffmpeg deps that the internal build did not need. I updated the referenced FS.As to a path forward with this specific breakage, the kodi forum post I referenced contains some thoughts of one of their developers regarding a backport, which is pretty blunt. My vote would be to return to the internal ffmpeg as a fix.
@eschwartz - Yes, Arch ARM offers several different kodi builds, they are a bit different from each other. I have done my best to keep kodi-rbp[1] in parity with our PKGBUILD.
1. https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/kodi-rbp/PKGBUILD
And yes, we get that upstreams which recommend vendoring everything are uninterested in looking at backporting things they don't want to support to begin with.