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
[Orange Pi 5+] HDMI IN - Not a video capture device #252
Comments
You need to install some packages for /dev/video0 to appear. Try to install the below packages then reboot your system. sudo apt-get update
sudo apt-get install -y mali-g610-firmware rockchip-multimedia-config |
It seems i'm getting the same error after having installed these 2 packages. |
Can you share the output of |
|
I think this is an issue with using ffmpeg directly. In my testing, I used gstreamer as shown in the documentation available from orangepi. Below is the example script form orangepi. I think you will need to try with gstreamer. #!/bin/bash
trap 'onCtrlC' INT
function onCtrlC () {
echo 'Ctrl+C is captured'
killall gst-launch-1.0
exit 0
}
device_id=$(v4l2-ctl --list-devices | grep -A1 hdmirx | grep -v hdmirx | awk -F ' ' '{print $NF}')
v4l2-ctl -d $device_id --set-dv-bt-timings query 2>&1 > /dev/null
width=$(v4l2-ctl -d $device_id --get-dv-timings | grep "Active width" |awk -F ' ' '{print $NF}')
heigh=$(v4l2-ctl -d $device_id --get-dv-timings | grep "Active heigh" |awk -F ' ' '{print $NF}')
es8388_card=$(aplay -l | grep "es8388" | cut -d ':' -f 1 | cut -d ' ' -f 2)
hdmi0_card=$(aplay -l | grep "hdmi0" | cut -d ':' -f 1 | cut -d ' ' -f 2)
hdmi1_card=$(aplay -l | grep "hdmi1" | cut -d ':' -f 1 | cut -d ' ' -f 2)
hdmiin_card=$(arecord -l | grep "hdmiin" | cut -d ":" -f 1 | cut -d ' ' -f 2)
DISPLAY=:0.0 gst-launch-1.0 v4l2src device=${device_id} io-mode=4 ! videoconvert \
! video/x-raw,format=NV12,width=${width},height=${heigh} \
! videoscale ! video/x-raw,width=1280,height=720 \
! autovideosink sync=false 2>&1 > /dev/null &
gst-launch-1.0 alsasrc device=hw:${hdmiin_card},0 ! audioconvert ! audioresample ! queue \
! tee name=t ! queue ! alsasink device="hw:${hdmi0_card},0" \
t. ! queue ! alsasink device="hw:${hdmi1_card},0" &
while true
do
sleep 10
done |
tried the gstreamer example script. below is the output, but it doesn't look very good though
|
is this an orange pi 5 specific issue? or all the rk3588 boards are all designed to be so? like Radxa ROCK 5B |
It looks like the above example failed on your end because you are using the server image, I think a desktop environment needs to be started for it to work. |
You are right. It works now on the desktop. But latency is very visible, not familiar with gstreamer though. In my view, gstreamer is not exactly equivalent to ffmpeg. ffmpeg is absolutely needed for hdimi in on rk3588 board. |
I agree, but Rockchip's work on ffmpeg has been abandoned. The open-source community must create a fork to add more support and capabilities. There has been some work already done, but it's not something I have looked at yet #246. |
"Recording" with "ffmpeg -i /dev/video0 ./output.mkv" and "playback" with "mpv /dev/video0" work right away (2023/10/30 (latest of everything, but not yet rl 1.29)), which is way cool! I'd love to use it in OBS or VLC, but seem not to be able to do what can be done with ffmpeg and mpv... |
OBS should work fine to record, but to get OBS to work properly there are a few extra steps. If I recall some env vars need to be set and extra packages. But that's great to hear! |
OBS works fine if you install qt6 platform plugin (hidden in the package qt6-wayland, and yes, qt6, not 5 as everybody assumes ;-) ). Problem is I see nothing if I define a v4l2 capture device, although OBS does seem to see the hdmiin device:
And this is how OBS sees the device (without producing an image): Is there something I can do to understand the problem, solve it? This is what mpv shows for |
Vlc gives this output at an attempt to play "video capture device" /dev/video0:
mpv also complained about "Inapropriate ioctl for device" but still produced a video then ;-) |
https://github.com/rigaya/rkmppenc Does it work because they have included |
It doesn't work for me, the out.ts isn't written (I didn't know how to stop the recording, so I hit ctrl-c, maybe that was wrong). I did however try to identify the term that makes "Inappropriate ioctl for device" go away, and it's not the "ignore_input_error" but "input-option channel:0". Actually V4L2 Test Bench seems to give working access in a GUI... |
I'm running on Ubuntu22.04 and I did 'apt upgrade', but still get |
Anyone tried the Gstreamer input for Obs instead? |
Testing the HDMI In with ffmpeg on ubuntu server. Below is the error message.
The text was updated successfully, but these errors were encountered: