ts streaming over rtp using gstreamer

Lijo Jose
1 min readMay 26, 2019

--

We have different solutions available for streaming mpeg2ts content over rtp.

  • vlc player
  • ffmpeg
  • gstreamer

gstreamer provides different plugins for rtp solutions. To name a few:

gstreamer provides lots of configurability with rtp streaming. Here is an example in which, input ts file is streamed realtime to another gstreamer pipeline. On the receiver side the content is written to an output file.

Sender

gst-launch-1.0 filesrc location=”./in.ts” ! queue ! tsparse set-timestamps=true ! rtpmp2tpay ! .send_rtp_sink_0 rtpbin ! udpsink host=localhost port=3000

Sender pipeline

Receiver

gst-launch-1.0 udpsrc port=3000 caps=”application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)MP2T” ! .recv_rtp_sink_0 rtpbin ! rtpmp2tdepay ! filesink location=”./out.ts

Receiver pipeline

--

--