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

Can I get a url of video stream with the highest resolution? #1218

Open
6 tasks done
joh9911 opened this issue Aug 29, 2024 · 0 comments
Open
6 tasks done

Can I get a url of video stream with the highest resolution? #1218

joh9911 opened this issue Aug 29, 2024 · 0 comments
Labels
question Not really an issue, but more of a question about how something works

Comments

@joh9911
Copy link

joh9911 commented Aug 29, 2024

Checklist

  • I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
  • I am aware that this issue is being opened for the NewPipe Extractor, NOT the app, and my bug report will be dismissed otherwise.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.24.2

Steps to reproduce the bug

Current Code


private fun getStreamExtractor(videoId: String): StreamExtractor {
        return try {
            youtubeService.getStreamExtractor(videoId)
        }catch (e: Exception){
            throw NewPipeException.ExtractionFailed("getStreamExtractor", e)
        }
    }


override suspend fun fetchStreamInfoByVideoId(videoId: String): Result<Pair<MutableList<VideoStream>?, MutableList<AudioStream>>> {
        return try {
            val extractor = getStreamExtractor(getVideoUrl(videoId))
            extractor.fetchPage()
            Result.success(Pair(extractor.videoOnlyStreams, extractor.audioStreams))
        }catch (e: Exception){
            return Result.failure(e)
        }
    }

I want to get only videoStreams with a list of resolutions

Expected behavior

No response

Actual behavior

No response

Screenshots/Screen recordings

No response

Logs

No response

Additional information

I guessed that getting the highest, or a variety of resolutions is only allowed by getting VideoOnlyStreams.
And I wonder if I can get the highest resolution url from videoStreams

@joh9911 joh9911 added the bug Issue is related to a bug label Aug 29, 2024
@opusforlife2 opusforlife2 added question Not really an issue, but more of a question about how something works and removed bug Issue is related to a bug labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Not really an issue, but more of a question about how something works
Projects
None yet
Development

No branches or pull requests

2 participants