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

Add Opus support for download + metadata #112

Closed
Shnxxx opened this issue Dec 31, 2020 · 14 comments
Closed

Add Opus support for download + metadata #112

Shnxxx opened this issue Dec 31, 2020 · 14 comments
Labels
awaiting-reply Awaiting reply enhancement New feature or request fix-available A fix to the issue is available in a new version

Comments

@Shnxxx
Copy link

Shnxxx commented Dec 31, 2020

The app works great! I am loving it already and being used 100% of the time I am using my PC. But we can't deny that even how great the application is, there still some external problems like Internet connectivity. We lost connection for no reasons, or Google is messing us up again. The download plugin is great! It allows me to download the music to an .mp3 format. But these days, there are lots of better formats now that is supported widely. There's .aac, .flac, m4a, .wav, .opus, and such...

Opus is far superior now to .aac and .mp3, which are being widely used too. Opus is a lossy audio format yet produces far better quality and lower size compared to .mp3, .aac, and vorbis.

I would like to request to add an Opus support, if possible. Or at least let us choose what format what we would like to download the music for us audiophiles who wants to store the highest quality possible yet low-sized audios. Since YouTube supports already opus format. Thank you in advanced!

@th-ch
Copy link
Owner

th-ch commented Jan 8, 2021

Hey @Shnxxx, thanks for the feedback! The latest prerelease adds support for custom file extensions - using it, you can convert to opus with the following options (in Options > Advanced Options):


"downloader": {
    "enabled": true,
    "extension": "opus",
    "ffmpegArgs": [
        "-acodec",
        "libopus",
        "-b:a",
        "128000"
    ]
},

128000 is for 128kbits/s but you can set another bitrate - Feel free to give it a try!

Other audio formats are also possible by setting a different extension and custom FFmpeg options - a list of available encoders is available in ffmpegwasm/ffmpeg.wasm#61 (feel free to post in this issue if you need help for another format)

@th-ch th-ch added awaiting-reply Awaiting reply enhancement New feature or request fix-available A fix to the issue is available in a new version labels Jan 8, 2021
@Shnxxx
Copy link
Author

Shnxxx commented Jan 10, 2021

Thank you for your response! I used the code you have given and when I tried to download, I am only getting 0 KB files and is still in .mp3 extension. Any ideas?

image
image

@th-ch
Copy link
Owner

th-ch commented Jan 10, 2021

Hey @Shnxxx, thanks for the feedback! Settings look good, have you restarted after changing the setting + are you using v1.8.1 (and not the latest v1.8.0)? You can check with About YouTube Music in the menu.
I had the same issue (0KB file) with 1.8.0, that's why I released v1.8.1 (and with "extension": "opus", your final file should be a .opus, not a .mp3).

If things are still the same, then it might be another issue worth investigating!

@Shnxxx
Copy link
Author

Shnxxx commented Jan 11, 2021

Thank you! After doing the fix last time, I looked at the release section but there is no new version so I did not change anything in the app except the configuration. Didn't notice there was a pre-release. My mistake 😅

The download works fine now! I am just wondering, does the download do is downloading the audio in .mp3 and converts it to .opus? If yes, is it possible to download the highest possible quality of the audio? Based on a web search, YouTube Music uses .aac @ 256Kbps. Is it possible to download that directly then convert to .opus?

Also, Is it possible to add more metadata on the audio I've downloaded? For example, I just downloaded U got that - Halogen and the filename was only U got that.opus. Also, when I looked at the details under properties of the file, there were no other details except the Name, Audio Sample rate, Length, Size, and Date. Or is it on the YouTube Music already? They don't include metadata?

One more thing, if you are a premium user of YouTube Music, which I am not, you can stream or download High Quality audio by setting it up the playback settings to High or Always High. When I tried it to the app, it is the same in the browser. Is it possible in the future to allow us to stream/download high-quality music with the app like a premium?

Thank you again! I still have lots of thoughts but I think it is too much for now. 😅

@th-ch th-ch changed the title Add Opus support for download Add Opus support for download + metadata Jan 13, 2021
@th-ch
Copy link
Owner

th-ch commented Jan 15, 2021

Hey @Shnxxx, thanks for the feedback! In latest version 1.9.0, all downloaded songs should now have the artist/title metadata!
Feel free to give it a try and update the issue if necessary!

@Shnxxx
Copy link
Author

Shnxxx commented Jan 16, 2021

Thank you @th-ch! I tried downloading a song and the metadata is there, it works great! But is it possible to modify how the app names the filename?
image

Is it possible to add the artist too? From 'Iris.opus' to 'Iris - Goo Goo Doll.opus'.

@th-ch
Copy link
Owner

th-ch commented Jan 16, 2021

Hey @Shnxxx, thanks for the feedback!

I am just wondering, does the download do is downloading the audio in .mp3 and converts it to .opus? If yes, is it possible to download the highest possible quality of the audio?

About quality, the highest audio quality is downloaded (seems to be 160kb/s by default) and then converted to the format you configured (so you configured opus, no intermediary mp3).

Is it possible to add the artist too?

Sure! Added the artist - title file format in 37289b9, it will be available in the next version!

@Crunklydunks
Copy link

I figured rather than open a new issue I would just ask here - is there some way with the new options to have it not transcode at all, just save whatever the highest quality file is that YTM is serving up? It can of course be done using youtube-dl but I would love to be able to do it from within this app, it's so convenient. Thanks!

@Richiev4
Copy link

Hi All

Could someone tell me how to add the correct code to up bit rate on MP3s, My config looks like this but I don't know which arguments to change/add

Config

Many thanks
Richard

@Araxeus
Copy link
Collaborator

Araxeus commented Mar 15, 2023

The bitrate you get is the maximum for free youtube :)

When you see youtube downloaders that gives you "320kbs" - its a lie

@Richiev4
Copy link

The bitrate you get is the maximum for free youtube :)

When you see youtube downloaders that gives you "320kbs" - its a lie

HI, I'm a Premium subscriber, can I get a higher bit rate?

Rich

@Araxeus
Copy link
Collaborator

Araxeus commented Mar 15, 2023

HI, I'm a Premium subscriber, can I get a higher bit rate?

Theoretically, it's possible, but no one implemented that yet.

(I don't have a premium account and I didn't succeed in my few tries implementing this using cookie grabbing)

@Richiev4
Copy link

OK, Thanks for the info...I'll Wait, maybe it will happen

@LeonDerDr
Copy link

How do i use the ffmpegArgs to download m4a audio?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-reply Awaiting reply enhancement New feature or request fix-available A fix to the issue is available in a new version
Projects
None yet
Development

No branches or pull requests

8 participants
@th-ch @JellyBrick @Crunklydunks @Shnxxx @LeonDerDr @Araxeus @Richiev4 and others