Convert WebVTT to a Transcript using Python


YouTube showing subtitles.

I want to convert YouTube's auto-generated subtitles into a plain transcript. Why is this so hard? This blog post gives a more detailed explanation than my answer to this StackOverflow question. Here's what the subtitles look like when you view a video: And here's what the code which generates those subtitles looks like: 00:00:00.930 --> […] Read More

How to detect 3D video?


Still from the moview Finding Nemo. The image is split side by side.

Here's an interesting conundrum. My TV can automatically detect when 3D video is being played and offers to switch into 3D mode - but how does the detection work? This post will give you a few strategies for detecting 3D images using Python. Firstly, some terminology. 3D videos are usually saved either as Side-By-Side images, […] Read More

Reconstructing 3D Models from The Last Jedi


Different depth maps of various accuracy

A quick tutorial in how to recover 3D information from your favourite 3D movies. In this example, we'll be using Star Wars - The Last Jedi. tl;dr? Here's the end result (this video is silent): Grab the code on GitHub. Let's go! Take a screenshot of your favourite scene. Something with a clearly defined foreground […] Read More

Adjusting timestamps on images with Python


As ever, mostly notes to myself. I have a bunch of old images which don't have any timestamp associated with them. This quick Python script will add a DateTime EXIF metadata tag to an image. This uses piexif which can be installed using pip install piexif This simple script reads a photo, adds a timestamp, […] Read More

Replacing IFTTT - Part 1: RSS & Tumblr


I've grown to loath IFTTT. What started out as a cool way to plug internet things together has being an opaque an uncommunicative company with no real interest in customer service. That's not surprising, I suppose, its paying customers are the companies who can't be bothered to develop a proper API and so just shove […] Read More

Which Twitter User Receives The Most Citations on Wikipedia?


I few days ago, I was somewhat surprised to find that one of my Tweets had been used as a citation in Wikipedia! I began to wonder - how often are Tweets used in citations? It's possible to search for your own Tweets using this (somewhat obscure) link: https://en.wikipedia.org/w/index.php?title=Special%3ALinkSearch&target=twitter.com%2Fedent Just edit the end of it […] Read More

Track deletions on Twitter - AKA build your own Politwoops


Twitter, as part of its never-ending quest to alienate users and appease the rich and powerful, have shut down Politwoops accounts. Politwoops monitored politicians' Twitter accounts and noted when they deleted a tweet. Most of the time deletions were done for the same reason we all deleted content - mispellings, broken links, etc - but […] Read More

Idiot's Guide To Getting Started with Raspberry Pi's GPIO Pins


The idiot in question being... me! It's been ages since I did any real electronics. Most of my work involves software and pre-assembled bits of kit. I thought that it was time I reacquainted myself with the joys of electricity 🙂 Because I'm fundamentally lazy, I purchased the all-in-one Raspberry Pi 2 kit from Vilros. […] Read More