I was fascinated by a live camera feed showing a UK street since the start of lockdown on 23 March 2020, as it shows how pedestrians are interpreting the 2m physical distancing rule.
Some of the data from this camera was incorporated into a very nice ROLSI blog article written by Eric Laurier, Magnus Hamann and Liz Stokoe, with which I contributed, on the emergence of the “social gap”.
I thought others might find it helpful to read a quick guide to capturing video from live cameras – it’s a great way to quickly get some dirty data to test a working hunch or make a approximate analysis.
There are thousands of live cameras streaming to YouTube, but it can be a bit tedious to capture more than a few seconds via simpler screenshot methods.
NB: Before proceeding with this for research purposes, check that it complies with relevant regional/institutional ethical guidelines.
Step 1: Download and configure youtube-dl
Youtube-dl is a command-line utility, which means you run it from the terminal window of your operating system of choice – it works fine on any Unix, Windows, or Mac Bone.
Don’t be intimidated if you’ve never used a command line before, you won’t have to do much beyond some copy and paste.
I can’t do an installation tutorial, but there are plenty online:
Mac:
Windows:
I assume if you are a Unix user you know how to do this.
Step 2: Copy and Paste the Stream Video ID
Each Youtube video has a video ID that you can copy from your browser’s address bar. Here’s the one I used for the blog post mentioned above – which we’ve affectionately nicknamed the “corpus kebab”. The video ID is circled in red:
Step 3: Use youtube-dl to start collecting your video data
This part is a bit hacky – as it doesn’t really use the software as intended or documented, so I created a short how-to video. There might be better ways. If so, let me know!
As I mention in this video, it’s probably best not to leave youtube-dl running on a stream for too long, because you might end up losing your video if something interrupts the stream. I captured up to half an hour at a time.
It’s possible to create scripts and automated actions for a variety of operating systems to do all of this for you on a schedule – but if you need large video archives, I recommend contacting the stream owner to see if they can just send you their high-quality YouTube archives.