HDMI Input Not Working, Ubuntu 24.04

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Please provide the version of the system here:

Ubuntu 24.04, kernel 5.15.119

Please describe your issue below:

The gstreamer method as prescribed here does not work:
https://docs.khadas.com/products/sbc/vim4/applications/hdmi-input-5.15

The hdmiin_demo does work and shows my source, but the gstreamer method will not save to file, nor will it display if using autovideosink.

My user is a member of group “video” and I have tried also with sudo. The encoded file in tmp is always zero size.

I have been trying this in a console on the desktop.

Post a console log of your issue below:


gst-launch-1.0 v4l2src device=/dev/video71 io-mode=dmabuf num-buffers=300 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=interleaved ! amlvenc ! h264parse ! qtmux ! filesink location=/tmp/test71.mp4
Setting pipeline to PAUSED ...
[API:aml_v4l2src_connect:271]Enter, devname : /dev/video71
driver : vdin_video
device : mesont7
bus_info : vdin1 v4l2
version : 539099424
strcmp cap.driver: vdin_video
func_name: aml_src_get_hdmi_method
initialize func addr: 0x7f9e6b0cbc
finalize func addr: 0x7f9e6b0ff0
start func addr: 0x7f9e6b1198
stop func addr: 0x7f9e6b12d8
change_divide_framerate, L69, dev /dev/video71, change_frame 1
change_divide_framerate L91 Set framerate div 2 success
[2024-08-19 17:24:53]  DEBUG  [amlv4l2src hdmisrc.c:102:hdmi_src_initialize]enter
USERNAME    4914  0.0  0.0  80764  3904 pts/0    S    16:54   0:00 hdmictrl
USERNAME    5242  0.0  0.0   2380   816 pts/1    S+   17:24   0:00 sh -c -- ps -aux | grep hdmictrl
USERNAME    5244  0.0  0.0   6140  2016 pts/1    S+   17:24   0:00 grep hdmictrl
[2024-08-19 17:24:53]  DEBUG  [amlv4l2src hdmisrc.c:68:hdmi_src_obtain_devname]enter
[2024-08-19 17:24:53]  DEBUG  [amlv4l2src hdmisrc.c:79:hdmi_src_obtain_devname]hdmi_src_obtain_devname, pid=5245
[2024-08-19 17:24:53]  DEBUG  [amlv4l2src hdmisrc.c:87:hdmi_src_obtain_devname]hdmi_src_obtain_devname end, pid=5245
[2024-08-19 17:24:53]  DEBUG  [amlv4l2src hdmisrc.c:79:hdmi_src_obtain_devname]hdmi_src_obtain_devname, pid=0
[2024-08-19 17:24:53]  DEBUG  [amlv4l2src hdmisrc.c:83:hdmi_src_obtain_devname]ready to execl /usr/bin/hdmictrl, pid=0
[2024-08-19 17:24:53]  DEBUG  [amlv4l2src hdmictrl.c:304:main]enter, prepare enter hdmi_rx_svctx_init
[2024-08-19 17:24:53]  DEBUG  [amlv4l2src hdmictrl.c:256:hdmi_rx_svctx_init]enter
[2024-08-19 17:24:53]  DEBUG  [amlv4l2src hdmictrl.c:264:hdmi_rx_svctx_init]prepare get the GetInstance

Hello @DoomMonkey

I will verify this issue later.

Hello @DoomMonkey
1.You must connect your VIM4 to a workablbe HDMI screen or the HDMI IN will not working.
https://docs.khadas.com/products/sbc/vim4/applications/hdmi-input-5.15

2.Below are my test results.

khadas@Khadas:~$ ll /tmp/test71.mp4 
-rw-rw-r-- 1 khadas khadas 576907 Aug 20 03:04 /tmp/test71.mp4

Ivan, thank you for looking into this. I do have a display hooked up to the HDMI out. I am logged into the Ubuntu desktop on this display and attempting to execute the gstreamer pipeline from a terminal on this desktop.

The source that I am using to feed the HDMI input does work with the other method of using hdmiin_demo application.

If it makes any difference, I believe my VIM4 is the model without an NPU.

Hello @DoomMonkey
1.I use the same model of VIM4 as you,try the following firmware:

https://dl.khadas.com/products/vim4/firmware/ubuntu/generic/ubuntu-24.04/vim4-ubuntu-24.04-gnome-linux-5.15-fenix-1.6.9-240618.img.xz

2.The command I used.

gst-launch-1.0 v4l2src device=/dev/video71 io-mode=dmabuf num-buffers=300 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=interleaved ! amlvenc ! h264parse ! qtmux ! filesink location=/tmp/test71.mp4