Terence Eden. He has a beard and is smiling.

Terence Eden’s Blog

Theme Switcher:

Using YouTube to Transcode Videos to DASH on the Command Line

· 9 comments · 950 words · Viewed ~2,280 times


A white plastic desktop phone with QWERTY keyboard and a video screen.

This is part of my redecentralisation efforts to liberate my videos from YouTube. MPEG-DASH is a simple method of streaming videos which doesn't require any specialised server software. You convert a high resolution video into a series of smaller resolution videos. You chop each of the videos up into several chunks. As the video plays, your browser then decides which chunk of the video to load…

Previewing Circular Avatars

· 150 words · Viewed ~256 times


Play with the demo I was lucky enough to go to Number 10 Downing Street for a meeting a few weeks ago. A perfect opportunity for a photo of me by that famous door. Being the vain man that I am, I wanted to set it as my avatar photo. But Twitter and other social networks now use circular avatars. The "10" has been obliterated and part of my head is missing. So I've created a quick way to …

Easy Tutorial For Getting Twitter Friends Using Python & Tweepy

· 1 comment · 850 words · Viewed ~3,735 times


Here's a very simple introduction to getting started with Tweepy - a Python program which lets you access Twitter. This will work on small computers like the Raspberry Pi. Everything here takes place in the Terminal on the Command Line. This should work on Windows and Mac - but I'm using Linux. Get Python Open your terminal or command prompt. Type python You should see something like: …

Long Exposures - Creating Average Frames From Movies

· 3 comments · 750 words · Viewed ~8,233 times


I read a Guardian article about an artist who set up an analogue camera in front of their TV, set it to long exposure, and set a movie playing. The result was a rather wonderful collection of images. You can see more of Jason Shulman's works Is there a way to automate this process? Yes! Here's my attempt at a "Long Exposure" of "Taxi Driver". It's not the same as Shulmans's process, but I …

Fixing Broken Zip Files from Bandcamp - File name too long

· 300 words · Viewed ~566 times


I recently downloaded an album from Bandcamp. On trying to extract the zip file using Ubuntu, I got the error "File name too long." This is a known problem with Bandcamp. If you have a problem with long filenames in zip files, here's how to fix it. Quick Solution unzip -p -c whatever.zip "filename.ogg" > shortname.ogg That will extract a specific file from the zip and then rename it before …

Amazon Alexa and Solar Panels

· 5 comments · 1,150 words · Viewed ~13,049 times


I can now query my solar panels via my Alexa Amazon Dot Echo thingie (why so many names?). https://shkspr.mobi/blog/wp-content/uploads/2017/05/VID_20170501_161804.webm I flatter myself as a reasonably competent techie and programmer, but fuck me AWS Lambdas and Alexa skills are a right pile of shite! Sorry if that sounds a bit harsh, but they're a pain in the arse to get anything done. I…

Converting filenames to Title Case in Linux

· 12 comments · 150 words · Viewed ~2,828 times


Linux bash terminal icon.

Here's a simple bash one-liner to convert mixed-case filenames into Title Case: rename 's/(\S+)/\u\L$1/g' * This forces the file extension to lower-case as well. Use rename -n to test the command without changing anything on the filesystem. (Adapted from this PerlMonks FAQ.) Background I have a bunch of inconsistently named files like: HERE COMES THE SUN.mp3 hey jude.mp3 The lOng and…

Sort Folders Into Alphabetic Sub-Folders

· 1 comment · 300 words · Viewed ~1,077 times


Linux bash terminal icon.

Scratching my own itch. I have a bunch of directories which I want moved into alphabetic sub-directories. This is handy is you have a bunch of MP3s, books, or other catalogued files. This bash script moves a top level directory (and all the files and subdirectories under it), to a folder based on the (upper-case) version of the first character of the directory name. #!/bin/bash for dir in */…

Add date metadata to MP4 videos

· 2 comments · 150 words · Viewed ~3,699 times


Linux bash terminal icon.

As ever, notes to myself. I hope you appreciate this future me! Photographs often contain EXIF metadata - really useful for finding out when a photo was taken. It turns out that you can add similar metadata to MP4 format videos. Here's how to do it with ffmpeg on Ubuntu Linux. The magic option is -metadata creation_time="2015-12-25T12:34:56" Stick that in when you're encoding your video and it …

Replacing IFTTT - Part 1: RSS & Tumblr

· 5 comments · 450 words · Viewed ~616 times


Screenshot from If This Then That.

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 some integrations up there. But it is annoying for those of us who want…

Converting RAR to ZIP in Linux

· 6 comments · 400 words · Viewed ~13,282 times


Linux bash terminal icon.

As ever, mostly notes to myself. RAR is a silly and proprietary format. I prefer free software and I find that ZIP files are smaller and decompress faster. Not everyone agrees, and that's fine. Assuming you've downloaded a RAR file and want to convert it to ZIP, what's the easiest way? Install P7Zip sudo apt-get install p7zip-full p7zip-rar Script This basic bash script will Extract a…

Easy ways to add watermarks to images and videos in Linux

· 1 comment · 450 words · Viewed ~8,669 times


Mostly notes to myself :-) Here is a quick way to add watermarks to photos and videos. All Linux command line based - so perfect if you've got a lot of images you want to manipulate. Here is a delightful photo I've taken of a bee covered in pollen. I want to add a little copyright notice to it in order to discourage people using it without permission. This command uses imagemagick's…