[SOLVED] RPi: Error compiling ffmpeg 4.0.2 with hevc optimizations

  • Hi all,

    I am unable to compile ffmpeg 4.0.2 with hevc optimizations on RPi stretch with the following error

    I have applied patch found here LibreELEC.tv/ffmpeg-99.1003-pfcd_hevc_optimisations.patch at master · LibreELEC/LibreELEC.tv · GitHub without any errors.

    I have an rpi 3B+ with Raspbian Stretch updated, along with rpi-firmware updated as of today.

    Has anybody encountered the same error or know how to fix it?


  • Woah!

    You use a patch from LibreELEC, but you do not specify what you compile, let alone how.

    LibreELEC has a build system of its own. To see how ffmpeg is built, see here: LibreELEC.tv/packages/multimedia/ffmpeg at master · LibreELEC/LibreELEC.tv · GitHub


  • I believe that some Milhouse builds have an optimised ffmpeg included for x265 decoding on RPi. I also believe this will hopefully be included in LE9 final.

  • ffmpeg HEVC optimization patches are included in LE master tree, what's currently missing in LE master tree are the kodi patches needed to use these.

    so long,


  • I managed to compile FFmpeg successfuly with the following:

    What I was missing from my initial post is the extra libs. Once I added those, compilation and install went fine.

  • Excellent!

    Thank you for documenting your solution.

    A tip for next time: document the instructions you use for compiling in the first post, it helps diagnosing the issue ;)