Can't Stream Video on TX2-4GB with Gstreamer

Hello everyone,

I am working on an external FPGA-CSI2 camera to stream video using OV5693 driver. I was successfully captured raw video from /dev/video0 by using this command,

v4l2-ctl --set-fmt-video=width=1280,height=720,pixelformat=BGRA --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100 -d /dev/video0 --stream-to=ov491.raw

The problem is, when I try to stream /dev/video0 on my PC using gstreamer by running this command on PC,

sudo gst-launch-1.0 udpsrc port=5700 ! application/x-rtp, encoding-name=H265, payload=96 ! rtph265depay ! h265parse ! queue ! avdec_h265 ! videoconvert ! fpsdisplaysink sync=false

and this command on Jetson TX2-4GB running L4T 32.4.4,

sudo gst-launch-1.0 v4l2src device=/dev/video0 ! videorate max-rate=50 ! videoconvert ! omxh265enc qp-range=30,50:30,50:30,50 control-rate=4 bitrate=3000000 ! "video/x-h265, stream-format=(string)byte-stream" ! rtph265pay mtu=1400 ! udpsink host=192.168.1.5 port=5700 sync=false async=false

nothing happens:

Jetson console output:

nvidia@localhost:~$ sudo ./gstr.sh
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Framerate set to : 50 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 8
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 8
NVMEDIA: H265 : Profile : 1

PC console output:

useraccount@dell:~$ sudo gst-launch-1.0 udpsrc port=5700 ! application/x-rtp, encoding-name=H265, payload=96 ! rtph265depay ! h265parse ! queue ! avdec_h265 ! videoconvert ! fpsdisplaysink sync=false
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock

Any suggestions? Is there any way to save raw video by using gstreamer? Thank you.

Hi,
Please refer to

Suggest you set width, height, framerate, fromat exactly fitting the mode listed in v4l2-ctl --list-formats-ext
Looks like your source is in BGRA format. It is not supported in nvvidconv plugins, so you would need videoconvert plugins:

v4l2src ! video/x-raw,format=BGRA,framerate=_FRATE_,width=_WIDTH_,height=_HEIGHT_ ! videoconvert ! video/x-raw,format=RGBA ! nvvidconv ! ...
1 Like

I managed to get stream by running these commans:

On Jetson:

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=BGRA, width=1280, height=720, framerate=50/1 ! videoconvert ! omxh265enc ! video/x-h265, profile=main, stream-format=byte-stream ! rtph265pay ! udpsink host=192.168.1.5 port=15001

On PC:

gst-launch-1.0 udpsrc port=15001 ! application/x-rtp, media=video, width=1280, height=720, framerate=25, encoding-name=H265, payload=96 ! rtpjitterbuffer latency=10 ! rtph265depay ! h265parse ! queue ! avdec_h265 ! xvimagesink sync=false

1 Like