Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Playlist handling is a bit of a mess (formerly: Suggestions for Advanced Usage) #4003
Comments
|
Playlist handling would be nice to manipulate similar to an array. Say I only want the first 10 songs of a youtube mix, I should be able to add a -n 10, that way I don't have to make a new playlist everytime I want to save parts of a mix. I guess you can just CTRL-C once you hit 10 songs as well.. |
|
@DarrenCattle Please file a separate issue, but make sure you read about the playlist options first. |
|
Thanks, it's great to hear that youtube-dl is being used. As documented in our FAQ, please file multiple issues for multiple issues though. @jaimeMF has already moved the third one to #4014. I'm just going to answer the last one. I do think the others are good suggestions though, especially when combined with an actual test case. In youtube-dl 2014.10.24, there is a new
|
|
The second problem is already reported in #3036. |
|
Okay, thanks a lot! I'll make a new issue for the first one. Shouldn't |
|
Oh, you' re right, I was applying the playlist info by accident, fixed:
|
|
Can you include the full URL to each video? Otherwise we'd have to figure out how to build one ourself for each service. Or can ytdl somehow make directly use of the supplied info? |
|
These URIs are valid for youtube-dl:
If you need a webpage URL, this will not be possible with |
|
Mh, but the vimeo playlist extractor returns full URLs. Does this depend on what the service delivers in the playlists? |
|
Yes, each extractor is free to define its own URI scheme (which does not have to follow the actual URI schemes outside of youtube-dl, case in point). Most extractors will just use the video URLs, but they are certainly free to use any other form of URI (some will use a scheme akin to |
|
Okay, not ideal, but we can make it work. Independently from this, I would recommend though to at least always specify the Extractor, to ensure that the ID gets passed on correctly in case two sites use a similar/identical ID scheme. Still thanks for your help! |
|
Why is this not ideal for you? Can you elaborate on your usage scenario? With the exception of the generic extractor (which matches everything), URI schemes are disjunct, so a collision can never happen. Note that the extractor is specified right there in the |
|
See the script from the gist. What our script gets from the user will be a string, which may be a path to a local file, a HTTP/FTP/etc URL directly to a video or to a video site. At this point we can only tell that we should ask youtube-dl to lookup our String, if it starts with "http://" or "https://". If we get a playlist from youtube-dl back (we already have to do some guesswork to tell if what we got from youtube-dl is video info or a playlist), we want to insert the playlist entries into mpv's internal playlist, so that for each video ytdl is called again to fetch the video info for the video that should now be played. But since what we get from the ytdl-playlist may not be a URL that starts with http(s)://, our script will have no idea that it may be supposed to ask ytdl for the individual video info now. Due to this, we'd have to prefix the playlist-entries we get from youtube-dl with something like ytdl:// before sending them to mpv's playlist, to tell our script that the incoming string is supposed to go to ytdl. If we always got full URLs, this wouldn't be necessary. So yeah, this is not really a big problem. It's just "not ideal", but we can make it work. |
|
Yes, the Sorry, I noted the gist just now. It looks like you have embedded many workarounds. I would prefer to have bugs filed against youtube-dl so that we can improve the situation for all users of youtube-dl. What comes to mind:
|
|
Thanks for your input and help. I've updated the script now to reflect the lastest changes (I was just waiting for the situation to stabilise). The workarounds were removed as far as possible and playlists are now supported. Regarding |
Hi, I'm from the mpv-player team and we are currently working on replacing libquvi with youtube-dl. While trying to make some advanced features work, we ran into some problems and hope you can help us with those. See this gist for the current progress.
Let me know if you'd rather have this in separate issues.
Playlist handling is a bit of a mess
We'd also like to support playlists, but the way ytdl handles those currently is a bit inconvenient. Instead of fetching the info for all videos in a playlist at once (which may take quite a while, also the URLs may be invalid be the time you want to play them), we'd prefer if there was a way to just get the page URLs to the individual videos (ideally as a JSON array of "unresolved" URLs), so that we then can run ytdl for each video again when we actually want to play it.
–––––––––––––––––––––––––––––––––––––
Automatically extract ASS subs when available (Moved to #4019)
Subtitles are written to disk with -j (See #3036)
We use the -j option to get the video info in JSON, however, when requesting subtitles as well, those are also still written to disc (cwd), which ends up cluttering the users directory. Since the JSON data contains the subtitles, there is no need to write them to disk as well.
Video URL sometimes has escaped & (See #4014)
The video URL we get from the JSON data may have
&escaped as&, although there is no need for this (this may be specific to the Crunchyroll Extractor).