Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi 4 HEVC support #714

Closed
txe0 opened this issue Jun 24, 2019 · 46 comments
Closed

Raspberry Pi 4 HEVC support #714

txe0 opened this issue Jun 24, 2019 · 46 comments

Comments

@txe0
Copy link

txe0 commented Jun 24, 2019

the raspberry pi 4 is now out with hevc hardware decoding. is hevc support is coming to the omxplayer?

@popcornmix
Copy link
Owner

No. omxplayer only supports GPU HW codecs. hevc has an arm side decoder.

HEVC support will come to VLC in raspbian, and is available in Kodi.

@dimitry-ishenko
Copy link

Came across this after struggling to play 1080p HEVC videos on RPi4.

@popcornmix I see patches from your https://github.com/popcornmix/FFmpeg/tree/2711 branch are used by LibreELEC folks to enable HEVC playback with hardware decoding.

I've applied them to ffmpeg 4.1.3 (Raspbian) and was able to build it with a few small hacks. ffmpeg -hwaccels shows two rpi entries now. I thought maybe a simple ffplay file.mkv would do the trick, but alas it does software decoding and the playback chokes.

Any ideas how to get it working?

@popcornmix
Copy link
Owner

The HEVC hardware uses custom pixel formats that ffmpeg doesn't understand.
This isn't a problem for kodi as it can pass them as opaque buffers to mmal_render component for display.

ffmpeg needs a pixel converter to get frames into standard YUV420P format which will allow ffmpeg to be used for transcode and ffplay. This is being worked on. But that format conversion will be too slow for real time 4K video (and possibly also 1080p).

vlc is being worked on to support hw decode and display of the opaque buffers that kodi uses and that is our recommended solution for HEVC playback from the desktop.

@dimitry-ishenko
Copy link

@popcornmix OK I get it. I will try the kodi route.

Found your https://github.com/popcornmix/xbmc/tree/leia_pi4 branch. Will try to compile it now. Anything special I should do other than: cmake ../kodi -DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gles?

@popcornmix
Copy link
Owner

leia_pi4 is a temporary hack using mmal. For kodi 19 we are dropping mmal and using gbm + v4l2.
Current master of kodi should build (without hw decode currently) with:

cmake ../kodi_gbm -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gles -DENABLE_VAAPI=OFF -DENABLE_VDPAU=OFF

But if you really want the hacky leia_pi4 support you need to do a little surgery to make it build as it needs firmware mmal headers and pc files but not the opengl ones.

I build with:

PKG_CONFIG_PATH=/home/pi/projects/kodi/vc/lib/pkgconfig cmake ../kodi_mmal -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gles -DENABLE_VAAPI=OFF -DENABLE_VDPAU=OFF

and I've copied to /home/pi/projects/kodi/vc/lib/pkgconfig
bcm_host.pc mmal.pc vcsm.pc

@dimitry-ishenko
Copy link

Trying the leia_pi4 branch first, as I am after HEVC hardware support. Will try kodi 19 later as well. If I get this working, man, I am buying you a beer (or coffee -- whichever you prefer).

@dimitry-ishenko
Copy link

@popcornmix managed to compile leia_pi4 branch. 🎉 In addition to your hacks had to do:

mv /opt/vc/include/{GL,GLES,GLES2} /opt/vc/

h.264 1080p files play well, but when I tried one of the h.265 1080p files, kodi segfaults (see attached). 😕

Any pointers?..

kodi_crashlog-20190722_150154.log

@popcornmix
Copy link
Owner

Probably a permissions issue. Can you add:

SUBSYSTEM=="argon-*", GROUP="video", MODE="0660"

to /etc/udev/rules.d/99-com.rules

(e.g. line following SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660")

This may be a default after apt upgrading (at least it's in the pipeline to be pushed out).

@dimitry-ishenko
Copy link

dimitry-ishenko commented Jul 22, 2019

@popcornmix yep, figured it out as well. Gave meself access to all /dev/argon-* devices and now getting a different error:

[New Thread 0x985850d0 (LWP 24906)]
rpi_ctrl_ffmpeg_init
 id=0xadb29df8
setup_io: 00000000 -> 0xa6473000 (fd:38)
setup_io: 00000000 -> 0xa6463000 (fd:42)
usrvcsm: [vcsm_malloc_cache]: [24842] [Video Frame]: ioctl mem-alloc FAILED [-1] (hdl: 0)
kodi-gbm: src/libavcodec/rpi_ctrl_ffmpeg.c:86: gpu_malloc_uncached_internal: Assertion `p->vcsm_handle' failed.

Thread 61 "VideoPlayer" received signal SIGABRT, Aborted.
[Switching to Thread 0xa0af70d0 (LWP 24904)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb)

kodi_crashlog-20190722_152616.log

@popcornmix
Copy link
Owner

You need quite a high gpu_mem setting for hevc. 320 may be needed for 4k files.

@dimitry-ishenko
Copy link

dimitry-ishenko commented Jul 22, 2019

@popcornmix my man, I owe you a beer... or two... or a coffee, if you don't drink beer. 😄
I did a fresh Raspbian install and totally forgot to haxxor my config file.

It's working like a charm and I can play my HEVC 1080p videos. 🎉

Gotta paypal.me link?

@popcornmix
Copy link
Owner

No need for a donation. Glad you got it working!

@dimitry-ishenko
Copy link

@popcornmix OK, well thank you for your help my friend. You've made my day. Would you mind if I made a .deb out of it and posted on the RaspberryPi forums for all the nice people to start abusing their shiny RPi4s?

@popcornmix
Copy link
Owner

Go ahead. I'm sure that would be very useful.

@Zerwin
Copy link

Zerwin commented Jul 25, 2019

Have you uploaded it yet somewhere ? Could really use a (working) RPi4 build for kodi.

@dimitry-ishenko
Copy link

@Zerwin follow the white rabbit:

https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=246837

@nkichukov
Copy link

Hi folks,
Just compiled the latest kodi 19 "Kodi (19.0-ALPHA1 Git:20191008-548692d981-dirty). Platform: Linux ARM 64-bit" from xbmc/xbmc.git master branch on rpi4 running GNU/Gentoo Linux with: -DCORE_PLATFORM_NAME=gbm -DGBM_RENDER_SYSTEM=gles

however:
1.) hevc 720p@50HZ is stuttering... It is built with the bundled ffmpeg support. Kodi uses software decoding for hevc.
2.) I have no option to run kodi-gbm inside X, thus need to switch to tty console to start it up.
Is it possible to use kodi-xorg with opengl/gles and make use of hevc hardware decoding?

Driver in use:

2019-10-08 21:38:42.188 T:2080  NOTICE: EGL_VERSION = 1.4
2019-10-08 21:38:42.188 T:2080  NOTICE: EGL_VENDOR = Mesa Project
2019-10-08 21:38:42.239 T:2080  NOTICE: GL_VENDOR = Broadcom
2019-10-08 21:38:42.239 T:2080  NOTICE: GL_RENDERER = V3D 4.2

and hevc playback from a local file:

2019-10-08 23:52:46.376 T:2634  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: HEVC (High Efficiency Video Coding)
2019-10-08 23:52:46.376 T:2634  NOTICE: Creating video thread
2019-10-08 23:52:46.376 T:2636  NOTICE: running thread: video_thread
2019-10-08 23:52:46.377 T:2634  NOTICE: Opening stream: 1 source: 256
2019-10-08 23:52:46.377 T:2634  NOTICE: Finding audio codec for: 86018
2019-10-08 23:52:46.378 T:2634  NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2019-10-08 23:52:46.378 T:2634  NOTICE: Creating audio thread
2019-10-08 23:52:46.382 T:2637  NOTICE: running thread: CVideoPlayerAudio::Process()
2019-10-08 23:52:46.383 T:2637  NOTICE: Creating audio stream (codec id: 86018, channels: 2, sample rate: 48000, no pass-through)
2019-10-08 23:52:46.604 T:2636  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: HEVC (High Efficiency Video Coding)
2019-10-08 23:52:46.650 T:2612  NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 150 ms
2019-10-08 23:52:46.944 T:2597  NOTICE: GLES: Selecting single pass rendering
2019-10-08 23:52:46.944 T:2597  NOTICE: GLES: Selecting YUV 2 RGB shader
2019-10-08 23:52:47.029 T:2597  NOTICE: GLES: Selecting single pass rendering
2019-10-08 23:52:47.626 T:2636  NOTICE: CDVDVideoCodecFFmpeg::CDropControl: calculated diff time: 20000

Thanks,
-N

@popcornmix
Copy link
Owner

Latest kodi in raspbian should just work (uses rascas' build).
Supports hw hevc decode, and can be launched from inside out outside X (running fullscreen)

@nkichukov
Copy link

Sounds good, where is the source code for this, I am running GNU/Gentoo Linux here... and my ebuild is currently pointing to github's xbmc/xbmc.git master's branch.

@popcornmix
Copy link
Owner

It's built from https://github.com/popcornmix/xbmc/tree/leia_pi4
The code to handle calling chvt so it can be launched from desktop is just in the kodi launch script.

@nkichukov
Copy link

Hey, thanks for this, I already tried it before, is it supposed to compile on a 64bit architecture? I use aarch64 here. The compile error I get is:

In file included from src/libavcodec/rpi_ctrl_ffmpeg.c:30:
src/libavcodec/rpi_mailbox.h:47:13: error: size of array ‘vc_image_t_size_check’ is negative
   47 | typedef int vc_image_t_size_check[(sizeof(VC_IMAGE_T) == 64) * 2 - 1];
      |             ^~~~~~~~~~~~~~~~~~~~~
ERROR: compile src/libavcodec/rpi_ctrl_ffmpeg.c failed
make[6]: *** [/var/tmp/portage/media-tv/kodi-rpi4-18/work/kodi-rpi4-18_build/build/ffmpeg/src/ffmpeg/ffbuild/common.mak:60: libavcodec/rpi_ctrl_ffmpeg.o] Error 1
In file included from src/libavcodec/rpi_hevc.c:19:
src/libavcodec/rpi_mailbox.h:47:13: error: size of array ‘vc_image_t_size_check’ is negative
   47 | typedef int vc_image_t_size_check[(sizeof(VC_IMAGE_T) == 64) * 2 - 1];
      |             ^~~~~~~~~~~~~~~~~~~~~

And my cmake configuration looks like:
cmake -C /var/tmp/portage/media-tv/kodi-rpi4-18/work/kodi-rpi4-18_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -Ddocdir=/usr/share/doc/kodi-rpi4-18 -DENABLE_LDGOLD=OFF -DENABLE_ALSA=no -DENABLE_AIRTUNES=OFF -DENABLE_AVAHI=OFF -DENABLE_BLUETOOTH=OFF -DENABLE_BLURAY=OFF -DENABLE_CCACHE=OFF -DENABLE_CEC=no -DENABLE_DBUS=no -DENABLE_DVDCSS=OFF -DENABLE_INTERNAL_CROSSGUID=OFF -DENABLE_INTERNAL_FFMPEG=yes -DENABLE_CAP=OFF -DENABLE_LCMS2=OFF -DENABLE_MICROHTTPD=yes -DENABLE_MYSQLCLIENT=OFF -DENABLE_MARIADBCLIENT=OFF -DENABLE_NFS=OFF -DENABLE_OPENGLES=yes -DENABLE_OPENGL=OFF -DENABLE_OPTICAL=OFF -DENABLE_PLIST=OFF -DENABLE_PULSEAUDIO=OFF -DENABLE_SMBCLIENT=OFF -DENABLE_UDEV=yes -DENABLE_UPNP=OFF -DENABLE_VAAPI=OFF -DENABLE_VDPAU=OFF -DENABLE_XSLT=no -DCORE_PLATFORM_NAME=gbm -DWITH_CPU=cortex-a72 -DWITH_ARCH=aarch64 -DCMAKE_PREFIX_PATH=/opt/vc -DGBM_RENDER_SYSTEM=gles -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/media-tv/kodi-rpi4-18/work/kodi-rpi4-18_build/gentoo_toolchain.cmake /var/tmp/portage/media-tv/kodi-rpi4-18/work/kodi-rpi4-18

Cheers,
-N

P.S. dropped you an email, but not sure if that made it through?

@popcornmix
Copy link
Owner

Compiling kodi on 64-bit isn't something I've tried.
From the error something like:

diff --git a/libavcodec/rpi_mailbox.h b/libavcodec/rpi_mailbox.h
index 559613a1e2..d273f76895 100644
--- a/libavcodec/rpi_mailbox.h
+++ b/libavcodec/rpi_mailbox.h
@@ -3,7 +3,7 @@
 
 /* The image structure. */
 typedef struct vc_image_extra_uv_s {
-  void *u, *v;
+  uint32_t *u, *v;
   int vpitch;
 } VC_IMAGE_EXTRA_UV_T;
 
@@ -26,10 +26,10 @@ typedef struct VC_IMAGE_T {
   unsigned short                  height;         /* height in pixels */
   int                             pitch;          /* pitch of image_data array in bytes */
   int                             size;           /* number of bytes available in image_data array */
-  void                           *image_data;     /* pixel data */
+  uint32_t                        image_data;     /* pixel data */
   VC_IMAGE_EXTRA_T                extra;          /* extra data like palette pointer */
-  void                           *metadata;       /* metadata header for the image */
-  void                           *pool_object;    /* nonNULL if image was allocated from a vc_pool */
+  uint32_t                        metadata;       /* metadata header for the image */
+  uint32_t                        pool_object;    /* nonNULL if image was allocated from a vc_pool */
   int                             mem_handle;     /* the mem handle for relocatable memory storage */
   int                             metadata_size;  /* size of metadata of each channel in bytes */
   int                             channel_offset; /* offset of consecutive channels in bytes */

might help (but I suspect that isn't the only change required)

@nkichukov
Copy link

Thanks for the patch. I tried it, however it still complains about the same negative size of array:

In file included from src/libavcodec/rpi_ctrl_ffmpeg.c:30:
src/libavcodec/rpi_mailbox.h:47:13: error: size of array ‘vc_image_t_size_check’ is negative
   47 | typedef int vc_image_t_size_check[(sizeof(VC_IMAGE_T) == 64) * 2 - 1];
      |             ^~~~~~~~~~~~~~~~~~~~~

I do not want to further pollute this issue, if you are interested into supporting this for aarch64, then I can open another issue against your xbmc repo. If not, then I will just wait until it works through mesa's gles.

Cheers,
-N

@popcornmix
Copy link
Owner

Kodi should build and run with mesa gles from the upstream kodi repo.
That will build for aarch64, but won't include hw decode.

There is a plan for upstream kodi to work with ffmpeg/v4l2 for hw decode but that is not ready yet.

@nkichukov
Copy link

That is correct. For me, compiling for gbm or x11 does not bring a lot of a difference when software decoding hevc, thus I am avoiding GBM for now just because it is more handy to have the kodi-x11 binary when running it from inside a DE.

When compiling it for for x11, what difference does the following combinations bring:
-DENABLE_OPENGLES=yes -DENABLE_OPENGL=no
-DENABLE_OPENGLES=yes -DENABLE_OPENGL=yes

Do I need to have upstream ffmpeg compiled with:
v4l : Enable support for video4linux (using linux-headers or userspace libv4l libraries)
for kodi to use that when ready?

Cheers,
-N

@popcornmix
Copy link
Owner

There is a version of vlc with HEVC support available for testing:
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=257395

@nkichukov
Copy link

Great, where is the source code for it?

To answer my previous question, if compiling kodi with:
-DENABLE_OPENGLES=yes -DENABLE_OPENGL=no

the configuration script automatically adds OPENGL, as the above is invalid configuration, OPENGLES depends on enabled OPENGL.

@popcornmix
Copy link
Owner

popcornmix commented Nov 22, 2019

It's a debian package, so get the source from apt:
https://wiki.debian.org/Packaging/SourcePackage#With_apt-get_source

@nkichukov
Copy link

Do you happen to know if a change control repository exists? Something like the newclock5 branch in your github xbmc fork?

@popcornmix
Copy link
Owner

The patches used for vlc and ffmpeg live here:
https://github.com/RPi-Distro/vlc
https://github.com/RPi-Distro/ffmpeg

@nkichukov
Copy link

Thanks, unfortunately mmal is not supported on aarch64, as per CMakeFiles.txt of https://github.com/raspberrypi/userland:

if(ARM64) set(BUILD_MMAL FALSE) set(BUILD_MMAL_APPS FALSE) else() set(BUILD_MMAL TRUE) set(BUILD_MMAL_APPS TRUE) endif()

ffmpeg build fails at configure time due to:
$ cat /tmp/test.c #include <interface/mmal/mmal.h> #include <stdint.h> long check_mmal_port_connect(void) { return (long) mmal_port_connect; } int main(void) { int ret = 0; ret |= ((intptr_t)check_mmal_port_connect) & 0xFFFF; return ret; }
and linker failing with missing libraries:

$ gcc -Wl,--as-needed -Wl,-z,noexecstack -L/opt/vc/lib -o /tmp/test /tmp/test.o -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lvcsm -lvchostif -lvchiq_arm -lvcos /usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: cannot find -lmmal_core /usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: cannot find -lmmal_util /usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: cannot find -lmmal_vc_client /usr/lib/gcc/aarch64-unknown-linux-gnu/9.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: cannot find -lvcsm collect2: error: ld returned 1 exit status
I cannot test this, unfortunately. Hope it works for others though.
Cheers,
-N

@nkichukov
Copy link

Hi @popcornmix,
I checked out the new 'gbm' branch and tried to compile that on aarch64, however the ffmpeg patches use --enable-rpi and mmal which is not available on this architecture. Any chance 'gbm' will exclude mmal and switch to v4l2?

I've already upgraded the kernel to 5.4.28 to include the v4l hevc patches.

@popcornmix
Copy link
Owner

popcornmix commented Apr 7, 2020

You'll need patched ffmpeg anyway - it doesn't support (stateless) v4l2 natively yet.
While the ffmpeg tree also includes mmal support, it won't be used on Pi4.

@cyoussef8
Copy link

cyoussef8 commented Oct 2, 2020

Tried to run a 1080p MKV Movie HEVC h.265 via Kodi

Got this:

pi@raspberrypi:~ $ kodi rpi_ctrl_ffmpeg_init id=0x911740f8 setup_io: 00000000 -> 0xad1d9000 (fd:35) setup_io: 00000000 -> 0xad1c9000 (fd:48) usrvcsm: [vcsm_malloc_cache]: [16115] [Video Frame]: ioctl mem-alloc FAILED [-1] (hdl: 0) kodi.bin_v8: src/libavcodec/rpi_ctrl_ffmpeg.c:86: gpu_malloc_uncached_internal: Assertion 'p->vcsm_handle' failed. Aborted (core dumped) Crash report available at /home/pi/kodi_crashlog-20201002_173516.log [E] Invalid arguments ' '

Then this via kodi_crashlog-20201002_173516.log

2020-10-02 01:06:15.275 T:2973289568 NOTICE: VideoPlayer::OpenFile: /media/usb0/moviefilepathremovedforprivacy.mkv
2020-10-02 01:06:15.277 T:2351554768 NOTICE: Creating InputStream
2020-10-02 01:06:15.865 T:2351554768 NOTICE: Creating Demuxer
2020-10-02 01:06:15.907 T:2351554768 NOTICE: Opening stream: 0 source: 256
2020-10-02 01:06:15.908 T:2351554768 NOTICE: Creating video codec with codec id: 173
2020-10-02 01:06:15.910 T:2351554768 NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: hevc
2020-10-02 01:06:15.914 T:2351554768 NOTICE: Creating video thread
2020-10-02 01:06:15.914 T:2626658512 NOTICE: running thread: video_thread
2020-10-02 01:06:15.914 T:2351554768 NOTICE: Opening stream: 1 source: 256
2020-10-02 01:06:15.914 T:2351554768 NOTICE: Finding audio codec for: 86076
2020-10-02 01:06:15.914 T:2351554768 NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder opus
2020-10-02 01:06:15.915 T:2351554768 NOTICE: Creating audio thread
2020-10-02 01:06:15.915 T:2272305360 NOTICE: running thread: CVideoPlayerAudio::Process()
2020-10-02 01:06:15.915 T:2351554768 NOTICE: Opening stream: 2 source: 256
2020-10-02 01:06:15.923 T:2626658512 NOTICE: CDecoder::Open - fmt:187

############### END LOG FILE ################

############ END Kodi CRASH LOG #############

@nkichukov
Copy link

Perhaps related to:
raspberrypi/linux#3861

@popcornmix
Copy link
Owner

@cyoussef8 this isn't the place to report kodi issues.
But make sure you've set gpu_mem to at least 256M if you want this to work.

@cyoussef8
Copy link

@popcornmix Increasing the gpu_mem fixed the issue!! THANK YOU SO MUCH!

@kytart
Copy link

kytart commented Jan 6, 2021

@popcornmix may I ask where did you get the information that allowed you to write this patch? I've been googling and binging and duckduckgoing but wasn't able to find anything official about how the hevc hw acceleration should be handled. No documentation, nothing. Your patch is the only thing I was able to find.

@popcornmix
Copy link
Owner

You mean the gpu_mem setting? Many places but if you are using kodi under RpiOS then here:
https://www.raspberrypi.org/forums/viewtopic.php?t=251645

Kodi on Raspbian requires a minimum of 160 MB of RAM dedicated to the GPU to function properly! This can be done by running "raspi-config" -> "Advanced Options" -> "Memory Split" -> 160. The recommended for the RPI 4 is 320 MB.

That setting gets stored on gpu_mem in config.txt

@kytart
Copy link

kytart commented Jan 7, 2021

no I mean how did you implement the hevc support for ffmpeg? What kind of information did you use to get there? It seems that the whole thing is very low level and poorly documented so I'm trying to get my hands on more info so I can understand how it works.

@popcornmix
Copy link
Owner

It was based on test code provided by the guys who designed the hardware.

@kytart
Copy link

kytart commented Jan 7, 2021

Cool. Is this test code available somewhere?

@popcornmix
Copy link
Owner

The test code provided was the first commit in https://github.com/popcornmix/FFmpeg/tree/2711

@kytart
Copy link

kytart commented Jan 7, 2021

oh I see, ok thanks, I'll take a look at it again

@kytart
Copy link

kytart commented Mar 9, 2021

@popcornmix I'm trying to compile your patched ffmpeg. I have some issues but since there's no way of posting issues there, I'll just go ahead and ask in this thread.

I'm getting

/usr/lib/gcc/armv7-alpine-linux-musleabihf/9.3.0/../../../../armv7-alpine-linux-musleabihf/bin/ld: fftools/ffmpeg_opt.o:(.data.rel.ro+0xe18): undefined reference to `rpi_init'
/usr/lib/gcc/armv7-alpine-linux-musleabihf/9.3.0/../../../../armv7-alpine-linux-musleabihf/bin/ld: fftools/ffmpeg_opt.o:(.data.rel.ro+0xe28): undefined reference to `rpi_init'

The way the hw accelerations are bootstraped in the code is a bit magical and hard to follow for me so I wasn't able to find a solution.

My configuration is this

./configure \
                --prefix=/usr \
                --enable-avresample \
                --enable-avfilter \
                --enable-gnutls \
                --enable-gpl \
                --enable-libass \
                --enable-libmp3lame \
                --enable-libvorbis \
                --enable-libvpx \
                --enable-libxvid \
                --enable-libx264 \
                --enable-libx265 \
                --enable-libtheora \
                --enable-libv4l2 \
                --enable-postproc \
                --enable-pic \
                --enable-pthreads \
                --enable-shared \
                --enable-libxcb \
                --enable-libssh \
                --disable-stripping \
                --disable-static \
                --disable-librtmp \
                --enable-libopus \
                --enable-mmal \
                --enable-rpi \
                --enable-debug

Any ideas?

@popcornmix
Copy link
Owner

That tree is very outdated. New development is being done here:
https://github.com/jc-kynesim/rpi-ffmpeg/tree/dev/4.3.1/drm_prime_1

and that would be a better place to start.
(this is tree being used in kodi 19 for pi and will be used for RPiOS later).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants