We use kodi upstream sources with a couple of patches applied on top, the common patches are in https://github.com/LibreELEC/Libr…er/kodi/patches and the RPi specific ones are in https://github.com/LibreELEC/Libr…Pi/patches/kodi
Kodi version/githash and cmake/configure options are in the package.mk file https://github.com/LibreELEC/Libr…kodi/package.mk
Our RPi ffmpeg patches are in https://github.com/LibreELEC/Libr…g-001-rpi.patch and are sourced from jc's ffmpeg tree (the same that's used for RPiOS), the commit message of the patch file will tell you the exact version used, currently that's https://github.com/jc-kynesim/rpi…4d573df97223cd9 from the test/8.0.1/main branch - might be easiest for you to use ffmpeg sources directly from there.
Also see the package.mk for configure options https://github.com/LibreELEC/Libr…mpeg/package.mk
so long,
Hias