Repository navigation
[h264_mmal @ 0xa882cba0] MMAL error 2 on control port #33
Copy link
Copy link
Closed
Description
RPi4 running latest Raspbian Buster.
UV compiled from Master. FFMPEG provided by OS.
vcgencmd codec_enabled H264
root@splashpi:~# ffmpeg
ffmpeg version 4.1.4-1+rpt1~deb10u1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8 (Raspbian 8.3.0-6+rpi1)
configuration: --prefix=/usr --extra-version='1+rpt1~deb10u1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --arch=arm --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Hyper fast Audio and Video encoder
ffmpeg -codecs | grep mmal
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_mmal ) (encoders: libx264 libx264rgb h264_omx h264_v4l2m2m h264_vaapi )
ffmpeg -decoders | grep mmal
V..... h264_mmal h264 (mmal) (codec h264)
V..... mpeg2_mmal mpeg2 (mmal) (codec mpeg2video)
V..... mpeg4_mmal mpeg4 (mmal) (codec mpeg4)
V..... vc1_mmal vc1 (mmal) (codec vc1)
root@testpi:~# uv --param force-lavd-decoder=h264_mmal -d sdl
UltraGrid 1.5+ (tags/nightly rev 98c909e7 built Aug 22 2019 03:55:01)
Display device : sdl
Capture device : none
Audio capture : none
Audio playback : none
MTU : 1500 B
Video compression: none
Audio codec : PCM
Network protocol : UltraGrid RTP
Audio FEC : none
Video FEC : none
Created new RTP session with SSRC 0x039e601d.
[SDL] Using driver: x11
SDL2 initialized successfully.
Display initialized-sdl
Video capture initialized-none
Created new RTP session with SSRC 0x72c047a6.
[SDL] Reconfigure to size 512x512
[video dec.] New incoming video format detected: 1920x1080 @30.00p, codec H.264
**[lavd] Unable to open decoder h264_mmal.**
[lavd] Using decoder: h264
[lavd] Error while decoding frame (rc == -1313558101): Unknown error occurred.
[h264_mmal @ 0xa882cba0] MMAL error 2 on control port
[h264_mmal @ 0xa882cba0] MMAL error 2 on control port
[h264_mmal @ 0xa882cba0] MMAL error 2 on control port
[h264_mmal @ 0xa882cba0] MMAL error 2 on control port
[h264_mmal @ 0xa882cba0] MMAL error 2 on control port
[h264_mmal @ 0xa882cba0] MMAL error 2 on control port
[h264_mmal @ 0xa882cba0] Did not get output frame from MMAL.
[lavd] Error while decoding frame (rc == -1313558101): Unknown error occurred.
without MMAL video does play, but really low frame rate. With MMAL, fails.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
alatteri commentedon Aug 22, 2019
Using App Image, get the same thing.
alatteri commentedon Aug 24, 2019
did a re-install of Raspian Full. It now tries to use h264_mmal but fails with this:
[video dec.] Successfully reconfigured display to 1920x1080 @30.00p, codec UYVY
[lavd] Using decoder: h264_mmal
[video dec.] Successfully reconfigured display to 1920x1080 @30.00p, codec UYVY
[lavd] Using decoder: h264_mmal
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
MartinPulec commentedon Aug 30, 2019
Hi, after several tries I make the MMAL decoding somehow work - setting
gpu_mem=128to config.txt (i. a. here; can be done withraspi-config) and using the Raspberry PI default DE worked for me. Xorg with Openbox started directly from console did give me the error even with increased GPU memory, IIRC.However, the performance is not so good, so I'd have some questions for you – which device you use? If RPI 4 (I currently use 3B), would it be possible for you to do some tests? Since I don't think that the main problem is with decoding but rather displaying, I'd like to ask you whether you could try a playback of arbitrary H.264 1080p video with mpv and ffmpeg (ffplay).
Just shortly - for me, both distro mpv and FFMPEG perform quite poorly with default parameters. Omxplayer, on the other hand, worked fine. I'd suspect that using the accelerated decoding is not the main problem, the bottleneck may be perhaps feeding the uncompressed video to the GPU (no matter how decoded).
Thanks,
Martin
alatteri commentedon Sep 2, 2019
Hi Martin,
Fresh install of Raspian Buster Full on RPi4 (4GB). gpu_mem=512
I made a 1920x1080 H264 file from one of my un-compressed sources, using HandBrake defaults (expect for fps, set that to Source).
Omxplayer is very clean, perfect playback, almost no CPU usage.
ffplay -vcodec h264_mmal: 100% CPU lots of tearing
mpv was basically the same.
UV using nightly AppImage -d sdl --param force-lavd-decoder=h264_mmal
[video dec.] Successfully reconfigured display to 1920x1080 @30.00p, codec UYVY
[lavd] Using decoder: h264_mmal
[video dec.] Successfully reconfigured display to 1920x1080 @30.00p, codec UYVY
[lavd] Using decoder: h264_mmal
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
[lavd] Error while decoding frame (rc == -11): Resource temporarily unavailable.
alatteri commentedon Sep 10, 2020
Pi is no longer in my use case. Closing.