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

[YouTube] Add support for ultralow audio formats #1063

Merged
merged 2 commits into from
Sep 24, 2023

Conversation

yshalsager
Copy link
Contributor

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

While using yt-dlp I noticed that there are two new audio formats for ultra-low connections (599 m4a and 600 webm) which NewPipe doesn't support yet, so I added them.

[info] Available formats for NyLdD8wk2XI:
ID  EXT   RESOLUTION FPS CH │   FILESIZE  TBR PROTO │ VCODEC       VBR ACODEC      ABR ASR MORE INFO
──────────────────────────────────────────────────────────────────────────────────────────────────────────────
599 m4a   audio only      2 │    6.61MiB  31k dash  │ audio only       mp4a.40.5   31k 22k ultralow, m4a_dash
600 webm  audio only      2 │    7.46MiB  35k dash  │ audio only       opus        35k 48k ultralow, webm_dash
139 m4a   audio only      2 │   10.48MiB  49k dash  │ audio only       mp4a.40.5   49k 22k low, m4a_dash
249 webm  audio only      2 │   10.89MiB  51k dash  │ audio only       opus        51k 48k low, webm_dash
250 webm  audio only      2 │   13.89MiB  65k dash  │ audio only       opus        65k 48k low, webm_dash
140 m4a   audio only      2 │   27.80MiB 129k dash  │ audio only       mp4a.40.2  129k 44k medium, m4a_dash
251 webm  audio only      2 │   27.06MiB 126k dash  │ audio only       opus       126k 48k medium, webm_dash

Here's a screenshot from the build app after these changes, works as expected.

Screenshot

Screenshot_1684584369

Copy link
Member

@AudricV AudricV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, please respect the media format and bitrate orders in the list.

A NewPipe support for the added itags is also needed, as they are now whitelisted: see TeamNewPipe/NewPipe#9748.

By the way, this change will probably make the app download these 30k audios instead of the 50k ones for demuxed video streams, when these audio streams are available. This audio selection bug should be definitively fixed before we release a new NewPipe version.

Also use a better branch name in the future, like described in our contribution guidelines.

Copy link
Member

@AudricV AudricV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, though I am not sure about what average value we should give to the itag 600. Is there someone else which may have more input about that?

This PR will be merged using the squash and merge option.

Please let me know if I should submit another PR to the app to whitelist the new formats now or after merging this one.

I think you will need to do so, but we really need to fix the issue I mentioned on the fly, otherwise the audio quality for demuxed video downloads may be worse than it is already for MPEG-4 streams.

@AudricV
Copy link
Member

AudricV commented Sep 24, 2023

I am not sure about what average value we should give to the itag 600. Is there someone else which may have more input about that?

I didn't get an answer on this question, so I will keep the average value as it is.

This audio selection bug should be definitively fixed before we release a new NewPipe version.

See TeamNewPipe/NewPipe#10446.

I think you will need to do so

@yshalsager Do you still want to do so or should I do this myself? You simply need to update the extractor commit and, of course, to add 599 and 600 formats to the allowed itags list of NewPipe.

I am merging the pull request, thanks for your contribution!

@AudricV AudricV merged commit 917554a into TeamNewPipe:dev Sep 24, 2023
@AudricV AudricV added enhancement New feature or request youtube service, https://www.youtube.com/ labels Sep 24, 2023
@yshalsager
Copy link
Contributor Author

@yshalsager Do you still want to do so or should I do this myself? You simply need to update the extractor commit and, of course, to add 599 and 600 formats to the allowed itags list of NewPipe.

Sorry, I am on a vacation for a few weeks, would be grateful if you added it.

I am merging the pull request, thanks for your contribution!

My pleasure, thanks for your review and awesome efforts!

beasonshu pushed a commit to beasonshu/NewPipeExtractor that referenced this pull request Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants