Bug 6000

Summary: kodi 19.1 does not support ffmpeg 4.4
Product: Fedora Reporter: vigerske
Component: kodiAssignee: Michael Cronenworth <mike>
Status: RESOLVED FIXED    
Severity: enhancement CC: alexl, ktdreyer, leigh123linux, leonid_bogdanov, maci
Priority: P1 Flags: leigh123linux: needinfo+
Version: f34   
Hardware: x86_64   
OS: GNU/Linux   
namespace:

Description vigerske 2021-05-22 20:24:09 CEST
AC3 transcoding is broken with Kodi 19, because a too new version of ffmpeg-libs is used:

ffmpeg-libs.x86_64     4.4-2.fc34        @rpmfusion-free        
kodi.x86_64            19.1-1.fc34       @rpmfusion-free-updates

In the Kodi log, I get this error when trying to play a video with audio passthrough and AC3 transcoding enabled: 

2021-05-22 16:17:02.596 T:4506     INFO <general>: CAEEncoderFFmpeg::Initialize - AC3 encoder ready
2021-05-22 16:17:02.626 T:4506    ERROR <general>: CAEEncoderFFmpeg::Encode - Encoding failed

There is a comment at https://github.com/xbmc/xbmc/issues/19678#issuecomment-830996746 saying that ffmpeg 4.4 is not yet supported.

Also the dependency for Kodi 19 (Matrix) is set to be 4.3.2-Matrix-19.1: https://github.com/xbmc/xbmc/blob/Matrix/tools/depends/target/ffmpeg/FFMPEG-VERSION

Finally, if I compile ffmpeg from https://github.com/xbmc/FFmpeg/releases/tag/4.3.2-Matrix-19.1 and force kodi to use it (via LD_PRELOAD), then AC3 transcoding is working again.

Would be nice if the kodi package in rpmfusion could be linked against a ffmpeg 4.3 library.
Comment 1 leigh scott 2021-05-22 22:45:31 CEST
Kodi will need patching to support ffmpeg-4.4 release.


https://github.com/xbmc/xbmc/commit/e1c87b89e99a2dfb38ca5d649161190877a25539
Comment 2 Michael Cronenworth 2021-06-03 23:03:38 CEST
I've applied the patch (it was a clean apply) and basic functionality still works.

I don't utilize AC3 pass-through so you will have to test the update. It will hit the mirrors in a day or two or you can download the build from Koji.

https://koji.rpmfusion.org/koji/buildinfo?buildID=19234
Comment 3 Leonid Bogdanov 2021-06-04 03:44:32 CEST
I bumped into this very issue and asked about it here https://forum.kodi.tv/showthread.php?tid=362843

I installed kodi-19.1-2.fc34 using the link provided by Michael and the issue is still there, with `ERROR <general>: CAEEncoderFFmpeg::Encode - Encoding failed` errors in the Kodi logs.

Kodi devs said that FFmpeg 4.4 is not supported by Kodi 19.1, is it possible to just provide FFmpeg 4.3 in Fedora 34 repo?
Comment 4 leigh scott 2021-06-04 05:00:25 CEST
(In reply to Leonid Bogdanov from comment #3)

> is it possible
> to just provide FFmpeg 4.3 in Fedora 34 repo?

That isn't possible.
Comment 5 vigerske 2021-06-05 21:17:33 CEST
The kodi-19.1-2 doesn't work for me either. Also (still) getting this error message in the log. Maybe there is more than this patch necessary.

Would linking kodi against a static build of ffmpeg 4.3 be an option to leave the ffmpeg 4.4 libs in the system untouched (and unused)? (I don't know how kodi is build.)
Comment 6 vigerske 2021-11-06 15:15:53 CET
Still an issue with the Kodi 19.2 package (kodi-19.2-1.fc34.src.rpm).
Still need to build a FFMpeg 4.3 manually and make sure it is loaded.
Comment 7 leigh scott 2022-02-20 09:19:44 CET
Kodi claim this merge fixes the ac3 issue

https://github.com/xbmc/xbmc/pull/20678
Comment 8 Michael Cronenworth 2022-02-21 14:20:07 CET
A F35 build with the patch from comment 7 has been made. Feel free to test it.

https://koji.rpmfusion.org/koji/buildinfo?buildID=21845