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-dl integration #151

Open
nariox opened this issue May 26, 2017 · 6 comments
Open

youtube-dl integration #151

nariox opened this issue May 26, 2017 · 6 comments

Comments

@nariox
Copy link

nariox commented May 26, 2017

Hi, I'm wondering if it'd be possible to integrate youtube-dl so youtube links (or other supported websites) could be pasted into ympd and played.

I currently have a shairport-sync/mpd server set-up, but since I don't personally own any apple products (wife owns iPad), I find myself not being able to stream playlists/music directly from my own devices. Workarounds are welcome too, but I think an youtube-dl tab/plugin would be neat!

@kousu
Copy link

kousu commented Dec 13, 2018

I was thinking about this problem too. I think it might be better solved as a playlist plugin on the server side. For example, soundcloud:// URLs are handled by https://github.com/MusicPlayerDaemon/MPD/blob/ce49d99c2f3265f2975b2cff583684bf191bbd93/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx. It looks like it wouldn't be too hard to fork that and shove a call to youtube-dl -gx in there.

@kousu
Copy link

kousu commented Dec 13, 2018

Also, YouTube streams don't have the metadata nicely embedded and they probably aren't the only one, so we should fall back on youtube-dl's metadata extractors would be good. If I youtube-dl -gx http://youtube.com/watch?v=something | mpc add then I just get a big messy URL on the playlist. In comparison, youtube-dl -gx http://bandcamp.com/track/something | mpc add does also leave a long URL in the playlist, but once mpd plays it it gets the metadata out of the stream and relabels the entry with that.

@kousu
Copy link

kousu commented Dec 13, 2018

Oh snap, someone forked the entire project to add this feature: https://github.com/bjuriewicz/ympd-youtube

But they did it by adding a folder to cache mp3s to and running

youtube-dl --max-quality=140 --extract-audio --audio-format=mp3 

which wouldn't be my first choice, especially when youtube-dl -gx exists.

@Emilot
Copy link

Emilot commented Dec 13, 2018

Also look at...

https://github.com/mayflower/maympd

@kousu
Copy link

kousu commented Dec 14, 2018

ympd-youtube and maympd both ask youtube-dl to download the file and embed id3 tags in it, so then mpd will load up the metadata correctly. But I'd rather stream, not download. My servers don't necessarily have a lot of space I can fill up and forget about.

@HyShai
Copy link

HyShai commented Dec 18, 2018

There's an active PR on the main MPD repo to add a youtube-dl plugin - MusicPlayerDaemon/MPD#223

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants