Pages

March 16, 2016

Time-shifted streaming with Nimble Streamer DVR

As you already know, live streaming features set of Nimble Streamer includes DVR - recording and playback capabilities for live streams. It takes RTMP, RTSP, MPEG-TS, Icecast or SHOUTcast as input and gives HLS and MPEG-DASH as output.

The recording setup is easy and it's described in this article.

The playback is also simple and you can just modify usual playback URL to get recorded stream.
E.g. if your stream has this URL
http://192.168.0.1:8081/live/music/playlist.m3u8
then your playback URL for DVR is
http://192.168.0.1:8081/live/music/playlist_dvr.m3u8
You may also modify URL to access certain time range like this:
http://192.168.0.1:8081/live/music/playlist_dvr_range-1447069728-120.m3u8
where you set the start time and duration.

The URLs above will work for default MPEG2TS container. If you'd like use fMP4 container for DVR playback, you'll need to use "fmp4" suffix like this:
http://192.168.0.1:8081/live/music/playlist_fmp4_dvr_range-1447069728-120.m3u8
Adding that suffix will create DVR stream with fMP4 container.
Both MPEG2TS and fMP4 DVR streams can be played simultaneously. So you can provide your users with appropriate URLs depending on their device type.

Timeshift


Now, in addition to time range, we introduce time-shifted playback.
Timeshift allows streaming recorded content from selected time spot and allows setting the maximum depth of selection.
Common format is as follows:
http://192.168.0.1:8081/live/music/playlist_dvr_timeshift-<shift>-<depth>.m3u8
Where shift is a value of time shift in seconds and depth is an optional parameter setting possible length which a viewer can rewind.
A few examples are provided below.

Thus shifts time to 1 hour and allows 1 minute frame for rewind:
http://192.168.0.1:8081/live/music/playlist_dvr_timeshift-3600-60.m3u8
This shifts to 2 hours and give 2 minutes frame:
http://192.168.0.1:8081/live/music/playlist_dvr_timeshift-7200-120.m3u8
And this shifts playback by 7 hours:
http://192.168.0.1:8081/live/music/playlist_dvr_timeshift-25200.m3u8

Just as in previous case of time range, if you'd like to use fMP4 container, your URL would have "fmp4" particle, like this:
http://192.168.0.1:8081/live/music/playlist_fmp4_dvr_timeshift-7200-120.m3u8
It ill also work along with default MPEG2TS container.

Thumbnails


You may also use specific URL to get thumbnails for DVR stream.


Take a look at this video tutorial to get familiar with DVR most useful features.


Read other documentation articles for more details and full description of available options.

Also notice that HLS DVR streams can be added to SLDP HTML5 Player for rewinding low latency streams. Read this article for details.

If you have any feedback or questions about DVR, just let us know about it.

2 comments:

  1. if i wanted to play the dvr recording from start-time+1 hour - how will that be specified where actual start-time is not known but i want to play the recording from 1 hour the time it started recording?

    ReplyDelete
    Replies
    1. Nimble does not allow to use such an offset (1 hour from time when recording started), you need to know absolute time of the fragment and use it with range EPG request (http://blog.wmspanel.com/2015/11/dvr-time-range-fragments-epg.html). Technically you can get recording start time using /manage/dvr_status Nimble API and calculate the time that should be used with range.

      Thank you.

      Delete

If you face any specific issue or want to ask some question to our team,
PLEASE USE OUR HELPDESK

This will give much faster and precise response.
Thank you.

Note: Only a member of this blog may post a comment.