Kodi Community Forum
Linux Updating to ffmpeg v3.4 break kodi playback - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Linux Updating to ffmpeg v3.4 break kodi playback (/showthread.php?tid=322777)

Pages: 1 2


Updating to ffmpeg v3.4 break kodi playback - graysky - 2017-10-21

Upon updating to ffmpeg-1:3.4-1 on Arch Linux, kodi cannot playback video content. Upon trying to playback video content, kodi simply displays 1 or 2 frames of the video and seems to freeze there. The CPU goes up to 100% usage until playback is stopped which returns to the kodi GUI.

The fix is to downgrading to ffmpeg-1:3.3.4-1. Linked below is a debug log. I post here asking for someone to review the log and help pin-point what is wrong so I can create an informed bug report against ffmpeg. Thank you.

Link to debug log.


RE: Updating to ffmpeg v3.4 break kodi playback - fritsch - 2017-10-21

(2017-10-21, 20:42)graysky Wrote: Upon updating to ffmpeg-1:3.4-1 on Arch Linux, kodi cannot playback video content.  Upon trying to playback video content, kodi simply displays 1 or 2 frames of the video and seems to freeze there.  The CPU goes up to 100% usage until playback is stopped which returns to the kodi GUI.

The fix is to downgrading to ffmpeg-1:3.3.4-1.  Linked below is a debug log.  I post here asking for someone to review the log and help pin-point what is wrong so I can create an informed bug report against ffmpeg.  Thank you.

Link to debug log.

Your log shows sever audio issues, related to refreshrate switching ... there is absolutely nothing related to ffmpeg in your log.


RE: Updating to ffmpeg v3.4 break kodi playback - graysky - 2017-10-21

I agree and figured I was just missing it.  I can just point to the fact that on 6 different videos, the same symptoms are present and if I downgrade ffmpeg, the same 6 play without a problem.  Highly confident ffmpeg is to blame but need some data to share with ffmpeg upstream rather than just a bug report detailing the problem without a direction for them :/

EDIT: If you look at the Arch bug report, another user mentions similar problems with the new ffmpeg and parole media player.


RE: Updating to ffmpeg v3.4 break kodi playback - fritsch - 2017-10-22

(2017-10-21, 22:43)graysky Wrote: I agree and figured I was just missing it.  I can just point to the fact that on 6 different videos, the same symptoms are present and if I downgrade ffmpeg, the same 6 play without a problem.  Highly confident ffmpeg is to blame but need some data to share with ffmpeg upstream rather than just a bug report detailing the problem without a direction for them :/

EDIT: If you look at the Arch bug report, another user mentions similar problems with the new ffmpeg and parole media player.

As I don't see anything in your logfile and as it works perfectly on my Ubuntu machine I am not sure I can do anything about it.

But: try with ffplay from ffmpeg 3.4 and check ffmpeg command with 3.4 - cause this is what the ffmpeg guys will need. If you can rule out arch illnesses before (mixing latest and greatest and a semi rebuild environment), that would be great.

Edit: Something else: if you have issues with VAAPI only (e.g. sw playback works) it might be ARCH shipping vaapi 2.0 (cause latest is greatest ;-)) in combination with missing this one: https://github.com/FFmpeg/FFmpeg/commit/01e291a592452f27b3a4e811536aaaf94096e244 which was pushed to 3.4 ffmpeg branch.


RE: Updating to ffmpeg v3.4 break kodi playback - mccurly - 2017-10-22

Hello,

I had this problem too.

Took me long to get here to this particular thread.

After following @graysky advice from OP , problem gets circumvented.

@fritsch, sorry but I don't know how to implement your suggestion can you please give more information as to how can we use both latest ffmpeg and kodi krypton here in arch-linux?

Perhaps this is an Arch-Linux-only problem... and should be taken there, accordingly...

Thank-you.


RE: Updating to ffmpeg v3.4 break kodi playback - graysky - 2017-10-22

(2017-10-22, 07:55)fritsch Wrote: As I don't see anything in your logfile and as it works perfectly on my Ubuntu machine I am not sure I can do anything about it.

But: try with ffplay from ffmpeg 3.4 and check ffmpeg command with 3.4 - cause this is what the ffmpeg guys will need. If you can rule out arch illnesses before (mixing latest and greatest and a semi rebuild environment), that would be great.

Edit: Something else: if you have issues with VAAPI only (e.g. sw playback works) it might be ARCH shipping vaapi 2.0 (cause latest is greatest ;-)) in combination with missing this one: https://github.com/FFmpeg/FFmpeg/commit/01e291a592452f27b3a4e811536aaaf94096e244 which was pushed to 3.4 ffmpeg branch.

As far as I can tell, Arch is shipping vaapi v1.8.3
Code:
% pacman -Ss libva
extra/libva 1.8.3-1 [installed]
    Video Acceleration (VA) API for Linux
extra/libva-intel-driver 1.8.3-1 [installed]
    VA-API implementation for Intel G45 and HD Graphics family

A get the same freeze/100% CPU usage when I attempt playback with VAAPI enabled or disabled in the Kodi GUI.


If I use ffplay /mnt/media/videotestclip.1080p.mkv playback is fine.  Has to be some incompatibility with ffmpeg+kodi.  Do you see anything in how we are compiling kodi that might explain?

Code:
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DENABLE_EVENTCLIENTS=ON \
    -DLIRC_DEVICE=/run/lirc/lircd \
    -DENABLE_INTERNAL_FFMPEG="no" \
    -DWITH_FFMPEG="yes" \
    ../"xbmc-$pkgver-$_codename"/project/cmake

The complete PKGBUILD can be viewed here.


RE: Updating to ffmpeg v3.4 break kodi playback - fritsch - 2017-10-22

As said: Running fine on my Apollo Lake with kodi 18 HEAD + ffmpeg 3.4 + mesa 10.2.x + libva / vaapi-intel-driver 1.8.3 + linux drm-tip -> no generic incompatibility between kodi and ffmpeg.


RE: Updating to ffmpeg v3.4 break kodi playback - graysky - 2017-10-22

OK, thank you for the advise and confirmation. Let's see what the Arch devs think about it.


RE: Updating to ffmpeg v3.4 break kodi playback - graysky - 2017-10-22

@fritsch - When I run kodi from git (18.0-ALPHA1 Git:20171021-d68e7e31b1) it plays the video without error using the suspect ffmpeg version. Therefore, we can conclude that kodi-17.4-6 and ffmpeg-1:3.4 is the problem. Can you repeat your experiment using 17.4 with the new ffmpeg?


RE: Updating to ffmpeg v3.4 break kodi playback - P.Kosunen - 2017-10-22

I had same issue with Gentoo when updated system and ffmpeg yesterday, switched back to Kodis (17.4) version of ffmpeg as workaround. (I updated mesa, libva and vaapi intel driver straigth from version control.)

https://forums.gentoo.org/viewtopic-t-1070830.html
https://bugs.gentoo.org/634802

Code:
vainfo: VA-API version: 1.0 (libva 2.0.1.pre1)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.0.1.pre1 (1.8.3-157-g3bee13d)



RE: Updating to ffmpeg v3.4 break kodi playback - X-dark - 2017-10-22

Disabling refreshrate switching or VAAPI, while using ffmpeg 3.4, does not fix it. The problem is elsewhere.


RE: Updating to ffmpeg v3.4 break kodi playback - wsnipex - 2017-10-22

guys, we explicitly state that kodi v17 uses ffmpeg 3.1: https://github.com/xbmc/xbmc/commit/5ba6eb7cadc41d5eb86ef94e3661b833b62953ff


RE: Updating to ffmpeg v3.4 break kodi playback - fritsch - 2017-10-23

And once again: latest & greatest syndrome :-)


RE: Updating to ffmpeg v3.4 break kodi playback - graysky - 2017-10-24

Since I too can use ffmpeg-3.4 with kodi from master, do you have any thoughts on how trivial (or not) it would be to backport a patch to allow the fix in 17.5?


RE: Updating to ffmpeg v3.4 break kodi playback - Martijn - 2017-10-24

(2017-10-24, 00:23)graysky Wrote: Since I too can use ffmpeg-3.4 with kodi from master, do you have any thoughts on how trivial (or not) it would be to backport a patch to allow the fix in 17.5?

not gonna happen.
You simply use what we define.