>>107132108
below info assumes hls/m3u8 playlists, and assumes --live-from-start gives you access to a full HLS playlist. i'm not sure about the latter.
----
use a stream grabber with such features (can't help with specifics here). or if it's a one time thing, download the playlist itself, edit it to cut/remove the segments you don't want, and use the playlist as a local file directly, or as a file:// url (depending) on client support.
youtube playlists have full urls in their segment entries. so this theoretically should just work.
if you know how to script, you can also grab a playlist (without trying from the start). and experiment with generating a playlist yourself.
For example, if a grabbed playlist has a last segment entry that looks like this:
.../playlist/index.m3u8/sq/<segment_id>/goap/.../dur/<segment_duration>/file/seg.ts
<segment_id> is a segment sequential number.
<segment_duration> is segment duration in seconds.
so for example, if segment_id is 573000 and segment duration is 5.0. then 572000 is the segment id from 5000 seconds ago.
so you can try to generate a playlist yourself with the hls header (all lines before segment entries).
then:
#EXTINF:5.0,
.../playlist/index.m3u8/sq/572000/goap/.../dur/5.0/file/seg.ts
#EXTINF:5.0,
.../playlist/index.m3u8/sq/572001/goap/.../dur/5.0/file/seg.ts
.
.
.
#EXTINF:5.0,
.../playlist/index.m3u8/sq/572999/goap/.../dur/5.0/file/seg.ts
#EXTINF:5.0,
.../playlist/index.m3u8/sq/572999/goap/.../dur/5.0/file/seg.ts
#EXTINF:5.0,
.../playlist/index.m3u8/sq/573000/goap/.../dur/5.0/file/seg.ts
end the playlist with:
#EXT-X-ENDLIST
to signal to the client that you're done. or keep appending new segment entries to the playlist to simulate live updates..BUT..
i don't know specifics, but i think there are both client and server session limits, so it's not easy to guess how far back you can go, and for how long you can manually append the playlist, with this trivial method.