-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Local API: Implement SABR for VODs #7145
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
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
Got some different error handling loop with this branch |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Got error in https://youtu.be/CVlDP0uNDiE (not sure if dev got the same |
@PikachuEXE Did you get the invalid int32 error on the latest commit on this branch? If not it was likely already solved by 89bd0c8 |
As for the error in this comment (#7145 (comment)), please expand the shaka-player data array and the FreeTube data objects before taking a screenshot. HTTP_ERROR is a wrapper, so without the details of what the actual error was, all I know is that there was an error. |
A new one with |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This comment has been minimized.
This comment has been minimized.
This comment was marked as off-topic.
This comment was marked as off-topic.
Locking for the moment to limit the conversation to maintainers, to avoid off-topic comments like the one with screenshots that have nothing to do with this pull request. |
Duration of the video is 3:11 but it randomly stopped at 3:10 this is the second time i noticed that the video pauses 1 sec before ending on the most recent commit vlc_8MSQFiBw8f.mp4Error: vlc_Ua5JuznOmN.mp4 |
Looks like it's the same issue as @efb4f5ff-1298-471a-8973-3d47447115dc's second video, the |
I still got missing MEDIA_END |
I found that with this video (but could be current time related, no VPN though) I can reproduce Let me see if I can reproduce this tomorrow and can add some debugging code |
With https://youtu.be/9hDvWVJtljE I can reproduce the issue again (near the end of video Before loading the end Update 1: Researching https://github.com/shaka-project/shaka-player/blob/v4.14.10/lib/media/segment_index.js#L146 |
I will apply the following patch and see how it works Update 1: Never got int32 again so far but still got empty response In this issue parts are always |
Local API: Implement SABR for VODs
Pull Request Type
Description
Opening as a draft because when it works it works well but when it doesn't it currently errors with errors that I haven't been able to figure out how to resolve...
This pull request implements support for SABR playback with the local API for VODs, for live streams and post-live DVRs we use the manifests provided by YouTube. This also includes some code copied and adapted from shaka-player as they didn't export the MP4 and WebM segment index parsers outside of the package and I needed to make some changes to them.
Massive thanks to @LuanRT for being there for my silly questions about SABR and helping me debug and optimise this implemenation of it.
You will probably notice various
/** @__NOINLINE__ */
comments dotted around the code in this pull request, I added those because I noticed that instead of properly inlining some of the functions or leaving them where they were, terser was inlining them as IIFEs, which means that instead of calling the function each time it was called, it would recreate the function first and then immediately call it, which is not ideal as this code is already adding more overhead to each segment fetch that shaka-player does. The/** @__NOINLINE__ */
comments tell terser to not even attempt to inline those function calls even if it thinks it is possible.To give you an idea of what that dodgy function inlining looks like, here is a simplified example (you can see how recreating the function on each iteration of the for loop is not great):
Testing
Please try various videos and check that they play correctly in both DASH and audio modes.
Additionally to check that I didn't break things please also test some live streams and the legacy formats.
Desktop