invidious icon indicating copy to clipboard operation
invidious copied to clipboard

[Enhancement] Support Post Live DVR streams

Open absidue opened this issue 1 year ago • 0 comments

Is your enhancement request related to a problem? Please describe.

YouTube currently has 3 kinds of streams (they seem to have got rid of OTF):

  • VOD (normal videos)
  • Live (live streams that are currently live)
  • Post Live DVR (ended live streams that haven't been reprocessed into VOD yet)

Invidious only supports the first two at the moment, Post Live DVR videos fail to play and aren't easily identifiable via the API.

Describe the solution you'd like

Invidious should treat Post Live DVR videos like live streams, that means using the HLS manifests and disabling downloading. On the API side it should pass through the isPostLiveDvr property that YouTube has in the videoDetails property in the /player response, similar to what happens with isLive -> liveNow.

Just like with live streams, Invidious itself cannot use DASH for Post Live DVR videos, as they use the same self-initialising segments that live streams do, that video.js doesn't support.

Describe alternatives you've considered

FreeTube could try to detect Post Live DVR streams by doing something like !liveNow && typeof adaptiveFormats[0].targetDurationSec !== 'undefined' but it would be nice if we didn't have to resort to such potentially unreliable workarounds.

Additional context

absidue avatar Feb 07 '24 12:02 absidue