Saving music from Youtube is fun. I am going to show how to save in good quality using youtube-dl by itself.
This command will do it in one go.
youtube-dl -f 140 https://www.youtube.com/watch?v=eb-2ljQDYFU --embed-thumbnail --extract-audio --audio-format mp3 |
This is the command in action. This gets the music in good quality and also saves the Youtube thumbnail as the album art.
┌─[jason@jason-desktop]─[~/Music/Youtube] └──╼ $youtube-dl -f 140 https://www.youtube.com/watch?v=eb-2ljQDYFU --embed-thumbnail --extract-audio --audio-format mp3 [youtube] eb-2ljQDYFU: Downloading webpage [youtube] eb-2ljQDYFU: Downloading js player c299662f [youtube] eb-2ljQDYFU: Downloading js player c299662f [youtube] eb-2ljQDYFU: Downloading thumbnail ... [youtube] eb-2ljQDYFU: Writing thumbnail to: Eternal Eclipse - Twilight Huntress (feat. Merethe Soltvedt)-eb-2ljQDYFU.webp [download] Destination: Eternal Eclipse - Twilight Huntress (feat. Merethe Soltvedt)-eb-2ljQDYFU.m4a [download] 100% of 2.27MiB in 00:00 [ffmpeg] Correcting container in "Eternal Eclipse - Twilight Huntress (feat. Merethe Soltvedt)-eb-2ljQDYFU.m4a" [ffmpeg] Destination: Eternal Eclipse - Twilight Huntress (feat. Merethe Soltvedt)-eb-2ljQDYFU.mp3 Deleting original file Eternal Eclipse - Twilight Huntress (feat. Merethe Soltvedt)-eb-2ljQDYFU.m4a (pass -k to keep) [ffmpeg] Converting thumbnail "Eternal Eclipse - Twilight Huntress (feat. Merethe Soltvedt)-eb-2ljQDYFU.webp" to JPEG [ffmpeg] Adding thumbnail to "Eternal Eclipse - Twilight Huntress (feat. Merethe Soltvedt)-eb-2ljQDYFU.mp3" |
This works very well for downloading a song you like to listen to locally. I hope you find this useful. And this does not really require FFmpeg. This can be done on Windows as well. Just download youtube-dl and then use it to save music using this trick. The music saved this way was about 120 Kb/s. But the quality is fine.