The obvious (to me) solution is to preload the videos in my watch later playlist, and download them in the background all day long. This turns out to not be a terribly hard thing to do:
- Use youtube-dl to download the files. I may need to write my own playlist parser, as I would want to remove the videos from the yt side playlist once I have a local copy. This also allows me to limit the bandwidth used, so I can be sure that I'm not flooding out my regular internet usage.
- Push file locations, the channel names, the upload date, and some other status variables into a database table.
- Construct a channel quality rating that ranks the videos in the database.
- My quick thought here is to do something where a video gets a +fraction, based on how much is watched. That way, a shitty video I skip after five seconds puts a down weight on that channel, but a video I watch all the way through pushes up the channel weight.
- Next, there probably needs to be a time weight. Today's things should weight higher than yesterday, yesterday higher than last week, but this probably needs to turn around so that a video from a month ago is ranked higher than two weeks ago. This should help prevent videos from sitting around forever.
- Something to denote a sequential series of videos, so that part 1 is always watched before part 2. Probably something title/keyword based.
- Some other keyword based rating. "Pikachu" probably should rank higher than "trains."
- Using the various weights, construct a playlist to watch.
- Pass the playlist into a perl-wrapper for mplayer, using the -slave option to mplayer, where the perl catches and passes keyboard controls to mplayer, and makes database changes as well.
Really, this is basically writing a database schema, and then writing a couple of short perl scripts that basically have to do database queries and call other programs. Maybe I can get this done this weekend.
- Rabbits in Japan.
- Trees in Japan.
- That's kind of cool. If that's cheap enough, it might be worth getting one and bolting it to the back of my TV and using that as my mythtv frontend. I'm pretty sure that's powerful enough, plus an integrated IR sensor means I don't have to rely on a crappy usb one.
- Saddest turtle.
- I saw this, and was all "oh, man, those are great looking pancakes," and then I realized it's French toast, and I wanted it even more.
No comments:
Post a Comment