SRT, typical examples

Posted on 20/02/2018 by Justin Kim

Following last week's blog post announcing SRT in GStreamer, I'd like to briefly discuss another way to use an SRT stream: with VLC 3.0!

Released earlier this month, the latest version of the free & open source multimedia player (which also uses the GStreamer framework) now contains SRT modules which had been in development in VLC's master branch. Let's take a look at what VLC says.

$ vlc --list | grep srt
VLC media player 3.0.0 Vetinari (revision 3.0.0-3-g7821ebf808)
  access_output_srt      SRT stream output
  access_srt             SRT input

These modules can be seen in VLC’s preferences menu if “Show All” is checked in the preferences window.

SRT in VLC's preference menu

As we can infer from the name, VLC has input/output SRT modules. The basic usage isn’t different from the case when using UDP or TCP-based stream. From Olivier's article, we got a typical example to stream via SRT, then let's create SRT stream.

gst-launch-1.0 v4l2src ! video/x-raw, height=1080, width=1920 \
    ! videoconvert ! x264enc tune=zerolatency ! video/x-h264, profile=high \
    ! mpegtsmux ! srtserversink uri=srt://:8888/

Then, now, VLC can play the SRT stream with the URL, "srt://ip_address:8888/".

SRT in VLC screenshot


Yes, The current SRT modules in VLC is able to work as an SRT player and an SRT stream generator. However, there are some limitations because VLC released version took a part of SRT module patch set.

Stream Encryption

To encrypt and decrypt SRT stream, a passphrase is required. The passphrase property patches have already been merged into VLC master, but not yet released. We are looking forward that next version of VLC has this feature.

Connection modes

We have created 4 different elements for GStreamer, but the current VLC modules only support client mode. That means the current version of VLC can play only if an SRT stream generator runs in listener(server) mode. Supporting all modes in SRT modules of VLC would be next challenge for us.


Hopefully, SRT modules in VLC, also GStreamer SRT plugins will have helped you to build SRT applications. Let's discuss the details of SRT with VLC and GStreamer!

Visit Justin's blog.

Comments (10)

  1. svy:
    Mar 27, 2018 at 02:26 PM

    Hey, has SRT access module been removed? Its not showing in the Windows version of v3.0

    Reply to this comment

    Reply to this comment

    1. Olivier Crête:
      Mar 27, 2018 at 06:39 PM

      I don't think it's in the Windows build yet, we're actively working on finalizing the Windows integration. There is a problem with the poll/select integration and Windows.

      Reply to this comment

      Reply to this comment

        1. Hi-Angel:
          Mar 31, 2018 at 12:31 PM

          I'm pretty sure poll() is implemented on Windows with WSL. I imagine you gotta find the dll that provides the function, and use it.

          You can list dll exports on Windows with "rabin2 -s some.dll" (from Radare — a FOSS reverse-engineering framework).

          Reply to this comment

          Reply to this comment

        2. Justin Kim:
          Apr 02, 2018 at 12:11 AM

          SRT for windows has been merged into upstream.
          The modules are ready to run in VLC 4.0.0 nightly build. :)

          Reply to this comment

          Reply to this comment

  2. Tony:
    May 12, 2018 at 05:43 AM

    Do you know if SRT will be merged into the ios and Android versions?

    Reply to this comment

    Reply to this comment

    1. Olivier Crête:
      May 14, 2018 at 03:17 PM

      Android definitely, I tried just enabling it and it works, so someone just needs to submit the patch.

      Reply to this comment

      Reply to this comment

      1. rajesh:
        May 22, 2018 at 12:56 PM

        I have found SRT Pipeline examples for Linux platform and they are working.

        I would like to try out on Android, May i know is there any srtserversink, srtclientsrc examples pipeline for android platform ?

        Reply to this comment

        Reply to this comment

        1. Olivier Crête:
          May 22, 2018 at 04:55 PM

          With GStreamer, the pipeline should be the same on all platforms, except for the audio and video video sinks and sources which are specific to a platform.

          Reply to this comment

          Reply to this comment

          1. rajesh:
            May 23, 2018 at 01:38 PM

            i have tried srtserversink with udpsrc and its working as like below.

            gst-launch-1.0 -v udpsrc port=9001 ! rndbuffersize max=1316 min=1316 ! srtserversink

            gst-launch-1.0 -v srtclientsrc uri="srt://" ! udpsink host= port= 7010

            ffmpeg -re -i output.ts -c:v copy -c:a copy -f mpegts udp://

            ffplay udp://

            But when i tried with filesrc or videotestsrc, its not working as follows.

            how to create pipeline srtserversink with filesrc or videotestsrc?

            is srt supports filesrc instead of udp ?
            if yes, could you give me working pipeline with filesrc?

            Reply to this comment

            Reply to this comment

Add a Comment

Allowed tags: <b><i><br>Add a new comment:

Latest Blog Posts

GStreamer CI support for embedded devices


Embedded devices are a popular deployment target for GStreamer yet they are not tested on the project's Continuous Integration (CI) system.…

Happy 20th, Open Source


In late January 1998, Netscape surprised everyone by releasing the source for Communicator, its web browser, making it readily available…

Four open months at Collabora


At the start of 2018 in January, I joined Collabora, an open source software consultancy, as a Software Engineer Intern with the Multimedia…

GStreamer spring in Sweden


Earlier this month, Olivier Crête, Nicolas Dufresne, George Kiagiadakis & I attended the GStreamer Spring Hackfest in Lund, Sweden. Hosted…

GPU virtualization update


A few months ago, Robert Foss wrote a blog post about virtualizing GPU Access. Here's a look at some of the major improvements that have…

GStreamer Spring Hackfest


Generously hosted by Axis in the beautiful Lund, Sweden, the annual spring hackfest is an occasion for the community to get together to…

Open Since 2005

We use cookies on this website to ensure that you get the best experience. By continuing to use this website you are consenting to the use of these cookies. To find out more please follow this link.

Collabora Ltd © 2005-2018. All rights reserved. Website sitemap.