Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APPLICATION: Support timeshift over DVR. #753

Closed
mort1k opened this issue Jan 23, 2017 · 14 comments
Closed

APPLICATION: Support timeshift over DVR. #753

mort1k opened this issue Jan 23, 2017 · 14 comments
Assignees
Labels
EnglishNative This issue is conveyed exclusively in English. Won't fix We won't fix it.
Milestone

Comments

@mort1k
Copy link

mort1k commented Jan 23, 2017

Hi, tell please there are plans to add access to dvr via hls.
For example dvr can optionaly save segments into .ts files or it's can also operate with option hls_cleanup off; and hls generate the correct playlist m3u8 with offset or range of time something like:

   live/stream/dvr_offset_[timestamp].m3u8
   live/stream/dvr_range_[timestamp]-[length-sec].m3u8

hls_cleanup option can be set to: on, offset to clear in minutes.

it would be very useful option for distribute live content via hls/dash and in some cases, but perhaps this is at odds with your standpoint.

@winlinvip winlinvip added this to the srs 3.0 release milestone Jan 24, 2017
@winlinvip
Copy link
Member

winlinvip commented Jan 24, 2017

Please never describe how to implements the feature, instead please describe what's the use scenario. Why record to hls? What's your business? What's your use scenario?

@mort1k
Copy link
Author

mort1k commented Jan 24, 2017

Sorry, I made a note that it may deviate from your vision. :)
I tried to read #174, but it is very difficult to translate from Chinese into Russian with the impurities of the English, I think the meaning is that things distorted. Scenario simple:
how to cache response from dvr archive if used frequently with random timestamp access?

@winlinvip
Copy link
Member

The issue #174 is not dvr to mp4. It's http-mp4 streaming, similar to http-flv streaming, or like the rtmp stream.
I still don't understand your scenario, can you show a example please? For example, a client how to access your DVR file?

@mort1k
Copy link
Author

mort1k commented Jan 24, 2017

Example, clients with iptv consoles looking live hls streams from cache servers, which give streams from origin. Client can request via that caches random timestamp in past (timeshift).

                                (cache .ts) 
                                     |                     +--live 
stream -rtmp>[origin]<--hls-->[cache(edge) server]<--hls---+--timeshift (?timeshift=nnnn)
                |                                          +--catchup (?start=yyyymmddhhmmss&end=yyyymmddhhmmss)
             dvr (persistent .ts)

When used in this case flv-,mp4- streaming, it difficult effectively to cache.

@mort1k mort1k changed the title [feature] dvr via hls access to dvr via hls Jan 24, 2017
@mort1k mort1k changed the title access to dvr via hls Access to dvr via hls Jan 24, 2017
@mort1k mort1k changed the title Access to dvr via hls Dvr to hls Jan 24, 2017
@mort1k mort1k changed the title Dvr to hls DVR to hls Jan 24, 2017
@mort1k mort1k changed the title DVR to hls Request: DVR to hls Jan 24, 2017
@mort1k mort1k changed the title Request: DVR to hls DVR to hls Jan 24, 2017
@mort1k
Copy link
Author

mort1k commented Jan 24, 2017

on the basis of the translation is a similar question: #466?

@winlinvip
Copy link
Member

Nop. The issue #466 is HLS edge server, which is also a live stream edge.

@mort1k
Copy link
Author

mort1k commented Jan 26, 2017

Hi, advise how to differently look at my case:

Example, clients with iptv consoles looking live hls streams from cache servers, which give streams from origin. Client can request via that caches random timestamp in past (timeshift).

                                (cache .ts) 
                                     |                     +--live 
stream -rtmp>[origin]<--hls-->[cache(edge) server]<--hls---+--timeshift (?timeshift=nnnn)
                |                                          +--catchup (?start=yyyymmddhhmmss&end=yyyymmddhhmmss)
             dvr (persistent .ts)

When used in this case flv-,mp4- streaming, it difficult effectively used with cache.

@winlinvip
Copy link
Member

winlinvip commented Jan 27, 2017

So, do you want the timeshift, for example, the player can play:

  1. The url rtmp://ip/app/stream is for live stream, and server will feed the latest A/V packets to it.
  2. The url rtmp://ip/app/stream?start=300 for timeshift, and server will shift the start point from 300s ago?
  3. The url rtmp://ip/app/stream?start=300,end=600 for timeshift, and server will feed [-600s, -300s] content?

I think this example cover your scenario, right?

@winlinvip winlinvip changed the title DVR to hls Support timeshift over DVR. Jan 27, 2017
@mort1k
Copy link
Author

mort1k commented Jan 27, 2017

For rtmp right, but we used hls for deliver stream.
In the third example, specify the start timestamp and the desired length of the content or start timestamp and end timestamp, not offset from start and end.

@winlinvip
Copy link
Member

winlinvip commented Jan 27, 2017

Whatever the stream protocol, both rtmp and hls are ok for timeshift. For HLS, the timeshift maybe:

  1. The url http://ip/app/stream.m3u8 is for live stream, and server will feed the latest A/V packets to it.
  2. The url http://ip/app/stream.m3u8?start=300 for timeshift, and server will shift the start point from 300s ago?
  3. The url http://ip/app/stream.m3u8?start=300,end=600 for timeshift, and server will feed [-600s, -300s] content?

It's timeshift.

@winlinvip
Copy link
Member

The timeshift is not live, because the kernel use scenario is different. So, it's very bad design to use live cluster to provide timeshift service. Instead, we must use DVR or VOD system to provide timeshift. For example, the live cluster delivery live streaming and send the live A/V stream to DVR system, the DVR will record to file(whatever flv, mp4 or hls), and the VOD system can support timeshift.

@mort1k
Copy link
Author

mort1k commented Jan 27, 2017

Option 3 used for EPG entry with fixed constaint timestamp and duration in the past:
3. http://ip/app/stream.m3u8?start_timestamp=1485502931&duration=300
3. http://ip/app/stream.m3u8?start_timestamp=1485502931&end_timestamp=1485512931

@winlinvip winlinvip changed the title Support timeshift over DVR. APPLICATION: Support timeshift over DVR. Mar 26, 2017
@winlinvip
Copy link
Member

I think it's better solution to support shift by HLS. Recommend to use the on_hls callback, to notify the HLS events to the external time-shift system.

@winlinvip
Copy link
Member

winlinvip commented Sep 18, 2021

Will not support time shift function.

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Sep 18, 2021
@winlinvip winlinvip added the Won't fix We won't fix it. label Sep 18, 2021
@winlinvip winlinvip added TransByAI Translated by AI/GPT. EnglishNative This issue is conveyed exclusively in English. and removed TransByAI Translated by AI/GPT. labels Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English. Won't fix We won't fix it.
Projects
None yet
Development

No branches or pull requests

2 participants