17 Mar
2019
Skyfill released!

Most drones (UAVs) cannot look straight up to photograph the sky above them. As a result, spherical panoramas made with drones tend to have a gap in the sky. Some drones, like my DJI Mavic 2, can fill in this gap automatically while generating a preview. However, when I stitch the photos myself to get a better quality output, there is still that sky gap. I got fed up with having to choose between a nice sky or a nice overall image, so I did what developers do and made my own software: Skyfill. Skyfill allows you to do fill in the gap in the sky in high-resolution images.

Original image: Before applying Skyfill

Skyfilled image: After applying Skyfill

For more info see the project on Gitlab, or just download the software.

Thanks to Ork de Rooij for his help getting the pixels right.


21 Jan
2019
FFmpeg and DJI D-Log on the Mavic 2 Pro

To properly see a video recorded with a DJI Mavic 2 Pro in D-log colours, it needs conversion. This can be done with the cube file provided by DJI. Such cube files contain the lookup table (LUT) to turn the bland colours into proper ones when viewing with a run-of-the-mill viewer like MPlayer, VLC, Windows Media Player, etc.

Unfortunately, DJI's cube file is incompatibe with FFmpeg. It should work with this command, but doesn't:

ffmpeg -i input_file.mp4 -c:v h264 -crf 21 \
    -vf lut3d='dlog-to-rec709.cube' output_file.mp4

This results in an error "3D LUT is empty" from FFmpeg. Fortunately, this is easily fixed. Just open the .cube file in any text editor, and find the line LUT_3D_SIZE 33. There is a tab character between the LUT_3D_SIZE and 33, and even though this is fine according to the specifications, FFmpeg doesn't like it. Just replace it with a space, so change:

LUT_3D_SIZE<tab>33

into:

LUT_3D_SIZE<space>33

Save the file, and you're done. The above ffmpeg command will now just work.

Update: this incompatibility has been fixed in FFmpeg, and will be part of a future release (current release is 4.1).


16 Sep
2018
Python-RSA 4.0 released!

After over two years of silence, Python-RSA 4.0 has been released! There are many improvements and also backward-incompatible changes (hence the increase of the major version number).

Get it while it's hot at the Python Package Index, or just install with pip install --upgrade rsa.


07 Feb
2018
All mail is mine

While I'm doing web development I want to have an email server that ensures that all mail will end up in my mailbox. To this end I set up Postfix with this rule in main.cf:

header_checks = regexp:/etc/postfix/header_checks.regexp

The header_checks.regexp then contains:

/^To:/ REDIRECT sybren+keep-local@my.domain

This results in all mail being sent via my SMTP server is delivered to my mailbox, regardless of who it's intended for.


08 May
2017
Python FlickrAPI 2.3 released

A new version of the Python FlickrAPI has been released. You can download or upgrade it using pip3 install -U flickrapi.

Changes are: