Saving a shuffled YouTube playlist
February 1, 2016 1:42 AM   Subscribe

I would like to take my YouTube playlist, shuffle it, and save the results of my shuffling on YouTube. How do I do so?

My family has Chromecast, and I'm primarily using it to play videos in the background while I work. I have a working Chromecast playlist that I add videos to regularly.

Unlike playing playlists on the website, Chromecast doesn't let you shuffle your queue. My current getaround is to go through my playlist and randomly move things to the top before I cast it onto my TV, but now that my playlist has 600+ videos this gets rather unwieldly.

There are websites that will shuffle playlists for me, but I haven't seen a site that lets you save that shufled playlist into its own playlist (or even overwrite the original). There is also the more hacky option of casting a Google Chrome tab to TV, but it's not as good as directly casting YouTube.

Is there a way to shuffle my playlist and save the results?
posted by divabat to Computers & Internet (5 answers total) 3 users marked this as a favorite
 
I'm not sure how useful this answer will be (I don't have a YT account or a chromecast), hopefully you've already found a solution, and there are probably better ways. But since nobody's answered yet, here goes:

- Look up how to export your YouTube playlist to a list of URLs. It looks like one way to do this is with this download program, which in theory you could also use to download all the videos or the music thereof, if you have enough disk space. In which case you could use something like videostream to stream them as local files. Or there's this, which looks like it might be useful for both exporting and importing (see below)

- if you prefer to cast through YouTube, look up how to import a playlist to YouTube (this seems from cursory googling to be possible)

- shuffle the exported playlist (if you don't have other ways to do it, you could always import the list into something like excel or vlc and shuffle it there) and then import the shuffled list into YouTube.
posted by trig at 8:19 AM on February 5, 2016


Response by poster: That download link doesn't give me a way to get the playlist URLS - I have over 800 videos in my playlist, downloading all of them as files would be nuts. The second link didn't work with my playlist. Cursory Googling is telling me to code something or somehow deal with Terminal/GitHub, which is more than my capabilities.
posted by divabat at 10:22 PM on February 5, 2016


Response by poster: Thanks to this I have a list of YouTube URLS, but no easy way to transfer them to a YouTube-hosted playlist. Googling just gets me:

1. Playlists hosted off YouTube, which won't work with Chromecast
2. Adding videos one by one through YouTube's "add video" button - when you have over 800 videos this is VERY TEDIOUS
3. "Oh I'm sure you can code something!!"
posted by divabat at 10:36 PM on February 5, 2016


Huh, sorry that wasn't more helpful.
Okay, last suggestion given that I can't actually try any of this out:

https://github.com/xat/castnow/blob/master/README.md

looks like you can use it to cast videos one by one:

> castnow https://www.youtube.com/watch?v=pcVRrlmpcWk

in which case... this might need tweaking if you're using a different commandline than I am (sorry :p) but you'd want to do something like 'for each line in my file of URLs (assuming they're each on a separate line), run the command castnow with the contents of that line.' So for me, after I've installed castnow and assuming that it actually works the way you need, what I'd type on the commandline would be:

while read currentURL; do ./castnow $currentURL; done <nameOfFileWithURLList

That would all be one line; it assumes both the castnow command and your URL list are in the same directory that you're in when you run the command; change nameOfFileWithURLList to whatever you've named that file; make sure you don't drop the < sign before that filename.

Hopefully that gets you somewhere. I had no idea YouTube made things so complicated!


(Also I hear you about the craziness of just downloading all the videos, but just in case you do have the disk space and are more worried about the time it would take, you can use the youtube-dl command to automatically dl the entire playlist. In which case you'd just leave it running in the background while it does its (very long) thing. If disk space is a problem and you actually just care about the music and not the videos, you can also use it to download just the soundtrack of each video as an mp3.)
posted by trig at 4:18 AM on February 6, 2016


Response by poster: Bah, that list I somehow generated of my playlist only gave me 100 videos, not all 800+. And they're not all music, they're anything from short documentaries to Let's Plays to crafty vids all sorts of things. And our Internet connection here is not at all robust. So yes, downloading days upon days of content is a terrible idea.
posted by divabat at 5:49 AM on February 6, 2016


« Older Where to work in web design outside the US?   |   Too Many Books Newer »
This thread is closed to new comments.