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 move fast forward.
A few examples are provided below.
http://192.168.0.1:8081/live/music/playlist_dvr_timeshift-3600-60.m3u8
shifts time to 1 hour and allows 1 minute frame for fast forward
http://192.168.0.1:8081/live/music/playlist_dvr_timeshift-7200-120.m3u8
shifts to 2 hours and give 2 minutes frame
http://192.168.0.1:8081/live/music/playlist_dvr_timeshift-25200.m3u8
shifts playback by 7 hours.

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.



We plan improving this functionality so let us know of your feedback, we appreciate that.


Related documentation


DVR timeline browsing and playbackDVR feature setNimble Streamer, Live streaming, Time-range fragments for EPG, fMP4 container for HEVC and AVC DVR

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