Skip to content

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

Open
@joh9911

Description

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

Metadata

Assignees

No one assigned

    Labels

    questionNot really an issue, but more of a question about how something works

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions