I try to use the container via below code:
sudo docker run -it -v /home/jetson:/jetson -d --name test_camera.py --gpus all -e DISPLAY:$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix --runtime nvidia --device /dev/video0:/dev/video0:mwr --network host nvcr.io/nvidia/l4t-pytorch:r32.5.0-pth1.7-py3 /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 - test_camera.py:
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:
python3 test_camera.py
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