ros_deep_learning icon indicating copy to clipboard operation
ros_deep_learning copied to clipboard

gst-launch-1.0 preview is just a black video - no error messages

Open andanders opened this issue 7 months ago • 6 comments

I am unable to use my camera inside the docker container. Testing with gst-launch-1.0 v4l2src ! videoconvert ! autovideosinki get a preview window with just a black screen. The same command runs just fine outside the container. So I know the camera works with v4l2src.

To start the container I run

$ docker/run.sh
ARCH:  aarch64
reading L4T version from /etc/nv_tegra_release
L4T BSP Version:  L4T R35.4.1
localuser:root being added to access control list
CONTAINER_IMAGE:  dustynv/jetson-inference:r35.4.1
DATA_VOLUME:      --volume /home/nvidia/jetson-ros-inference/data:/jetson-inference/data --volume /home/nvidia/jetson-ros-inference/python/training/classification/data:/jetson-inference/python/training/classification/data --volume /home/nvidia/jetson-ros-inference/python/training/classification/models:/jetson-inference/python/training/classification/models --volume /home/nvidia/jetson-ros-inference/python/training/detection/ssd/data:/jetson-inference/python/training/detection/ssd/data --volume /home/nvidia/jetson-ros-inference/python/training/detection/ssd/models:/jetson-inference/python/training/detection/ssd/models --volume /home/nvidia/jetson-ros-inference/python/www/recognizer/data:/jetson-inference/python/www/recognizer/data 
V4L2_DEVICES:     --device /dev/video0 
DISPLAY_DEVICE:   -e DISPLAY=:0 -v /tmp/.X11-unix/:/tmp/.X11-unix 

root@nvidia-desktop:/jetson-inference# 

To start the video preview;

$ gst-launch-1.0 v4l2src ! videoconvert ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
$ ^C
handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:04.136207413
Setting pipeline to NULL ...
Freeing pipeline ...

System/software info

Linux nvidia-desktop 5.10.120-tegra aarch64 Docker version 27.0.3, build 7d4bcd8 Hardware is Syslogic Orin Nano

Repo pulled with git clone --recursive --depth=1 https://github.com/dusty-nv/jetson-inference I'm on the master branch, commit e8361ae7f5f3651c4ff46295b193291a93d52735.

v4l2-compliance output "Succeeded: 44, Failed: 1, Warnings: 0" Same result inside and outside container.

v4l2-compliance SHA: not available, 64 bits

Compliance test for tegra-video device /dev/video0:

Driver Info:
	Driver name      : tegra-video
	Card type        : vi-output, ar0230 30-0043
	Bus info         : platform:tegra-capture-vi:1
	Driver version   : 5.10.120
	Capabilities     : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : tegra-camrtc-ca
	Model            : NVIDIA Tegra Video Input Device
	Serial           : 
	Bus info         : 
	Media version    : 5.10.120
	Hardware revision: 0x00000003 (3)
	Driver version   : 5.10.120
Interface Info:
	ID               : 0x0300001d
	Type             : V4L Video
Entity Info:
	ID               : 0x0000001b (27)
	Name             : vi-output, ar0230 30-0043
	Function         : V4L2 I/O
	Pad 0x0100001c   : 0: Sink
	  Link 0x02000021: from remote pad 0x1000009 of entity '13e40000.host1x:nvcsi@15a00000-': Data, Enabled

Required ioctls:
	test MC information (see 'Media Driver Info' above): OK
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second /dev/video0 open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls (Input 0):
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 25 Private Controls: 12

Format ioctls (Input 0):
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
	test VIDIOC_G/S_PARM: OK
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK (Not Supported)
	test Composing: OK (Not Supported)
	test Scaling: OK (Not Supported)

Codec ioctls (Input 0):
	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
		fail: v4l2-test-buffers.cpp(715): q.create_bufs(node, 1, &fmt) != EINVAL
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
	test VIDIOC_EXPBUF: OK
	test Requests: OK (Not Supported)

Total for tegra-video device /dev/video0: 45, Succeeded: 44, Failed: 1, Warnings: 0

Addendum

My actual purpose with this issue is to fix roslaunch ros_deep_learning video_viewer.ros1.launch, but I figured it might be related, and gst-launch-1.0 is easier to test with.

andanders avatar Jul 15 '24 09:07 andanders