Ask questions

Please, use the form below and we will get back to you as soon as posible. Thanks!

Submit a question

Thank you!

We will do our best to respond as quickly as possible.

Want to meet?

We're just a click away

Dobrin Trifonov

Sales Director

@dtrifonov

Gary Hamer

SVP Sales and Business Development

@ghamer

Sign up. To keep up

Make sure you receive our newsletter

Support

/ SmartMEDIA - Technical FAQ / How to assemble OTT multiscreen broadcasting with the Time Shift TV function based on the multicast

How to assemble OTT multiscreen broadcasting with the Time Shift TV function based on the multicast

For convenience, we have prepared a clear and simple example of how to assemble OTT multiscreen broadcasting in DASH and HLS formats with the function of Time Shift TV with the facility to play on different types of devices based on the multicast TS stream.

Before it you have to install trial version of SmartMEDIA - instruction.

If you have not any multicast TS streams, we suggest to make it by using ffmpeg. In our case we will use the TS-stream that is generated  from picture with superposed dynamic digital clocks.

 

Step 1: make multicast video stream and send it to the SmartMEDIA

1) take a Full HD picture (1920x1080). We might to download your favorite wallpaper here: http://www.planwallpaper.com/static/images/desktop-desktops-highway-night-photo-hdwallpapers2016com.jpg

 

2) chose font for digital clocks, e.g.: http://www.fontspace.com/style-7/digital-7, you should unpack it. We used “digital-7.ttf” font.

 

3) run ffmpeg with parameters:

ffmpeg -loop 1 -i desktop-desktops-highway-night-photo-hdwallpapers2016com.jpg -f lavfi -i "sine=frequency=1000:sample_rate=48000" -acodec aac -ac 1 -ar 48000 -ab 64k -vf "drawtext=digital-7.ttf:text='%{localtime\:%H-%M-%S}':fontcolor=white:shadowcolor=black:shadowx=2:fontsize=96:x=835:y=10" -vcodec libx264 -r 50 -s 720x576 -crf 18 -preset ultrafast -f mpegts "udp://@239.65.40.142:5001?pkt_size=1316&buffer_size=131070&reuse=1&ttl=10"

 

This command:

  • take “desktop-desktops-highway-night-photo-hdwallpapers2016com.jpg” as a source
  • overlay digital clock with current time in “HH:MM:SS” format to position 835:10 and 96 size
  • code h.264 720x576 stream with maximum code spead
  • make MPEGTS stream and send it to multicast address 239.65.40.142:5001

 

ffmpeg must be running without errors and show the coding progress, coding speed must be 1.00х or more. In case where coding speed less and CPU usage more than 100%, you should use more powerful PC for real-time coding.

When ffmpeg running without any errors, destination URL may be used as input URL for SmartMEDIA. In our example we use the IP-address (239.65.40.142:5001) that already set by default as an input address for channel “STREAM2” in the Trial SmartMEDIA. So it is not necessary to set up anything in a trial SmartMEDIA for set up input stream.

 

Step 2: playing streams on SmartMEDIA’s output

Trial SmartMEDIA is preseted for making output DASH and HLS streams by default.

 

For playing streams use URLs:

http://YOUR_IP_ADDRESS/hls/CH_TS_STREAM2/variant.m3u8 for HLS

http://YOUR_IP_ADDRESS/dash/CH_MP4_STREAM2/playlist.mpd  for DASH

Here YOUR_IP_ADDRESS - is an IP address of the SmartMEDIA

For playing streams with TSTV:
1) playing with offset: offset=-in second:

http://YOUR_IP_ADDRESS/hls/CH_TS_STREAM2/variant.m3u8?offset=-600 (offset = 10 minutes)

 

2) playing an interval: utcstart=offset_start&utcend=offset_end:

http://YOUR_IP_ADDRESS/hls/CH_TS_STREAM2/variant.m3u8?utcstart=1508426000&utcend=1508426700 (playing interval from oct_19 18:13:20 2017 to oct_19 18:25:00 2017

 

For playing video on different devices:

iOS: open HLS URLs in Safari

Android: use ExoPlayer for DASH and HLS

MacOS: open HLS URLs in Safari or QuickTime Player

Win PC, MacOS: use http://osmfhls.kutu.ru/  (it needs Flash)

 

There are a lot of players for HLS and DASH. It might be differences in DASH / HLS supporting or DRM supporting in different players. It is critical factor for commercial systems. Bear with us and we will talk about it in a next articles.

How do I get a trial license? How to assemble OTT multiscreen broadcasting with the Time Shift TV function based on the multicast Recommended hardware (HW) equipment