Visual effect of the different tblend functions in FFmpeg

FFmpeg is a fantastic resource for doing all sorts of video manipulations from the terminal. However, it has a lot of features, and it is not always easy to understand what they all mean. I was interested in understanding more about how the tblend function works. This is a function that blends successive frames in 30 different ways. To get a visual understanding of how the different operations work, I decided to try them all out on the same video file....

November 6, 2020 · 2 min · 217 words · ARJ

Pixel array images of long videos in FFmpeg

Continuing my explorations of FFmpeg for video visualization, today I came across this very nice blog post on creating “pixel array” images of videos. Here the idea is to reduce every single frame into only one pixel, and to plot this next to each other on a line. Of course, I wanted to try this out myself. I find that creating motiongrams or videograms is a good way to visualize the content of videos....

March 20, 2020 · 3 min · 428 words · ARJ

Convert MPEG-2 files to MPEG-4

{width=“300”} 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....

March 19, 2020 · 2 min · 267 words · ARJ

Flattening Ricoh Theta 360-degree videos using FFmpeg

I am continuing my explorations of the great terminal-based video tool FFmpeg. Now I wanted to see if I could “flatten” a 360-degree video recorded with a Ricoh Theta camera. These cameras contain two fisheye lenses, capturing two 180-degree videos next to each other. This results in video files like the one I show a screenshot of below. These files are not very useful to watch or work with, so we need to somehow “flatten” them into a more meaningful video file....

March 15, 2020 · 2 min · 223 words · ARJ

Creating different types of keyframe displays with FFmpeg

In some recent posts I have explored the creation of motiongrams and average images, multi-exposure displays, and image masks. In this blog post I will explore different ways of generating keyframe displays using the very handy command line tool FFmpeg. As in the previous posts, I will use a contemporary dance video from the AIST Dance Video Database as an example: The first attempt is to create a 3x3 grid image by just sampling frames from the original image....

March 1, 2020 · 4 min · 761 words · ARJ

Creating image masks from video file

As part of my exploration in creating multi-exposure keyframe image displays with FFmpeg and ImageMagick, I tried out a number of things that did not help solve the initial problem but still could be interesting for other things. Most interesting was the automagic creation of image masks from a video file. I will use a contemporary dance video from the AIST Dance Video Database as an example: The first step is to extract keyframes from the video file using this one-liner ffmpeg command:...

February 21, 2020 · 3 min · 510 words · ARJ

Creating multi-exposure keyframe image displays with FFmpeg and ImageMagick

While I was testing visualization of some videos from the AIST database earlier today, I wanted to also create some “keyframe image displays”. This can be seen as a way of doing multi-exposure photography, and should be quite straightforward to do. Still it took me quite some time to figure out exactly how to implement it. It may be that I was searching for the wrong things, but in case anyone else is looking for the same, here is a quick write up....

February 21, 2020 · 2 min · 419 words · ARJ

Converting MXF files to MP4 with FFmpeg

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....

November 3, 2019 · 1 min · 200 words · ARJ

Trim video files using FFmpeg

This is a note to self, and hopefully others, about how to easily and quickly trim videos without recompressing the file. I often have long video recordings that I want to split or trim. Splitting and trimming are temporal transformations and should not be confused with the spatial transformation cropping. Cropping a video means cutting out parts of the image, and I have another blog post on cropping video files using FFmpeg....

May 18, 2018 · 2 min · 360 words · ARJ