Open jose1711 opened 4 years ago
This is without X, running on the text terminal?
Can you check your libEGL.so.* in the library path, and that /opt/vc/lib/libEGL.so
exists? Maybe add a print(name)
at the top of find_library
. I get the feeling that the wrong EGL library is being loaded.
Can you use mpv --vo=rpi
to play back videos with mpv normally?
Running from text terminal. libEGL
exists:
[alarm@alarmpi blitzloop]$ ls -l /opt/vc/lib/libEGL.so
-rw-r--r-- 1 root root 202072 Oct 16 18:14 /opt/vc/lib/libEGL.so
[alarm@alarmpi blitzloop]$ md5sum /opt/vc/lib/libEGL.so
31494c335a11c07beceb259b48efe3e6 /opt/vc/lib/libEGL.so
Setting LD_LIBRARY_PATH
to /opt/vc/lib
prior to running blitzloop
yields the same error.
Looks like find_library(name)
is not being called at all (as print
was not invoked and intentional typo I made did not raise exception either).
rpi
output is not recognized by mpv
:
[alarm@alarmpi ~]$ mpv --vo=rpi video.mp4
(+) Video --vid=1 (*) (h264 1280x720 25.000fps)
(+) Audio --aid=1 (*) (aac 2ch 48000Hz)
[vo] Video output rpi not found!
Error opening/initializing the selected video_out (--vo) device.
Video: no video
Exiting... (Errors when loading file)
[alarm@alarmpi ~]$ pacman -Q mpv
mpv 1:0.32.0-4
[alarm@alarmpi ~]$ mpv -vo help
The legacy option syntax ('-vo value') is deprecated and dangerous.
Please use '--vo=value'.
Available video outputs:
libmpv render API for libmpv
gpu Shader-based GPU Renderer
vdpau VDPAU with X11
wlshm Wayland SHM video output
xv X11/Xv
vaapi VA API with X11
x11 X11 (slow, old crap)
null Null video output
image Write video frames to image files
tct true-color terminals
caca libcaca
drm Direct Rendering Manager
Shortly after sending this I realized I did not have mpv-rpi
installed (only mpv
which conflicts with it). Sadly the compilation of its dependency - ffmpeg-mmal is keeping me from building it :-(
Yeah, ffmpeg-mmal is a pain in the ass to build.
The thing is, as far as I know you need that to get the video decode acceleration... So it's pretty much a requirement. BlitzLoop on the Rpi3 is already barely holding on on that CPU, without video decode accel it'll be a mess.
It's possible that installing those pulls in some dependency that fixes BlitzLoop too...
I believe it might be possible to use BlitzLoop with the drm (fkms) codepath on rPi, and iff you can get video decode accel that would be fine probably, but I'm not holding my breath...
Ok, I managed to build both ffmpeg-mmal
and mpv-rpi
after all. Now I am getting different error:
[alarm@alarmpi ~]$ mpv --vo=rpi video.mp4
(+) Video --vid=1 (*) (h264 1280x720 25.000fps)
(+) Audio --aid=1 (*) (aac 2ch 48000Hz)
[vo/rpi] Could not get DISPMANX objects.
Error opening/initializing the selected video_out (--vo) device.
Video: no video
Exiting... (Errors when loading file)
At least it's clearly not a BlitzLoop problem... I wonder if something changed in Arch Linux ARM somewhere along the way, or something else is different about your setup...
After reading https://github.com/mpv-player/mpv/issues/7314 I decided to try compile an older version of mpv
(0.29.1) and it finally worked:
[alarm@alarmpi ~]$ mpv -fs --vo=rpi video.mp4
Playing: video.mp4
(+) Video --vid=1 (*) (h264 1280x720 25.000fps)
(+) Audio --aid=1 (*) (aac 2ch 48000Hz)
Using hardware decoding (mmal).
AO: [alsa] 48000Hz stereo 2ch float
VO: [rpi] 1280x720 mmal
Video plays smoothly. Sadly the error reported by blitzloop
did not go away.
Interesting. I'll take a look, but I'm quite busy right now and might not get to doing a full repro on a rPi in quite a while...
If you want: to speed things up I can make an image of the SD card (contains nothing but a fresh Arch Linux + blitzloop
) and publish it somewhere.
That might help, but I still probably won't get to it for a few weeks... I'm catching up on quick GitHub things but I'm a bit too swamped for a proper hardware device debugging session right now :(
Ok, putting my RPi on a shelf then. Feel free to ping me once you have some free cycles and I'll send it to you.
@jose1711 can you try building mpv-0.33.1 with this PR I sent to mpv? https://github.com/mpv-player/mpv/pull/9097
@cyph84 Please allow the following questions:
ffmpeg-mmal
prior to recompilation instead of using regular ffmpeg
and have mpv
detect it during configuration?mpv
supposed to recognize --vo=rpi
?Following https://forums.raspberrypi.com/viewtopic.php?t=270226#p1692111 I was able to make it work finally. Extra steps taken in addition to what's mentioned in https://github.com/marcan/blitzloop/blob/master/docs/blitzberry.md:
ffmpeg-mmal
from AURPKGBUILD
of mpv-git
from AUR and make the following modifications:
source=('git+https://github.com/cyph84/mpv#branch=fix-rpi-library-order'
..
--enable-libmpv-shared --enable-rpi \
mpv-git
. As a result mpv -vo help
should list rpi - Raspberry Pi (MMAL)
among supported outputs./opt/vc/lib
:
cd /opt/vc/lib
sudo ln -s libbrcmEGL.so libEGL.so.1
sudo ln -s libbrcmGLESv2.so libGLESv2.so.2
/boot/config.txt
:
dtparam=audio=on
gpu_mem=384
initramfs initramfs-linux.img followkernel
/home/alarm/startblitz.sh
:
#!/bin/sh
export LD_LIBRARY_PATH=/opt/vc/lib
cd "$(dirname "$0")"
amixer cset numid=3 2
python -u /usr/bin/blitzloop --port=80 --no-audioengine --mpv-ao=alsa
This makes blitzloop
work on an updated Arch Linux. What I left untested is microphone and jackd
config.
@cyph84 Please allow the following questions:
* do I still need to build `ffmpeg-mmal` prior to recompilation instead of using regular `ffmpeg` and have `mpv` detect it during configuration?
You can build against regular ffmpeg, but you need ffmpeg-mmal installed to use --hwdec=mmal
* is `mpv` supposed to recognize `--vo=rpi`?
I think its best you explicitly specify the vo
Btw compiling latest mpv-git
still results in [vo/rpi] Could not get DISPMANX objects.
so https://github.com/mpv-player/mpv/pull/9097 is indeed required.
Following instructions in
blitzberry.md
I am stuck with the following error:and have no idea how to proceed. Raspberry is a 3B+ model.