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

[BUG] Can't Rewind or Pause LIVE videos #261

Open
Neipas09 opened this issue Jan 11, 2024 · 4 comments
Open

[BUG] Can't Rewind or Pause LIVE videos #261

Neipas09 opened this issue Jan 11, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Neipas09
Copy link

On the official YT app, i can rewind LIVE streams back to the beginning, and I can pause the video and resume it from the point i pause.
But on your app i can't do either.
In fact, no progress bar shows up at all for LIVE streams.

@iBicha iBicha added the enhancement New feature or request label Jan 11, 2024
@iBicha
Copy link
Owner

iBicha commented Jan 11, 2024

This is going to take a while to figure out, but I'll just leave notes for myself later:
Innertube returns HLS manifests with different durations based on client type:

  • Web: 30 seconds
  • Android: 30 seconds
  • iOS: 1 hour
  • TV_EMBEDDED (TVHTML5_SIMPLY_EMBEDDED_PLAYER): 4 hours

Invidious will return web by default, unless it fails, then it tries something else.

The official youtube app should be a TVHTML5.
The official app might be using DASH, but DASH manifests for live are gigantic and Roku fails to parse them. Using this trick https://github.com/iv-org/invidious/pull/4196/files to reduce the size of the manifest, still won't play it for some reason.

@absidue
Copy link

absidue commented Feb 20, 2024

@iBicha There are multiple reasons that it could be failing to play the live stream DASH, here are two potential ones:

  1. If you are attempting to proxy it through Invidious, you'll run into playback issues. Invidious' video proxy doesn't support live DASH, they already know about the problem (I reached out to them about it because of FreeTube), although it is probably a low-priority issue for them, as Invidious itself cannot use DASH for live streams, see point 2
  2. YouTube's DASH live streams use so called self-initialising segments, which are discouraged by the DASH interoperability guidelines and therefore not supported in all players. shaka-player supports them, video.js, the player than both Invidious and FreeTube currently use, doesn't. You will need to check if Roku's player supports self-initialising segments, otherwise you will have to stick to HLS for the livestreams.

@iBicha
Copy link
Owner

iBicha commented Feb 21, 2024

Thanks @absidue, after many attempts, I realized my only option is HLS.
Although I sifted through the Roku Support https://developer.roku.com/en-ca/docs/specs/media/dash-if.md I can't pinpoint why the live DASH is not working.
Also in their guide https://developer.roku.com/en-ca/docs/developer-program/media-playback/trick-mode/hls-and-dash.md they only mention HLS with live streaming.
So perhaps in this case is to have the API return the HLS from the iOS client, and that would give us an hour, maybe?

@iBicha
Copy link
Owner

iBicha commented Feb 21, 2024

I just made a change to Invidious locally to get YoutubeAPI::ClientType::IOS streaming data instead of Android, and Roku seems to take the stream fine. Two weird things

  • The video starts at the beginning at the live stream (perhaps I need to point it at the end of stream myself)
  • I'm only getting 15 minutes back on one stream, but I got an hour on the other

It's a start, but this needs to be exposed in the Invidious API somehow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants