Jetson camera not working via container

I try to use the container via below code:

sudo docker run -it -v /home/jetson:/jetson -d --name --gpus all -e DISPLAY:$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix --runtime nvidia --device /dev/video0:/dev/video0:mwr --network host /bin/bash

The fps is as below: - v4l2-ctl --list-formats-ext

Size: Discrete 320x240
Interval : Discrette 0.033s (30.000 fps)

Then i create a python script -

from jetcam.usb_camera import USBCamera
camera = USBCamera(capture_device=0, width=224, height=224, capture_width=320, capture_height=240, capture_fps=30)
camera.running = True

Execute the script:
The camera is running because the usb camera lights is on but there isnt any screen showing the camera. It just run but shows nothing… Is there anyone could assist me with this issue please.

Also, I tested the below code and it works, the usb camera connected and show a pop up screen:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=320,height=240,framerate=5/1 ! videoconvert ! xvimagesink

Maybe be try videotestsrc in container to confirm.

It says bash: videotestsrc: command not found

Have reference to below topic.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.