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] Support 256kbps aac audio in youtube music #26160

Closed
wants to merge 1 commit into from

Conversation

craftingmod
Copy link

@craftingmod craftingmod commented Jul 29, 2020

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Explanation of your pull request in arbitrary form goes here. Please make sure the description explains the purpose and effect of your pull request and is worded well enough to be understood. Provide as much context and examples as possible.

screenshot

If provided url is youtube music, It will try get_video_info GET request with youtube music player parameter.

With cookie auth, Youtube premium member could download 256kbps aac audio in some supported music video. (Example: Megalovania)

bitrate

@dstftw
Copy link
Collaborator

dstftw commented Jul 29, 2020

You must provide premium account.

@craftingmod
Copy link
Author

Sadly youtube wouldn't allow to download 256kbps aac without premium subscription. But current youtube-dl couldn't download 256kbps aac even if I have provided yt premium account cookie. It fixes that.

@michealespinola
Copy link

You must provide premium account.

If it helps anyone, YouTube is currently offering a free month trial of Premium. I upgraded my account about a week ago, but I believe they are still offering the trial. No payment required until the first renewal date of 30 days.

@Shulyaka
Copy link

Shulyaka commented Aug 5, 2020

Hi!

If the free trial is not an option, I am willing to provide a donation to any of the core developers to cover premium subscription for a couple of months, if that would help with:

  1. Downloading best quality audio from YouTube music
  2. Search on YouTube music (like :ytsearch but on music.youtube.com). Note that it gives different results than searching on youtube.
  3. Ensure logging in with netrc or --username works for YouTube music. Cookies are good, but they tend to expire.

@celloh123
Copy link

I can give my account info.

@dstftw dstftw force-pushed the master branch 2 times, most recently from 5e26784 to da2069f Compare September 13, 2020 13:50
@FolkSong
Copy link

FolkSong commented Jan 3, 2021

I tried manually making these changes to youtube.py in the latest master and running it. It still works but I noticed an issue - it doesn't work on playlists, only individual videos.

For instance I can run it on the Megalovania track linked in the OP and format 141 is there. But if I run it on this playlist with Megalovania at the top, there is no format 141.

Update: Looks like the issue is with line 1781 of the original commit. If I just set 'is_music' to 1 instead of doing the regex, it works on playlists. Something's going wrong with that regex test.

Update2: This is also breaking tags for the output file such as "%(artist)s", "%(album)s" etc which work in the master. They all evaluate to "NA" after making the change.

@Silun
Copy link

Silun commented Apr 10, 2021

It supposedly works but the maintainers aren't adding it in.

@rautamiekka
Copy link
Contributor

You must provide premium account.

If it helps anyone, YouTube is currently offering a free month trial of Premium. I upgraded my account about a week ago, but I believe they are still offering the trial. No payment required until the first renewal date of 30 days.

Plus, surely you can deactivate/cancel the auto-renewal right after taking up the trial, so you won't have to do it right before the auto-renewal proceeds.

@AndreasWidmer
Copy link

Is there any news on this? I would be really grateful for this option!

@ghost
Copy link

ghost commented Apr 16, 2021

Is there any news on this? I would be really grateful for this option!

apply this commit to release of december 2020. and do #26160 (comment).
./youtube_dl/main.py --cookies cookies.txt -F https://music.youtube.com/watch\?v\={video_id}
you can see format 141

@craftingmod
Copy link
Author

Please refer #28778 for future update because my pull request branch is taken down :(

pukkandan pushed a commit to yt-dlp/yt-dlp that referenced this pull request May 15, 2021
nixxo pushed a commit to nixxo/yt-dlp that referenced this pull request Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants