getmusicbee.com

Support => Developers' Area => Topic started by: MatPy on April 25, 2020, 12:12:01 PM

Title: Youtube MP3 Downloader in MusicBee?
Post by: MatPy on April 25, 2020, 12:12:01 PM
Hi there,

I am quite new to MusicBee, using it for 1 month, but I really like this software and I would like to participate to the development of plugins.

My first wish was a Youtube MP3 downloader integrated in MusicBee so I searched in the plugin library and forum. This seems to have been done twice by the past, but the first one has been removed by the author (Cyano) and the second si outdated and does not work with the current Youtube (BeeDownloader). I think there is a need to fill, at least mine.

The features I imagine would be similar to thoses of the python script ytmdl (https://github.com/deepjyoti30/ytmdl) and the "Soundcloud Search" service in MusicBee.
 - An audio extractor from URL (with youtube-dl (https://github.com/ytdl-org/youtube-dl/)) with sending to Inbox
 - An optional automatic conversion in MP3 (with Convert Format tool)
 - An auto tagging from Youtube informations (with Auto Tag)

 - An integrated Youtube search (using the search bar)
 - An online audio streaming


I did not investigate the API enough to be sure that everything is possible, so tell me if this is simply impossible to implement. I am new to C# but I set up Visual Studio with the tutorial quite easily and with time I believe I can reach something useful.


With this post I hope for some feedback about the relevance of this plugin or its features, some development advice.
I will also share the progress of the development and the different releases.

Cheers
Title: Re: Youtube MP3 Downloader in MusicBee?
Post by: phred on April 25, 2020, 01:30:22 PM
If I recall correctly, the developer of the first YT downloader received a notice from YouTube to take it down.

In addition part of the problem in creating one, is that the API changes frequently as YouTube (Google) doesn't want people downloading the content.
Title: Re: Youtube MP3 Downloader in MusicBee?
Post by: MatPy on April 30, 2020, 11:29:24 AM
Thank you for this information. I honestly didn't check the Terms of Use to be sure that everything fits the law, but I believe it would.

For the interfacing with Youtube, I totally rely on youtube-dl. It seems to be highly maintained, the git repo is still active and the last release is 1-month old. This software is well known and based only on the public Web side of Youtube (no account, no API key) so if it's still here, it would be legal. Of course, downloading copyrighted music is not legal but that's only a final user's problem.

I firtsly wanted to create my own search feature with an XML parsing, which would be eventually very unreliable with the future modifications of the Youtube interface. It turned out that youtube-dl already has such a function.

"All" I need to do now is just to integrate it in MusicBee with a nice interface and the correct queries to youtube-dl.
Title: Re: Youtube MP3 Downloader in MusicBee?
Post by: stardepp on May 01, 2020, 12:42:26 PM
Would it be useful for you to be able to set up a costum web link for YouTube in MusicBee so that it can be viewed in the MusicBee web browser

https://www.youtube.com/results?search_query=$Replace($First(<Artist>)+<Title>,"&","and")

(https://i.imgur.com/3br5FSK.jpg)
Title: Re: Youtube MP3 Downloader in MusicBee?
Post by: MatPy on May 01, 2020, 02:24:16 PM
Thanks for this tip, but that's not really what I want to do.
I don't want to open the music clip in a web browser, I only want to get the audio file and easily add it to my library.
I already can do something similar with an external browser and a "Youtube download" plugin. But then I must move the file, do a rescan with MusicBee, add the correct track informations.

The purpose of my plugin is to be able to do this directly in MusicBee with a light plugin and not a heavy web browser and several manipulations.

And that's also an excuse for me to develop a real piece of software in these lazy days.
Title: Re: Youtube MP3 Downloader in MusicBee?
Post by: stardepp on May 01, 2020, 03:46:49 PM
And how about this? You can also create a costum web link:

https://myzcloud.me/en