sound.PlayURL with youtube?

Alright, i’ve come to the point where I seriously don’t have an answer to this. I’ve tried using Youtube JSON API’s but the only working one (as far as I knew) didn’t work anymore. I managed to get another to work but it doesn’t show any link to play with sound.PlayURL.

Is there any API or anything I can use to play songs from youtube?

The only decent one that I’ve found is this:

youtubeinmp3.com/api/

Here’s an example usage:

youtubeinmp3.com/fetch/?api=advanced&format=json&video=YoutubeUrlHere

Depending on the format you want it to return it’ll return the title, link to direct mp3 download and length. Unfortunately it has a daily limit ( I don’t know what number exactly, I just know that after a while it stopped working, when I checked the website it said I had reached my daily limit ) It also appears that videos that hadn’t been previously converted, need to be converted and it will take multiple tries until you get a working download link.

If you wish to make your own, you’re going to need to host a conversion service.

I’ve tried this, it’s horrible. There must be another solution. I can’t host it or make it ;/

ty though

I have that problem when I tried to add Youtube support to my radio addon. I use Youtubeinmp3 too and it seems to be the only working Youtube to mp3 API. Even that is not meant to be used by an online radio script. I guess, there is a reason for that since downloading video, converting and uploading MP3s to hundred of users on a daily basis is a huge bandwidth killer.

Have a look at this; https://github.com/wyozi/gmod-medialib

This is working great so far, thanks!