TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
29.47k stars 2.95k forks source link

AV1 codec video downloaded when MP4 container selected #11001

Open foxjaw opened 2 months ago

foxjaw commented 2 months ago

Checklist

Feature description

Expose VP9, AVC and AV1 formats and list them while downloading

Why do you want this feature?

On some streams the app only downloads AV1 format, which is unsupported by older smartphones. Hence they stutter.

Additional information

No response

opusforlife2 commented 2 months ago

How were you able to get the AV1 format in the first place? The video codec shown in the download dialog depends on whether you have selected WebM or MPEG-4 in Video and Audio settings. There is no AV1 option there.

foxjaw commented 2 months ago

That setting has nothing to do with the codec that is downloaded. It only affects the codec of streaming in the app player.

You can try downloading a 1080p 60fps stream and the output ends up to be AV1. My mpv-android player stats say "DAV1D decoder by VideoLAN".

Every stream above 1080p have their own avc, vp9 & av1 counterparts btw. And newpipe sometimes chooses av1, or sometimes chooses avc or vp9 depending the precedence set by YouTube. The precedence here I think is decided by the parsing of the website itself. For instance, try yourself on a private browsing window. Inspect the source of the stream's media. Whatever it'll be, that's the one that newpipe is trying to download.

opusforlife2 commented 2 months ago

Could you share an example vid URL?

foxjaw commented 2 months ago

https://www.youtube.com/watch?v=52quAx6N_nA

Test 1080p 60fps.

opusforlife2 commented 2 months ago

Nope, still getting AVC. Where are you based? This might be a regional rollout.

foxjaw commented 2 months ago

India. Btw I don't think this is regional. I have set the video codec as mpeg and audio codec as webm. Can you try again with this ?

opusforlife2 commented 2 months ago

There's no way this can happen with WebM anyway, because it's not used as a container for AV1 by YT in the first place. But both AVC and AV1 use the MP4 container. So it's possible that Newpipe is fetching the AV1 stream format instead of AVC for you.

I'll ask in the chat if people are able to reproduce this.

foxjaw commented 2 months ago

Ok. But remember this issue is not a bug. It's a feature request to expose all 3 formats while downloading.

Currently we can't. Newpipe chooses the codec based on what I donno tbh. Whatever you asked to check in the settings, that ain't for the downloadable file. It's for streaming only.

opusforlife2 commented 2 months ago

But remember this issue is not a bug. It's a feature request to expose all 3 formats while downloading.

It is being treated as a bug. Newpipe isn't supposed to be able to parse AV1 streams yet. There's no support for it. Only AVC (inside MP4) and VP9 (inside WebM) are supported.

The feature request part is a duplicate of #3159.

It's for streaming only.

It's for the downloadable file also. Carefully note where it says MPEG-4/WebM just above the resolution in the dropdown, based on your setting.

My mpv-android player stats say "DAV1D decoder by VideoLAN".

Could you also confirm using VLC, MPC or MediaInfo? So that there is independent confirmation of the video codec being AV1.

foxjaw commented 2 months ago

Yup it's mpeg above res. Checked with both mediainfo and ffmpeg cli too. It's AV1 codec with mp4 format.

opusforlife2 commented 2 months ago

A dev said in chat that it's likely an AV1 stream that we haven't blacklisted yet, which you're encountering.