Renaming image files with date and time

In this post I write about how it is possible rename all the photos in a folder based on the date and time information stored in the file. I mainly take photos with my mobile phone these days (a Samsung Galaxy Ultra S23) but occasionnaly also use “regular” cameras. As opposed to my phone, which saves the files with a filename that includes date and time (YYYYMMDD_HHMMSS.jpg), these cameras typically just use some random name (e....

November 29, 2024 · 2 min · 322 words · ARJ

Why I don't like MS Teams

We have MS Teams at the University of Oslo (as in many other places), and it is increasingly used by administrative staff. Some academics use it as well, but less so in my experience. I use it when other people force me to, but I would never force others to use it. In this blog post, I explain why. No Linux support I have been using exclusively Linux-based operating systems for more than ten years....

October 18, 2024 · 4 min · 800 words · ARJ

Editing PDF metadata

Sometimes it is necessary to check, remove or modify the metadata of PDF files. Here is a quick post to show how it can be done in the terminal on Ubuntu Checking PDF metadata Most PDF viewers have an option for showing the metadata of PDF files. This can also be done in the terminal using the “pdfinfo” command-line tool. First, we need to install the “poppler-utils” package: sudo apt install poppler-utils Once installed, you can check the metadata by using the following command:...

April 10, 2023 · 1 min · 186 words · ARJ

Optimizing JPEG files

I have previously written about how to resize all the images in a folder. That script was based on lossy compression of the files. However, there are also tools for optimizing image files losslessly. One approach is to use the.jpgoptim](https://github.com/tjko.jpgoptim) function available on ubuntu. Here is an excellent explanation of how it works. Lossless optimization As part of moving my blog to Hugo, I took the opportunity to optimize all the images in all my image folders....

December 9, 2022 · 1 min · 168 words · ARJ

Convert HEIC photos to JPEG

A quick note-to-self about how I managed to download a bunch of photos from an iPhone and convert them to.jpg on my laptop running Ubuntu 22.04. As opposed to Android phones, iPhones do not show up as a regular disk with easy access to the DCIM folder storing photos. Fortunately, Rapid Photo Downloader managed to launch the iPhone and find all the images. Unfortunately, all the files were stored as HEIC files, using the High Efficiency Image File Format....

September 18, 2022 · 1 min · 164 words · ARJ

Convert a folder of LibreOffice .ODT files to .DOCX files

I don’t spend much time in traditional “word processors”, but when I do, it is usually in LibreOffice. Then I prefer to save the files in the native .ODT format. But it happens that I need to send a bunch of files to someone that prefers .DOCX files. Instead of manually converting all the files, here is a short one-liner that does the trick using the magical pandoc, the go-to tool for converting text documents....

August 13, 2022 · 1 min · 107 words · ARJ

Add fade-in and fade-out programmatically with FFmpeg

There is always a need to add fade-in and fade-out to audio tracks. Here is a way of doing it for a bunch of video files. It may come in handy with the audio normalization script I have shown previously. That script is based on continuously normalizing the audio, which may result in some noise in the beginning and end (because there is little/no sound in those parts, hence they are normalized more)....

August 9, 2022 · 2 min · 285 words · ARJ

Export images from a PDF file

I have previously written about how to export each of the pages of a PDF file as an image. That works well for, for example, presentation slides that should go on a web page. But sometimes there is a need to export only the images within a page. This can be achieved with a small command line tool called pdfimages. One way of using it is: pdfimages -p -png file.pdf image This will export all images in file....

June 16, 2022 · 1 min · 135 words · ARJ

Adding subtitles to videos

In my ever-growing collection of FFmpeg-related blog posts, I will today show how to add subtitles to videos. These tricks are based on the need to create a captioned version of a video I made to introduce the Workshop on NIME Archiving for the 2022 edition of the International Conference on New Interfaces for Musical Expression (NIME). This is the video I discuss in this blog post: Note that YouTube supports turning on and off the subtitles (CC button)....

June 11, 2022 · 6 min · 1193 words · ARJ

Em-dash is not a hyphen

I have been doing quite a lot of manuscript editing recently and realize that many people—including academics—don’t understand the differences between the symbols hyphen, en-dash, and em-dash. So here is a quick explanation: hyphen (-): is used to join words (“music-related”). You type this character with the Minus key on the keyboard, so it is the easiest one to use. en-dash (–): is used to explain relationships between two concepts (“action–couplings”) or in number series (0–100)....

May 13, 2022 · 2 min · 327 words · ARJ