Hello everyone,
Thank you for stopping buy and reading this thread. I have Orange Pi 4 LTS with the latest Armbian Jammy image (Armbian_23.8.1_Orangepi4-lts_jammy_current_6.1.50). But I also want to mention that I've tried the same thing on the "official" Ubuntu image from OrangePi website and it was the same.
I need to decode and show RTSP video stream, h264 encoded. First of all, I've tried gstreamer with v4l2 codecs. I was using v4l2slh264dec from gst_plugins_bad. This is the only hardware codec in gstreamer for my device (at least available by default) and it worked fine until I started encountering a strange bug when my video getting stuck into 0.5-1 second loop forever. Anyway, I thought that I could bypass this issue by building libav/FFmpeg with v4l2 features and using it instead. However, I couldn't, and this is my problem.
I am building FFmpeg from source like this:
First of all, I made sure that there is no FFmpeg on my system.
Then:
sudo apt install libv4l-dev libsdl2-dev -y
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg/
./configure --enable-libv4l2 --enable-libdrm
No errors/warnings. h264_v4l2m2m is in "Enabled decoders".
make -j6
sudo make install
sudo ldconfig
ffplay -vcodec h264_v4l2m2m rtsp://192.168.0.125:8554/stream
It gives me the following error:
If I do not specify v4l2m2m decoder - it works just fine, but with software decoding.
Drivers are present:
And I have no idea how to fix this issue
I will appreciate a lot any help!