Hi
I created a container as below.
export DISPLAY=:1
xhost +
sudo docker run -it --runtime nvidia --network myappnet --device=/dev/video0:/dev/video0:rwm -e DISPLAY=$DISPLAY -v /tmp/X11-unix:/tmp/X11-unix:rw -v /home/usr/Desktop/work:/work nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.12-py3 bash
The following error is output when running cv2.VideoCapture from a Pytorch container obtained from the NGC catalog.
It works outside the container.
Please tell me the measures.
cap = cv2.VideoCapture ('v4l2src device=/dev/video0 io-mode=2 ! image/jpeg, width=(int)1920, height=(int)1080, framerate=30/1 ! nvv4l2decoder mjpeg=1 ! nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw, format=BGR ! appsink', cv2.CAP_GSTREAMER)
error content
No EGL Display
nvbufsurftransform: Could not get EGL display connection
nvbuf_utils: Could not get EGL display connection
nvbuf_utils: Could not get EGL display connection
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 277
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 277
NVJPGInit 553: Host1x channel open failed
NvJpeg_NvVideo_Error: tegraNvjpgMJPEGDecoderCreate: 181: NVJPGInit failed for NVJPG1 engine
NVMEDIA: cbBeginSequence: 610: NVMEDIAVideoDecoderCreate failed!
NVMEDIA: NvMMLiteNVMEDIAProcessVES: 1824: NvMediaParserParse Unsupported Codec
Stream format not found, dropping the frame
Stream format not found, dropping the frame
NVMEDIA: NvMMLiteNVMEDIADecDoWork: 2228: NVMEDIA Video Dec Unsupported Stream
(python3:32): GStreamer-CRITICAL **: 01:54:31.840:
Trying to dispose element capsfilter2, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
(python3:32): GStreamer-CRITICAL **: 01:54:31.840:
Trying to dispose element capsfilter1, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
please help me