Gstreamer pipeline live streaming for low latency

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Gstreamer pipeline live streaming for low latency

1,638 Views
virti_choksi
Contributor III

Hello 

I want to stream a video over a network with low latency 

I am using the following:

1. Nitrogen6x board with i.MX6Dual Processor as server

2. x86 System as receiver with Ubuntu 18

3. UVC Camera connected to i.MX6Dual Processor

server GStreamer pipeline:

gst-launch-1.0 v4l2src ! videoconvert ! videoscale ! videorate ! "video/x-raw,width=720,height=576,format=I420,framerate=25/1" ! rtpvrawpay ! udpsink host=<Client IP address> port=5000 sync=false async=false

client GStreamer pipeline:

gst-launch-1.0 udpsrc buffer-size=622080 port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=YCbCr-4:2:0,depth=(string)8,width=(string)720, height=(string)576, payload=(int)96, a-framerate=25" ! rtpvrawdepay ! autovideosink window-width=720 window-height=576 sync=true

when I run this pipeline i'm unable to stream the video properly it is stucked with one frame and after few sec it shows another frame but instead it should show video continuously. 

In this case I tried following methods:

  1. I tried the same pipeline x86 system as sender and receiver both using loopback ip and it worked well 
  2. I also tried the same pipeline using two x86 system it worked well .
  3. but when i use the above pipeline for i.MX6 Dual processor as sender and x86 system as receiver it is stucked at the first frame.

I have also tried another pipeline 

server GStreamer pipeline:

gst-launch-1.0 v4l2src ! videoconvert ! videoscale ! videorate ! "video/x-raw,width=720,height=576,format=I420,framerate=25/1" ! x264enc ! rtph264pay ! udpsink host=<Client ip address > port=5000 sync=false async=false

client GStreamer pipeline:

gst-launch-1.0 -v udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! autovideosink sync=false

OR

gst-launch-1.0 udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! vaapih264dec ! decodebin ! videoconvert ! autovideosink sync=false

In this case I tried following method:

  1. I tried the same pipeline x86 system as sender and receiver both using loopback ip and it worked well but video was delayed by few seconds 
  2. I also tried the same pipeline using two x86 system it worked well but video was delayed by few seconds 
  3. But when i use the above pipeline for i.MX6 Dual processor as sender and x86 system as receiver it is stucked at the first frame.

So how can I acheive continuous streaming with low latency ?

Labels (2)
0 Kudos
1 Reply

1,539 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @virti_choksi 

I hope you are doing well.
 
Please use imxv4l2src video source plug-in for i.MX6 Processor Family.
 
Please refer to chapter-7 Multimedia and 7.3.10 Web camera in i.MX Linux User's Guide for video streaming.
 
Please refer to 7.1 i.MX GStreamer plugins in i.MX Linux Release Notes for platform-specific gstreamer plugins.
 
Thanks & Regards,
Sanket Parekh
0 Kudos