Kodi Community Forum
Solved Workaround for ffmpeg bug - 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: Solved Workaround for ffmpeg bug (/showthread.php?tid=338422)

Pages: 1 2


Workaround for ffmpeg bug - Stanislav - 2018-12-16

Hi all,

I'm running Leia nightly on ubuntu 16.04 server. The built-in ffmpeg 4.03 unfortunately still has this bug, which has since been fixed. I was wondering if there is any chance that ffmpeg version could be bumped before official release goes out?

If it is too late for that, I would appreciate if someone could help me to correctly build from source with external ffmpeg? I found various threads that contained instructions, but not after build method switched to cmake. I have a working ffmpeg 4.1 install in /opt/ffmpeg which I built using these options as suggested by fritsch. I tried to figure out the correct way, but something is wrong. I followed the general steps for building in ubuntu on git page, but during the build process, there is a message to the effect that ffmpeg version 4.0 could not be found and therefore it is falling back to the built-in version. On top of that, build later fails. So before going into troubleshooting this, I thought I'm probably doing something wrong. What would be the process to build, using basically the same options that are used to build the ubuntu nightly except that ffmpeg should be external?

Thanks in advance,
-- Stanislav


RE: Workaround for ffmpeg bug - graysky - 2018-12-16

A patch against the supported "internal" ffmpeg would be the simplest solution but I didn't see a reference to the commit/commits that fix the bug in that report.  In the past, Arch Linux used external libs incliding ffmpeg and got into trouble when the code in ffmpeg broke kodi.  We now use the internal libs provided by the project.


RE: Workaround for ffmpeg bug - fritsch - 2018-12-16

Check if those fix your issue:
Quote:commit 00099ef0d0ddf6f5bdd8ddfb5b0179c560674af0
Author: Paul B Mahol <[email protected]>
Date:   Sun Apr 22 13:14:26 2018 +0200

    avformat/dsfdec: fix calculation of size of data chunk
    
    Ignore extra 12 bytes that belong to tag and size.
    
    Signed-off-by: Paul B Mahol <[email protected]>

commit 5d3efe9e1f0b56595bd5d1287ae07a8f4277d71a
Author: Paul B Mahol <[email protected]>
Date:   Sun Apr 22 11:52:32 2018 +0200

    avformat/dsfdec: properly handle padded last packet
    
    Fixes #5489.
    
    Signed-off-by: Paul B Mahol <[email protected]>

No need to build kodi, just build ffmpeg with ffplay and play it. You can start with kodi's ffmpeg and pick those patches on top.


RE: Workaround for ffmpeg bug - fritsch - 2018-12-16

If you can only build kodi: http://paste.ubuntu.com/p/m55kJt4S4k/ <- should pull in my "special patched" version for you.

Sorry: http://paste.ubuntu.com/p/c8hGJX9xxZ/


RE: Workaround for ffmpeg bug - Stanislav - 2018-12-16

Will give it a try and revert. Thanks!


RE: Workaround for ffmpeg bug - fritsch - 2018-12-17

Any news?


RE: Workaround for ffmpeg bug - wsnipex - 2018-12-17

Kodi will automatically detect a system installed ffmpeg(prefix=/usr or /usr/local). If you installed ffmpeg in a non-standard location use:
Code:
cmake -DWITH_FFMPEG=/opt/ffmpeg ..
where ffmpeg's prefix was /opt/ffmpeg


RE: Workaround for ffmpeg bug - fritsch - 2018-12-17

Yeah - with above patch, he can build kodi as usual and we are sure about the version.


RE: Workaround for ffmpeg bug - Stanislav - 2018-12-18

Sorry folks, I got busy yesterday and did not have time to deal with this. I built it using the fritsch suggested patch and, yeah, it seems fixed. Can this patch be applied to the official build, or should I continue using the version I built for the time being?


RE: Workaround for ffmpeg bug - fritsch - 2018-12-18

Let's ask.


RE: Workaround for ffmpeg bug - fritsch - 2018-12-20

Good news: Was pushed by ffmpeg guys to 4.0 branch. Internal discussion ongoing to rebase or not.


RE: Workaround for ffmpeg bug - Stanislav - 2018-12-21

Good news indeed! Thanks for keeping us posted.


RE: Workaround for ffmpeg bug - fritsch - 2018-12-21

We will update kodi's ffmpeg once 4.0.4 is out.

As you build yourself, you can use the above patch for the time being.


RE: Workaround for ffmpeg bug - HomerJau - 2019-01-28

(2018-12-21, 08:56)fritsch Wrote: We will update kodi's ffmpeg once 4.0.4 is out.

As you build yourself, you can use the above patch for the time being.

Hi fritsch,

Seems Leia is on the brink of official release. The currecnt RC is using ffmpeg 4.0.3.x by the looks. Any news on whether 4.0.4 is out and will make Leia final please?


RE: Workaround for ffmpeg bug - fritsch - 2019-01-29

We already packaged a new release including the fixes, see: https://github.com/xbmc/FFmpeg/releases/tag/4.0.3-Leia-RC5 and https://github.com/xbmc/FFmpeg/commits/4.0.3-Leia-RC5