I take a lot of timelapse shots with a GoPro camera. Usually, I do this with the camera’s photo setting instead of the video setting. That is because I find it easier to delete unwanted pictures from the series that way. It also simplifies selecting individual photos when I want that. But then I need a way to create a timelapse video from the photos easily.
This is a note to self, and could potentially also be useful to others in need of converting “old-school” MPEG-2 files into more modern MPEG-4 files using FFmpeg.
In the fourMs lab we have a bunch of Canon XF105 video cameras that record .MXF files with MPEG-2 compression. This is not a very useful format for other things we are doing, so I often have to recompress them to something else.
Inspecting one of the files, I just also discovered that they record the audio onto two mono channels:
So I also want to merge these two mono tracks (which are the left and right inputs of the camera) to a stereo track. FFmpeg comes in handy (as always), and I figured out that this little one-liner will do the trick:
How do you create full-screen images from each of the slides of a Google Docs presentation without too much manual work? For the previous blog post on my Munin keynote, I wanted to include some pictures from my 90-slide presentation. There is probably a point and click solution to this problem, but it is even more fun to use some command line tools to help out. These commands have been tested on Ubuntu 19.10, but should probably work on many other systems as well, as long as you have installed pdfseparate and convert.
After exporting a PDF from the Google Presentation, I made a separate PDF file of each slide using this command:
pdfseparate input.pdf output%d.pdf
This creates a bunch of PDF files with a running number. Then I ran this little for loop:
for i in *.pdf; do name=`echo $i | cut -d'.' -f1`; convert -density 200 "$i" "$name.png"; done
And voila, then I had nice PNG files of all my slides. I found that the trick is to use the “-density 200” setting (choose the density that suit your needs), since the default resolution and quality is too low.
We have a bunch of Canon XF105 at RITMO, a camera that records MXF files. This is not a particularly useful file format (unless for further processing). Since many of our recordings are just for documentation purposes, we often see the need to convert to MP4. Here I present two solutions for converting MXF files to MP4, both as individual files and a combined file from a folder. These are shell scripts based on the handy FFmpeg.
Convert individual MXF files to individual MP4 files
The first solution is based on converting a bunch of MXF files to individual MP4 files. This is practical if there are multiple, single shots.
Save the script above as mxf2mp4.sh, make it executable, with a command like:
chmod u+x mxf2mp4.sh
and run the file:
Convert a folder of MXF files to one MP4 file
The second solution is when we have made one long recording, which is split into individual MXF files of 1.9 GB size (the maximum size of FAT32-formatted drives) in the camera. Then the aim is to merge all of these to one MP4 file. This script will do the trick:
So I decided to install Ubuntu on my daughter’s new laptop, more specifically an HP Pavilion. The choice of this particular laptop was because it looked nice, and had good specs for the money. It was first after the purchase I read all the complaints people have about the weird UEFI implementation on HP laptops. So I started the install process with some worries.
Reading on various forums, people seemed to have been doing all sorts of strange things to be able to install Ubuntu on HP laptops, including modifying the UEFI setup, changing the BIOS, and so on. I recall that on my Lenovo laptop I had to work quite a bit to turn off all the fancy auto-Windows-stuff.
I am not sure if HP has changed something recently or not, but the final procedure was super-easy: I just hit the F9 button on startup and got a regular “old-school” boot selector. Here I chose the USB drive, and the Ubuntu installer fired up.
I have installed Linux (primarily various Ubuntu versions) on several laptops over the years, and it is very seldom that I get into problems with drivers. Also this time, things went smoothly; everything worked perfectly right after the install. I think it is crucial to continue repeating this message because I still hear people saying that it is tricky to get Ubuntu to play with different hardware. True, there used to be driver issues some years ago, but I haven’t experienced that in five years or so.