I want to decode usb streaming and display it，what command should I use？
For UVC(USB Video Class) streaming, we support to capture frame data through v4l2. Please check if you can run v4l2-ctl commands to capture good frame data. And then you can try v4l2src plugin in gstreamer. Or try jetson_multimedia_api samples.
v4l2-ctl commands could capture
For using gstreamer, please check
Using gst-launch-1.0 pipeline to Receiving (on target) : Network Source + video decode + video render - #14 by DaneLLL
Please make sure format, width,height,framerate are configured as the mode shown in v4l2-ctl --list-formats-ext. If either one is not coneectly set, it may fail in launching the gstreamer pipeline.
For using jetson_multimedia_api, you can try the sample:
Th camera source does not support general YUV422. Please try H264:
$ gst-launch-1.0 v4l2src num-buffers=150 device=/dev/video0 ! video/x-h264,width=1920,height=1080,framerate=30/1 ! fakesink sync=0
If above command works, please then try
$ gst-launch-1.0 v4l2src num-buffers=150 device=/dev/video0 ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! nvv4l2decoder ! fakesink sync=0
Then try this command and check if camera preview is shown:
$ DISPLAY=:0 gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! nvv4l2decoder ! nvvidconv ! video/x-raw ! xvimagesink sync=0
It looks like the stream cannot be decoded by hardware decoder. Please try software decoder:
$ DISPLAY=:0 gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! avdec_h264 ! videoconvert ! video/x-raw ! xvimagesink sync=0
Please run the command and check if you can see the plugin:
$ rm .cache/gstreamer-1.0/registry.aarch64.bin $ export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1 $ gst-inspect-1.0 avdec_h264
The software decoder is present. Please try to decode the h264 stream with it.
this can decode the h265 stream？
avdec_h264 is software decoder for decoding h264 stream. Your camera source can output h264 stream. Please try the command and check if you can see camera preview.
it can see camera preview now.
i want to ask can decode the h265 stream？
For decoding h265 stream, please try hardware decoder nvv4l2decoder or software decoder avdec_h265
how to use v4l2-ctrl capture streaming?
You may refer to this webpage and try the commands:
linux - Error negotiating V4L2 H264 output over UVC USB webcam - Stack Overflow
I use opencv to capture the steaming，but the picture is black，why？
the opencv code as the upload test_3.py
test_3.py (785 Bytes)