-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add support for delivery methods other than progressive HTTP (in the player only) #6537
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1735d2e
to
a4d5758
Compare
This comment has been minimized.
This comment has been minimized.
This breaks PeerTube playback completely. All videos show the "Could not play this stream" toast. |
How is this implemented? Does it look for progressive streams first? Then DASH if those aren't available? For videos where only one or two progressive streams are available, like 720p and 360p MP4, does it replace those resolutions with their DASH versions as well? |
The app tries to play torrent streams. I will investigate why.
A DASH manifest is only returned by YouTube when OTF streams are present.
Only for the 1080p30/60 stream (and the 720p30 stream for cipher protected URLs). Other streams will use DASH versions. |
Still, does this PR prefer DASH or progressive? Or are progressive streams absent when OTF ones are present for all Youtube videos?
So do you try to replace all streams with DASH versions and only show progressive ones where DASH streams aren't available? |
I didn't change anything about the current implementation in the app but I think I need to, because NewPipe wants to play torrent streams first instead of progressive streams. |
Oh, I'm asking specifically in the context of Youtube. |
Yes, I know but I don't know right now how the app manages which streams are chosen among the streams returned by the extractor. |
2ab85d9
to
827276e
Compare
d96dfa6
to
f5d513c
Compare
This comment has been minimized.
This comment has been minimized.
4144f90
to
950f8c0
Compare
f8a9dbe
to
8595125
Compare
@opusforlife2 Can you confirm that PeerTube streams are playable for you and that for the streams that have only HLS variants, you can download these streams and seek properly within them? |
@TiA4f8R Finally! Yes, PeerTube streams are playable, and seeking works perfectly well within them. Downloading them works fine (apart from the "some streams hidden" toast), but seeking within the downloaded streams doesn't. It varies from app to app, actually:
|
@kapodamy! We need your help! |
someone pls link the apk or the downloaded stream |
@opusforlife2 Please answer with a link of an HLS-only stream on which you have this issue. |
…on an external player
…some toasts and the AlertDialog to open external video players. Fix the crash when pressing the Background option on ended livestreams for external players: add a relevant toast when pressing the background option on VideoDetailFragement. Add different toasts when no audio/video streams for external players are available (when using this option from RouterActivity). Add a title of the AlertDialog used to play on external players in VideoDetailFragment and a message when there are no video streams available for external players.
…ethod The two methods were always used at the same time so merging these methods increases code readability and reduces code size. Also prevent a new NullPointerException in NavigationHelper.
Rename checkIfWasSomeStreamedRemoved method to checkIfSomeStreamWasRemoved. Make wrappedAudioStreams, wrappedVideoStreams and wrappedSubtitleStreams public to be able to use DownloadDialog.newInstance(Context, StreamInfo) Use DownloadDialog.newInstance(Context, StreamInfo) instead of DownloadDialog.newInstance(StreamInfo) in RouterActivity Prevent some NullPointerExceptions in DownloadDialog Remove removeTorrentAndNonUrlStreams method in PlaybackResolver interface and use the corresponding method in ListHelper in VideoPlaybackResolver Split buildMediaSource method into five methods Invert the if "!sortedVideoStreams.isEmpty()" in VideoDetailFragment
Update the corresponding usage.
Readd the id of the threads LinearLayout (threads_layout)
Use instanceof instead of comparing classes with class fields and getClass method Apply Android Studio suggestions in MissionRecoveryInfo Fix a potential issue with the cache key given by PlayerHelper when there are different streams with an unknown resolution or with an unknown average bitrate Add two new strings: unknown_format and unknown_quality, translated in French
Remove an unused constructor and an useless boolean check Add some JavaDocs Reformat some lines of code
…an unknown format
…ream or a post live stream
…r.checkIfSomeStreamWasRemoved There isn't an other way to compare if the number of downloadable streams is the same that the number of streams without introducing more complexity to the method. So the CheckStyle warning can be supressed.
This may help us to debug some issues which may happen when trying to play a stream.
…ate and remove some old code in PlayerDataSource The LoadErrorHandlingPolicy was set with an very big retry amount (Integer.MAX_VALUE), which makes no sense so it was removed, like the minimum manifest retry when an error occurs in live media sources (the value used is now the default of ExoPlayer).
Provide the duration of the video played to YoutubeDashManifestCreator, which is now required in order to generate manifests of OTF, progressive and post live DVR streams.
… dialog when rotating device Previously, the Some streams were hidden message disappeared when rotating device and when the dialog was open. With this commit, that's not the case anymore. Also migrate the TextView of this message to our custom TextView.
Reformat some code in DownloadDialog and ListHelper, fix a string capitalization and always show the streams removed message. Improve some performance with the download dialog by changing the way of how non-supported streams are removed.
…ator The limit is set to 500, which should be suitable for most usages and devices on which NewPipe is used.
… the SmoothStreaming delivery method
5c2c4ac
to
602b099
Compare
Kudos, SonarCloud Quality Gate passed! |
What is it?
Description of the changes in your PR
This PR adds support of YouTube OTF streams and the full support of ended livestreams in NewPipe (these streams cannot be downloaded or played in external players right now).
It also fixes the seek of PeerTube streams which have HLS-only variants of streams.
The support for downloading these streams will be not added in this PR.
Some code is inspired from #3803.
For more detailed changes, check the commits.
TO DO:
IndexOutOfBoundsException
);ListHelper
to return only streams which have a delivery method (for e.g. return only HLS streams for PeerTube videos in the player)PROGRESSIVE_HTTP
delivery method for external players when possible and add ability to play other variants of streams in these playersFixes the following issue(s)
ListHelper.compareVideoStreamResolution(String res1, String res2)
which is caught in this PR. The original error cause was also fixed in the extractor.)Relies on the following changes
APK testing
On the website the APK can be found by going to the "Checks" tab below the title and then on "artifacts" on the right.
Due diligence