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

local API: Support Post Live DVR videos #3872

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

absidue
Copy link
Member

@absidue absidue commented Aug 11, 2023

local API: Support Post Live DVR videos

Pull Request Type

  • Feature Implementation

Related issue

closes #3582

Description

Just after a live stream has ended, before it has been processed into a normal video, it is still in the live stream format of self intialising DASH segments. YouTube uses self-initialising segments for their live stream DASH, which is in the DASH spec but highly discouraged by the interoperability guidelines, so video.js doesn't support them. That's why we can't use DASH for the live streams but also means we can't use it for videos in the Post Live DVR state, instead we can treat them like currently live streams and use the provided HLS manifest.

This pull request only adds support for the local API, as Invidious doesn't tell us when a video has the isPostLiveDvr flag set.

Testing

As you might be testing this days or weeks later, any Post Live DVR videos I would link to, would have been processed into normal videos by then. Instead I made a script that will find a video in the Post Live DVR state for you, so you can test this pull request, without having to find one yourself.

  1. Download this script find-post-live-dvr.txt
  2. Change the extension to .mjs
  3. Place in your FreeTube dev directory (it uses YouTube.js, so placing it there means you don't have to install YouTube.js separately)
  4. Run it with node find-post-live-dvr.mjs
  5. It will print out the first Post Live DVR video it finds in the "Recent Live Streams" section on https://youtube.com/live, it tries various geolocations until it finds one, although in my testing it usually already found one in the first or second geolocation it tries.

Try watching the video with the local API, you should be able watch and seek around, compared to previously where it would either load endlessly or show a player UI that is ended but doesn't allow you to seek back so you could watch anything.

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 11, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) August 11, 2023 16:07
Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
image

@PikachuEXE
Copy link
Collaborator

@FreeTubeBot FreeTubeBot merged commit cb3a1bd into FreeTubeApp:development Aug 14, 2023
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 14, 2023
@absidue absidue deleted the local-post-live-dvr branch August 14, 2023 16:51
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Aug 15, 2023
* feature/playlist-2023-05: (36 commits)
  ! Fix default playlists added when no playlist stored had no required attributes added on 1st run
  Translated using Weblate (Ukrainian)
  Translated using Weblate (Czech)
  Translated using Weblate (Hungarian)
  Translated using Weblate (Estonian)
  Translated using Weblate (Chinese (Simplified))
  Translated using Weblate (Turkish)
  Translated using Weblate (Arabic)
  local API: Support Post Live DVR videos (FreeTubeApp#3872)
  Make profiles keyboard accessible (FreeTubeApp#3863)
  Bump @babel/preset-env from 7.22.9 to 7.22.10 (FreeTubeApp#3882)
  Bump @babel/eslint-parser from 7.22.9 to 7.22.10 (FreeTubeApp#3880)
  Bump eslint-plugin-vuejs-accessibility from 2.1.0 to 2.2.0 (FreeTubeApp#3883)
  Bump marked from 7.0.0 to 7.0.2 (FreeTubeApp#3881)
  Bump eslint-plugin-vue from 9.16.1 to 9.17.0 (FreeTubeApp#3879)
  Bump @babel/core from 7.22.9 to 7.22.10 (FreeTubeApp#3877)
  Bump stylelint-high-performance-animation from 1.8.0 to 1.9.0 (FreeTubeApp#3878)
  Bump sass from 1.64.2 to 1.65.1 (FreeTubeApp#3876)
  Bump eslint from 8.46.0 to 8.47.0 (FreeTubeApp#3875)
  Translated using Weblate (Italian)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Recently aired live video is not played because of - reading 'length'
5 participants