I am working on a project that uses gstreamer with opencv, a simple code that aims to capture the image from a camera and stream out using ethernet ports of jetson nano. Normally I did manage to make the image very clear, smooth, high quality and has very low latency and do not freeze while streaming out. But I did this on a setup that has an ethernet cable between jetson nano where I stream out the image and the platform where I display the image. Up until here I have no problem. But we are using this system with datalinks. So instead of over ethernet cable, system communicates wirelessly. Here occurs the problem. On this setup, live stream freezes a lot so I cant display the image the way I want. I am kinda sure that this problem is caused by my pipelines. Because when I use this exact setup without nano just the camera and datalinks it works fine. But when jetson nano insterted between the camera and the links live stream freezes. I am using:
pipeCam = 'rtspsrc location=rtsp://<ip> latency=1 ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! videoscale ! video/x-raw,width=1280,height=720 ! appsink'
this pipeline for capturing from the camera. And
pipeOut3 = 'appsrc ! video/x-raw, format=BGR ! videoconvert ! omxh264enc ! h264parse config-interval=1 ! rtph264pay pt=96 ! udpsink host=<ip> port=50001 sync=false'
this pipeline for stream out.
pipeOut2='appsrc ! video/x-raw, format=BGR ! videoconvert ! omxh264enc cabac-entropy-coding=true bitrate=2000000 peak-bitrate=2000000 ! h264parse config-interval=1 ! rtph264pay pt=96 ! udpsink host=10.224.10.255 port=50001 sync=false'
And also when I use this pipeline with
cabac-entropy-coding=true bitrate=2000000 peak-bitrate=2000000 added to pipeline above that one, there happens pixelization when moving the camera.
gst-launch-1.0 udpsrc port=50001 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! queue ! avdec_h264 ! d3dvideosink sync=false
I am using this pipeline for displaying the image that is streaming out from jetson nano.
Lastly I observed that when camera is not moving the stream looks fine. But in our system camera is on a very moving platform so I suppose maybe this problem occurs when camera moves.
I am newbie about all that and I am trying to learn gstreamer. So I could not find a solution for that. I would be glad if someone helps me for that.