ubuntu上HDMI IN测试脚本(test_hdmirx.sh)执行失败的问题
接入一个小米电视盒子作为HDMI IN,执行/usr/local/bin/test_hdmirx.sh没有显示,输出如下麻烦抓一下下面几个命令的输出 log:
1. bash -x /usr/local/bin/test_hdmirx.sh
2. v4l2-ctl --list-devices | grep -A1 hdmirx | grep -v hdmirx | awk -F ' ' '{print $NF}'
1.
firefly@firefly:~$ bash -x /usr/local/bin/test_hdmirx.sh
++ v4l2-ctl --list-devices
++ grep -A1 hdmirx
++ grep -v hdmirx
++ awk -F ' ' '{print $NF}'
Failed to open /dev/video0: No such device
+ device_id=/dev/video8
+ v4l2-ctl -d /dev/video8 --set-dv-bt-timings query
VIDIOC_S_DV_TIMINGS: failed: Invalid argument
++ v4l2-ctl -d /dev/video8 --get-dv-timings
++ grep 'Active width'
++ awk -F ' ' '{print $NF}'
+ width=1920
++ v4l2-ctl -d /dev/video8 --get-dv-timings
++ grep 'Active heigh'
++ awk -F ' ' '{print $NF}'
+ heigh=1080
+ trap onCtrlC INT
+ export XDG_RUNTIME_DIR=/run/user/1000
+ XDG_RUNTIME_DIR=/run/user/1000
+ gst-launch-1.0 alsasrc device=hw:2,0 '!' audioconvert '!' audioresample '!' queue '!' alsasink device=hw:1,0
+ echo ' exit'
exit
+ true
+ sleep 10
+ gst-launch-1.0 v4l2src device=/dev/video8 '!' queue '!' video/x-raw,format=RGB '!' capssetter replace = true caps=video/x-raw,format=BGR,width=1920,height=1080 '!' glimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
Redistribute latency...
Redistribute latency...
Setting pipeline to PAUSED ...
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '5'.
Pipeline is live and does not need PREROLL ...
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayWayland\)\ gldisplaywayland0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video8' has no supported format
Additional debug info:
gstv4l2object.c(3752): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Call to TRY_FMT failed for RGB3 @ 3840x2160: Invalid argument
Execution ended after 0:00:00.015498799
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
+ true
+ sleep 10
+ true
+ sleep 10
+ true
+ sleep 10
+ true
+ sleep 10
+ true
+ sleep 10
+ true
+ sleep 10
+ true
+ sleep 10
+ true
+ sleep 10
+ true
+ sleep 10
+ true
+ sleep 10
+ true
+ sleep 10
2.
firefly@firefly:~$ ll /dev/video*
-rw-rw----1 root video 4 Aug 22 01:05 /dev/video-dec0
-rw-rw----1 root video 4 Aug 22 01:05 /dev/video-enc0
crw-rw----+ 1 root video 81, 0 Aug 22 01:05 /dev/video0
crw-rw----+ 1 root video 81, 1 Aug 22 01:05 /dev/video1
crw-rw----+ 1 root video 81, 2 Aug 22 01:05 /dev/video2
crw-rw----+ 1 root video 81, 3 Aug 22 01:05 /dev/video3
crw-rw----+ 1 root video 81, 4 Aug 22 01:05 /dev/video4
crw-rw----+ 1 root video 81, 5 Aug 22 01:05 /dev/video5
crw-rw----+ 1 root video 81, 6 Aug 22 01:05 /dev/video6
crw-rw----+ 1 root video 81, 7 Aug 22 01:05 /dev/video7
crw-rw----+ 1 root video 81, 8 Aug 22 01:05 /dev/video8
firefly@firefly:~$ v4l2-ctl --list-devices | grep -A1 hdmirx | grep -v hdmirx | awk -F ' ' '{print $NF}'
Failed to open /dev/video0: No such device
/dev/video8
脚本命令是接 3399 验证的,3399 输出的图像是 RGB 格式,请根据自己的输入设备图像格式修改 format 板蓝根 发表于 2022-9-8 09:20
脚本命令是接 3399 验证的,3399 输出的图像是 RGB 格式,请根据自己的输入设备图像格式修改 format
输入设备图像格式用哪个命令查看?或者您知道小米电视盒子输出的格式是什么吗? 通过命令看到输入格式是NV16,把脚本中的format从RGB改成NV16再执行还是有错误,麻烦再帮忙看下是什么问题,日志如下:
firefly@firefly:~$ v4l2-ctl -DVI -d /dev/video8
Driver Info:
Driver name : rk_hdmirx
Card type : rk_hdmirx
Bus info : fdee0000.hdmirx-controller
Driver version : 5.10.66
Capabilities : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format
VIDIOC_G_INPUT: failed: Inappropriate ioctl for device
Format Video Capture Multiplanar:
Width/Height : 1920/1080
Pixel Format : 'NV16' (Y/CbCr 4:2:2)
Field : None
Number of planes: 1
Flags : premultiplied-alpha, 0x000000fe
Colorspace : Unknown (0x5dabe400)
Transfer Function : Default
YCbCr/HSV Encoding: Unknown (0x000000ff)
Quantization : Default
Plane 0 :
Bytes per Line : 1920
Size Image : 4147200
firefly@firefly:~$ vim /usr/local/bin/test_hdmirx.sh
firefly@firefly:~$ sudo vim /usr/local/bin/test_hdmirx.sh
firefly@firefly:~$ bash -x /usr/local/bin/test_hdmirx.sh
++ v4l2-ctl --list-devices
++ grep -A1 hdmirx
++ grep -v hdmirx
++ awk -F ' ' '{print $NF}'
Failed to open /dev/video0: No such device
+ device_id=/dev/video8
+ v4l2-ctl -d /dev/video8 --set-dv-bt-timings query
VIDIOC_S_DV_TIMINGS: failed: Invalid argument
++ v4l2-ctl -d /dev/video8 --get-dv-timings
++ grep 'Active width'
++ awk -F ' ' '{print $NF}'
+ width=1920
++ v4l2-ctl -d /dev/video8 --get-dv-timings
++ grep 'Active heigh'
++ awk -F ' ' '{print $NF}'
+ heigh=1080
+ trap onCtrlC INT
+ export XDG_RUNTIME_DIR=/run/user/1000
+ XDG_RUNTIME_DIR=/run/user/1000
+ echo ' exit'
exit
+ true
+ sleep 10
+ gst-launch-1.0 alsasrc device=hw:2,0 '!' audioconvert '!' audioresample '!' queue '!' alsasink device=hw:1,0
+ gst-launch-1.0 v4l2src device=/dev/video8 '!' queue '!' video/x-raw,format=NV16 '!' capssetter replace = true caps=video/x-raw,format=BGR,width=1920,height=1080 '!' glimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
Redistribute latency...
Redistribute latency...
Setting pipeline to PAUSED ...
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '5'.
Pipeline is live and does not need PREROLL ...
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayWayland\)\ gldisplaywayland0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
** (gst-launch-1.0:4070): CRITICAL **: 02:23:28.437: gst_video_frame_map_id: assertion 'info->finfo->format == meta->format' failed
ERROR: from element /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLUploadElement:gluploadelement0: Failed to upload buffer
Additional debug info:
gstgluploadelement.c(261): gst_gl_upload_element_prepare_output_buffer (): /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLUploadElement:gluploadelement0
Execution ended after 0:00:00.145792935
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
+ true
+ sleep 10
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:19.361522965
Setting pipeline to PAUSED ...
++ onCtrlC
++ echo 'Ctrl+C is captured'
Ctrl+C is captured
++ killall gst-launch-1.0
/usr/local/bin/test_hdmirx.sh: line 13: killall: command not found
++ exit 0 陈新志 发表于 2022-9-9 10:26
通过命令看到输入格式是NV16,把脚本中的format从RGB改成NV16再执行还是有错误,麻烦再帮忙看下是什么问题 ...
你好,请问问题解决了吗?
页:
[1]