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

mpv integration does not yet work with youtube-dl #76

Open
rohieb opened this issue Feb 18, 2017 · 3 comments
Open

mpv integration does not yet work with youtube-dl #76

rohieb opened this issue Feb 18, 2017 · 3 comments

Comments

@rohieb
Copy link
Member

rohieb commented Feb 18, 2017

When playing YouTube URLs with mpv, I only get

nordlicht: Could not open video file 'ytdl://uWbGMAPg2uk'

Is there maybe some way to get the original stream URL from mpv?

@rohieb
Copy link
Member Author

rohieb commented Feb 18, 2017

Hmm, I guess we could call youtube-dl --get-url from Lua, but then we need a way to get the YouTube video URL, not only ytdl://…

@blinry
Copy link
Contributor

blinry commented Feb 18, 2017

For quickly trying out things, you can use utils/youtube-nordlicht.

And for proper integration, those characters are probably the video's ID? So we could check whether the "filename" starts with "ytdl://", then replace it with "https://www.youtube.com/watch?v=", call youtube-dl --get-url on it (with a low-quality option, maybe), then plunge the result into nordlicht. :-D

@rohieb
Copy link
Member Author

rohieb commented Feb 19, 2017

This could work. YouTube URLs from playlists look like ytdl://<video-id>, but Vimeo URLs from playlists look like ytdl://https://vimeo.com/channels/bestoftheyear/169599296, and for dailymotion it's ytdl://http://www.dailymotion.com/video/x5c3xm5. When playing only a single video, the URL from the command line is the same (and I just found out that mpv can even play these ytdl:// URLs if you specify them on the command line!)

It's a bit unfortunate that the video is effectively downloaded twice, once for nordlicht and once for watching in mpv. But I cannot think of a good solution, and loading the nordlicht video in a lower quality seems like a good tradeoff.

Then we have to consider livestreams, which also have a YouTube video ID, but cannot be downloaded (for obvious reasons), or at least only after the livestream has finshed…

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

No branches or pull requests

2 participants