YouTube and Twitter APIs
An automated YouTube upload script is now working. Hopefully.
An automated YouTube upload script is now working. Hopefully.
I have so much free time in the mornings now! Now that I don’t have to scramble to write and/or post something every day hehe. I don’t really know what to do with myself anymore.
I recently reported some trouble with the YouTube Data API but I’m happy to report that that it’s now working. I’m running an automated script every day which pulls a video file from a directory and uploads it to YouTube.
The bad news is that: 1) You can’t populate the game name field through the API, 2) It’s hard as heck balls to put a video into a playlist through the API for inexplicable reasons, and 3) I haven’t yet worked out a way to easily tie individual video descriptions to video files on disk, so I just have to put a generic description on each video. So I still have to fill in those metadata fields manually, if I care to do so.
Windows does allow you to associate metadata with files on disk, and there’s a “Comments” tag that might work perfectly for holding a video description, but it seems to be limited to 256 characters. Also editing that metadata is a massive pain in the Windows Explorer UI.
The MP4 file format also has metadata tags I could use for holding titles and descriptions, and I have a handy tool called Mp3Tag which is actually quite good at editing said metadata in bulk (despite the old ugly Windows 95 interface), but … I don’t know how to read that metadata from a script yet. Maybe someday. (I vaguely remember finding command-line tools to extract MP3/MP4 metadata in the past. Maybe even ffmpeg can do it.)
Anyway it’s a work in progress. The point is, I don’t have to manually click-type-click-type-click-type-click through the YouTube web site to upload videos anymore. This year, I learned a new term for that kind of labor: “ClickOps.” I thought it was a pretty hilarious and accurate term. It’s soul-crushingly boring and time-consuming, for one thing, and it’s also prone to mistakes.
I also started doing some work with the Twitter API so I could write and/or find a tool to send tweets from the command-line. I thought I’d have to jump through a ton of hoops like I did with the YouTube API, but it’s a lot easier than I thought it would be. You just fill in some information about what you’re going to do, and it auto-approved me in seconds. I assume because I didn’t click any of the boxes that triggered red flags.
UPDATE: I forgot about this, but Mp3Tag is terrible for MP4 files. It takes forever to save changes, so we’re back to square one with the metadata.