-
-
Notifications
You must be signed in to change notification settings - Fork 35
Raspberry Pi
WangBin edited this page May 8, 2023
·
11 revisions
Legacy 32bit sdk for rpi is cross built by latest clang release with modified rpi1 sysroot and ffmpeg with userland mmal.
RECOMMEND to use generic linux arm64 sdk for rpi3/4
pi 4: ALSA_DEVICE=sysdefault
legacy sdk warning: clang >= 9 result dso can not be loaded on rpi1, maybe there is a bug in lld
- legacy sdk: glibc 2.12 (ubuntu 12.04)
- gapless playback hardware decoders may requires 256M GPU memory
- OpenGL
- OpenGL ES2/3
- mmal: builtin mmal decoder implementation
- MMAL: FFmpeg mmal decoder implementation
- V4L2M2M: or "FFmpeg:hwaccel=v4l2m2m"
- FFmpeg:hwcontext=drm: use the latest RaspberryPi OS system ffmpeg
In legacy driver environment, hardware decoder (MMAL, mmal) supports zero copy rendering in GLES2 and has the best performance
- legacy driver gles2 in window example: ./window -c:v MMAL test.mp4
In mesa vc4/6 driver environment(fake/full kms), MMAL hardware decoder is available, but zero copy rendering is not
- vc4/6 egl+es2: LD_PRELOAD=libX11.so.6 ./window -c:v MMAL test.mp4 # if not link against libX11(except weak) or libpulse
- vc4/6 glx: GL_ES=0 LD_PRELOAD=libGL.so.1 ./window -c:v MMAL test.mp4 # if not link against libGL or libOpenGL
- vc4/6 wayland: ./window -c:v MMAL test.mp4 # assume weston is running in x11 or CLI mode via weston-launch
- vc4/6 gbm: ./window -surface gbm -c:v MMAL test.mp4 # assume weston is running # in CLI mode
In the latest RaspberryPi OS, system ffmpeg or https://github.com/jc-kynesim/rpi-ffmpeg supports v4l2m2m decoder and hevc hardware decoder, both can produce drm_prime frames
- ./glfwplay -c:v V4L2M2M:hwcontext=drm -gl test.mp4