(Cannot open video device /dev/video0: No such device) #53

Closed
opened 2025-12-23 10:31:42 +01:00 by backuprepo · 12 comments
Owner

Originally created by @N0tiK44 on GitHub (Apr 15, 2024).

Had a try and came out with no luck unfortunately for HDMI input. (Orange pi 5 Plus)

Installed all dependencies (MPP & RGA)tried multiple cmd's and got (Cannot open video device /dev/video0: No such device) which is better than (not a capture device) in the past I did v4l2-ctl --list-devices and my rk_hdmirx says hdmirx-controller as /dev/video20 if thats relevant, no matter what whenever /dev/video0 is ever called it will always mention /dev/video0: No such device

went to https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu installed all libraries and dependencies also tried the example at the bottom of the page as you mentioned which showed the same result (no such device).When i try Orange Pi's test for hdmi input using gstreamer it works perfectly with test_hdmiin.sh, would be interesting to see how that works to begin with.

Is there a specific installation methed im not doing correctly? i must be overlooking obviously. seems to be a bit overkill for HDMI input to not have such terrible latency

this person here has the same issue
https://www.reddit.com/r/OrangePI/comments/1bn38u6/how_to_use_the_hdmi_in_on_orange_pi_5_plus_with/?sort=new

Originally created by @N0tiK44 on GitHub (Apr 15, 2024). Had a try and came out with no luck unfortunately for HDMI input. (Orange pi 5 Plus) Installed all dependencies (MPP & RGA)tried multiple cmd's and got (Cannot open video device /dev/video0: No such device) which is better than (not a capture device) in the past I did v4l2-ctl --list-devices and my rk_hdmirx says hdmirx-controller as /dev/video20 if thats relevant, no matter what whenever /dev/video0 is ever called it will always mention /dev/video0: No such device went to https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu installed all libraries and dependencies also tried the example at the bottom of the page as you mentioned which showed the same result (no such device).When i try Orange Pi's test for hdmi input using gstreamer it works perfectly with test_hdmiin.sh, would be interesting to see how that works to begin with. Is there a specific installation methed im not doing correctly? i must be overlooking obviously. seems to be a bit overkill for HDMI input to not have such terrible latency this person here has the same issue https://www.reddit.com/r/OrangePI/comments/1bn38u6/how_to_use_the_hdmi_in_on_orange_pi_5_plus_with/?sort=new
backuprepo 2025-12-23 10:31:42 +01:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@david3a commented on GitHub (Apr 29, 2024):

have you tried this ?

./ffplay -f video4linux2 -i /dev/video0

after a build ?

worked for me, I missed off the ./ so got pre-installed ffplay which gives the warning

@david3a commented on GitHub (Apr 29, 2024): have you tried this ? ./ffplay -f video4linux2 -i /dev/video0 after a build ? worked for me, I missed off the ./ so got pre-installed ffplay which gives the warning
Author
Owner

@N0tiK44 commented on GitHub (Apr 30, 2024):

have you tried this ?

./ffplay -f video4linux2 -i /dev/video0

after a build ?

worked for me, I missed off the ./ so got pre-installed ffplay which gives the warning

So after a considerable amount of work, for some weird reason.. /dev/video0 isnt actually a usable device. infact its /dev/video20 which is linked to the hdmirx-controller

Using the following i was able to get a encoding view HDMI input

ffmpeg -re -f v4l2 /dev/video20 -c:v hevc_rkmpp -qp_init 10 /root/Desktop/test.mp4

as of now im still unsure how to just type in a command and let it encode & decode at the same time with 0 latency..
if its even possible, even for raw video. i dont mind that it places a video file as its not intended to be touched physically instead just using it as part of the pipeline,

Main goal was to plug and play, have everything installed on first boot, and upon second using will cd to ffmpeg and will launch a command to livestream the hdmi with no latency what so ever. even sub frame.

nyanmisaka mentioned mpv or kodi, mpv seems like a valuable approach but is licensed, but i have no idea how to get either one to work.

Here's a latency example ive made below.

https://github.com/nyanmisaka/ffmpeg-rockchip/assets/141003308/94668c8f-a6d5-4b74-abd8-9d9809c40f94

@N0tiK44 commented on GitHub (Apr 30, 2024): > have you tried this ? > > ./ffplay -f video4linux2 -i /dev/video0 > > after a build ? > > worked for me, I missed off the ./ so got pre-installed ffplay which gives the warning So after a considerable amount of work, for some weird reason.. /dev/video0 isnt actually a usable device. infact its /dev/video20 which is linked to the hdmirx-controller Using the following i was able to get a encoding view HDMI input ffmpeg -re -f v4l2 /dev/video20 -c:v hevc_rkmpp -qp_init 10 /root/Desktop/test.mp4 as of now im still unsure how to just type in a command and let it encode & decode at the same time with 0 latency.. if its even possible, even for raw video. i dont mind that it places a video file as its not intended to be touched physically instead just using it as part of the pipeline, Main goal was to plug and play, have everything installed on first boot, and upon second using will cd to ffmpeg and will launch a command to livestream the hdmi with no latency what so ever. even sub frame. nyanmisaka mentioned mpv or kodi, mpv seems like a valuable approach but is licensed, but i have no idea how to get either one to work. Here's a latency example ive made below. https://github.com/nyanmisaka/ffmpeg-rockchip/assets/141003308/94668c8f-a6d5-4b74-abd8-9d9809c40f94
Author
Owner

@nyanmisaka commented on GitHub (Apr 30, 2024):

The video input device outputs data as raw RGB or YUV. So no h264/h265 decoding is required.

@nyanmisaka commented on GitHub (Apr 30, 2024): The video input device outputs data as raw RGB or YUV. So no h264/h265 decoding is required.
Author
Owner

@nyanmisaka commented on GitHub (Apr 30, 2024):

at the same time with 0 latency..

MPP does not support 0 latency. It can only reduce latency by using an option -flags +low_delay.

https://github.com/nyanmisaka/ffmpeg-rockchip/wiki/Encoder#test-encoders

@nyanmisaka commented on GitHub (Apr 30, 2024): > at the same time with 0 latency.. MPP does not support 0 latency. It can only reduce latency by using an option `-flags +low_delay`. https://github.com/nyanmisaka/ffmpeg-rockchip/wiki/Encoder#test-encoders
Author
Owner

@N0tiK44 commented on GitHub (Apr 30, 2024):

at the same time with 0 latency..

MPP does not support 0 latency. It can only reduce latency by using an option -flags +low_delay.

https://github.com/nyanmisaka/ffmpeg-rockchip/wiki/Encoder#test-encoders

What can support 0 latency or 1-2 frame latency? 16.7ms 60fps or 8.3ms 120fps. parsec, moonlight & sunshine is software 2 software which is pretty much instant.
but hardware 2 hardware is getting 1 second.
is mpp and rga not the right tools for the specific task? didnt think it would be this difficult.

@N0tiK44 commented on GitHub (Apr 30, 2024): > > at the same time with 0 latency.. > > MPP does not support 0 latency. It can only reduce latency by using an option `-flags +low_delay`. > > https://github.com/nyanmisaka/ffmpeg-rockchip/wiki/Encoder#test-encoders What can support 0 latency or 1-2 frame latency? 16.7ms 60fps or 8.3ms 120fps. parsec, moonlight & sunshine is software 2 software which is pretty much instant. but hardware 2 hardware is getting 1 second. is mpp and rga not the right tools for the specific task? didnt think it would be this difficult.
Author
Owner

@nyanmisaka commented on GitHub (Apr 30, 2024):

at the same time with 0 latency..

MPP does not support 0 latency. It can only reduce latency by using an option -flags +low_delay.
https://github.com/nyanmisaka/ffmpeg-rockchip/wiki/Encoder#test-encoders

What can support 0 latency or 1-2 frame latency? 16.7ms 60fps or 8.3ms 120fps. parsec, moonlight & sunshine is software 2 software which is pretty much instant. but hardware 2 hardware is getting 1 second. is mpp and rga not the right tools for the specific task? didnt think it would be this difficult.

I'd suggest opening a new issue on the upstream Rockchip MPP repo to ask the official developers about this type of question. They know hardware better than me. https://github.com/rockchip-linux/mpp/issues

@nyanmisaka commented on GitHub (Apr 30, 2024): > > > at the same time with 0 latency.. > > > > > > MPP does not support 0 latency. It can only reduce latency by using an option `-flags +low_delay`. > > https://github.com/nyanmisaka/ffmpeg-rockchip/wiki/Encoder#test-encoders > > What can support 0 latency or 1-2 frame latency? 16.7ms 60fps or 8.3ms 120fps. parsec, moonlight & sunshine is software 2 software which is pretty much instant. but hardware 2 hardware is getting 1 second. is mpp and rga not the right tools for the specific task? didnt think it would be this difficult. I'd suggest opening a new issue on the upstream Rockchip MPP repo to ask the official developers about this type of question. They know hardware better than me. https://github.com/rockchip-linux/mpp/issues
Author
Owner

@hbiyik commented on GitHub (Apr 30, 2024):

is the application here is streaming V4L2 input? Or encoding it?
If streaming, ffmpeg/mpp/rga is totally irrelevant, and ffplay is notorious in terms of latency.

To stream you can try mpv or something which is meant for that, which i believe ffplay is not meant to.

https://github.com/mpv-player/mpv/wiki/Video4Linux2-Input

Above gives some insights. And i had never tried this in past so i also dont know.

@hbiyik commented on GitHub (Apr 30, 2024): is the application here is streaming V4L2 input? Or encoding it? If streaming, ffmpeg/mpp/rga is totally irrelevant, and ffplay is notorious in terms of latency. To stream you can try mpv or something which is meant for that, which i believe ffplay is not meant to. https://github.com/mpv-player/mpv/wiki/Video4Linux2-Input Above gives some insights. And i had never tried this in past so i also dont know.
Author
Owner

@N0tiK44 commented on GitHub (Apr 30, 2024):

is the application here is streaming V4L2 input? Or encoding it? If streaming, ffmpeg/mpp/rga is totally irrelevant, and ffplay is notorious in terms of latency.

To stream you can try mpv or something which is meant for that, which i believe ffplay is not meant to.

https://github.com/mpv-player/mpv/wiki/Video4Linux2-Input

Above gives some insights. And i had never tried this in past so i also dont know.

Its encoding video to the /root/Desktop/test.mp4 destination, which cannot be viewed at the same time from my testing
id use mpv but that is a GPL license.

@N0tiK44 commented on GitHub (Apr 30, 2024): > is the application here is streaming V4L2 input? Or encoding it? If streaming, ffmpeg/mpp/rga is totally irrelevant, and ffplay is notorious in terms of latency. > > To stream you can try mpv or something which is meant for that, which i believe ffplay is not meant to. > > https://github.com/mpv-player/mpv/wiki/Video4Linux2-Input > > Above gives some insights. And i had never tried this in past so i also dont know. Its encoding video to the /root/Desktop/test.mp4 destination, which cannot be viewed at the same time from my testing id use mpv but that is a GPL license.
Author
Owner

@hbiyik commented on GitHub (Apr 30, 2024):

ok what was the purpose of above video? measure encoding latency visually?

@hbiyik commented on GitHub (Apr 30, 2024): ok what was the purpose of above video? measure encoding latency visually?
Author
Owner

@nyanmisaka commented on GitHub (Apr 30, 2024):

IMO if you just want to play the video captured by HDMI IN/RX on the screen, then there is no need to use MPP and RGA to transcode.

HDMI IN (YUV/RGB) -> HDMI/DP OUT (Display)

@nyanmisaka commented on GitHub (Apr 30, 2024): IMO if you just want to play the video captured by HDMI IN/RX on the screen, then there is no need to use MPP and RGA to transcode. HDMI IN (YUV/RGB) -> HDMI/DP OUT (Display)
Author
Owner

@N0tiK44 commented on GitHub (Apr 30, 2024):

IMO if you just want to play the video captured by HDMI IN/RX on the screen, then there is no need to use MPP and RGA to transcode.

HDMI IN (YUV/RGB) -> HDMI/DP OUT (Display)

Not as easy as you've put it. only way to read HDMI in video is by /dev/video20 via test_hdmiin.sh or v4l2 test bench

@N0tiK44 commented on GitHub (Apr 30, 2024): > IMO if you just want to play the video captured by HDMI IN/RX on the screen, then there is no need to use MPP and RGA to transcode. > > HDMI IN (YUV/RGB) -> HDMI/DP OUT (Display) Not as easy as you've put it. only way to read HDMI in video is by /dev/video20 via test_hdmiin.sh or v4l2 test bench
Author
Owner

@nyanmisaka commented on GitHub (Apr 30, 2024):

IMO if you just want to play the video captured by HDMI IN/RX on the screen, then there is no need to use MPP and RGA to transcode.
HDMI IN (YUV/RGB) -> HDMI/DP OUT (Display)

Not as easy as you've put it. only way to read HDMI in video is by /dev/video20 via test_hdmiin.sh or v4l2 test bench

Then this has nothing to do with this project. It's just that the video player you are using does not support reading videos from V4L2 input. MPP hardware decoders and encoders are not used in test_hdmiin.sh.

869a425c93/opi5plus-post-install/test_hdmiin.sh

@nyanmisaka commented on GitHub (Apr 30, 2024): > > IMO if you just want to play the video captured by HDMI IN/RX on the screen, then there is no need to use MPP and RGA to transcode. > > HDMI IN (YUV/RGB) -> HDMI/DP OUT (Display) > > Not as easy as you've put it. only way to read HDMI in video is by /dev/video20 via test_hdmiin.sh or v4l2 test bench Then this has nothing to do with this project. It's just that the video player you are using does not support reading videos from V4L2 input. MPP hardware decoders and encoders are not used in `test_hdmiin.sh`. https://github.com/BredOS/sbc-pkgbuilds/blob/869a425c939aeef5903d8610cf7d175644a4159d/opi5plus-post-install/test_hdmiin.sh
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/ffmpeg-rockchip#53
No description provided.