Monday, February 19, 2018

SRT, typical examples

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.

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/".



Limitations

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.

Conclusion

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!