Skip to main content

Hardware Independent Accelerated Video Processing in Linux

movie-reel-clipart-transp.png

Thinking about the significant amount of disk space that movies are using, I decided to revisit evaluating the question of transcoding them for archival purposes. I was also interested to see how much of the processing of movie files can be done in dedicated hardware instead of hogging the main CPU. Using an AMD Ryzen-2400G based desktop machine I decided to find out if there is dedicated hardware that I can use from the standard GNU/Linux applications for movies. In hindsight, I would never have expected to spend so much time on this post, but then again I now have a better understanding of many concepts in this area. Hopefully you can also profit, my dear reader.

Read more… (27 min remaining to read)

Using Tags in GThumb

exif-info-camera-image-playback.thumbnail.jpg

I guess most people have their own way of organizing lots of digital images efficiently. Most of them probably use databases for organization even though there are standardized ways to put metadata into the image files themselves. This blog post will detail my approach based on manipulating only the image files themselves rather than putting a database "on top", or other abstractions external to the files themselves.

The GThumb application from the GNOME Project is my preferred tool to organize digital images. Up until I wanted to work only on subsets of the original images, the standard functionality was good enough for my very amateurish needs. In the previous years we used to manually copy individual files into separate directories for different further processing. Such a procedure leaves a lot of duplicate files behind and does not record the selection process in the original files themselves. After cleaning up the left behinds from those previous years I set out to establish a better procedure this time. The aim was to enable an easy process to select pictures relevant for different groups of persons all the while recording the process in the original image files. The tagged files are then collected with a short script into individual directories for further processing, e.g. for creating a picture book out of them.

Read more… (9 min remaining to read)

VM Snapshots - I Love Them!

virt-manager.png

A while ago, as VirtualBox was loosing its attractiveness due to license changes, I converted my virtual machines to KVM ones managed by virt-manager. One of the features that I just love is the capability to take snapshots of the hard disks. As I do not know of an easy way to do this from the GUI, I simply use virsh which is part of the libvirt core distribution. Before trying something "dangerous", just take a snapshot. If the experiment was not successful, then it is just a simple command to undo all the latest changes. I learned to love this feature lately as I tried crazy stuff like converting a VMs hard disc from MBR to GPT partitioning and when I ended up in an unbootable system, I could simply revert to the previous snapshot. Having this feature available empowered me to try things that may break the system.

This short blog post is just intended to show with real transcripts how this works from the command line.

Read more… (2 min remaining to read)

Preserving Metadata With FFmpeg

ffmpeg-logo.png

The FFmpeg suite of multimedia tools is a very powerful toolkit, but sometimes its default behavior just plain surprises me. While I am totally impressed by its capability to stabilize videos taken by my mobile phone, it took me some time to realize that this processing step lost all the metadata. Of course, I did not expect this, and it is trivial to fix the script, but first you need to be aware that the problem even exists.

Read more… (5 min remaining to read)

Switching on Secure Boot in Debian

Big lock

My main desktop machine is an AMD Ryzen-2400G on an ASUS PRIME B350M-A motherboard. It came with secure boot disabled and as the first action I installed Debian on it. Back in early 2019, Debian 10 (i.e. Buster) was stable and based on an 4.19 kernel. I knew that the integrated Radeon Vega GPU of this SoC required a more recent kernel, so I used Debian testing (to become Bullseye) right from the beginning. It took me a bit of fiddling until two monitors worked correctly, but after that it became my main machine.

I did read about enabling secure boot back then, but it seemed the implementation for GNU/Linux systems had not been defined properly, and so I left it disabled. Now that I understand the process better, I want to use that additional level of security against unwanted software on my main desktop. This blog post will explain not only the basics but also follow through to the nitty-gritty of key handling. This will be in the context of Debian that I run on my machine, but we will also compare this to an Ubuntu laptop to get an idea on how the distributions differ in handling of this topic

Read more… (20 min remaining to read)

Icons, Site Search And More

Nikola logo

This blog post describes the changes to my blogging system which have happened in the last few weeks. Note that most of these were not externally visible as I have a manual "nikola deploy" strategy instead of deploying everything in a CI/CD pipeline. And so while the externally visible blog did not change, I worked on its substance internally at the same time as composing new posts.

Read more… (6 min remaining to read)

Inline Diagrams in Orgmode

orgmode-export.svg

Of course it is easy to include a diagram with a post, but the standard procedure to create/edit the diagram with an external GUI tool does not resonate with me. Even back in my diploma thesis I fell in love with Donald Knuth's MetaPost system to describe diagrams in a declarative way and let the tool do the drawing.

For some LaTeX Beamer presentations I used ditaa in the meantime but inside a make flow that took care of the dependencies. The diagrams and the presentation were strictly separated. For the blog posts I did not yet have a good solution, until I switched to blogging in orgmode. Compared to ReST and Asciidoc posts, Emacs orgmode provides a much richer ecosystem with lots of hooks into other systems by means of the org-babel system.

So by switching the post source format, blogging in orgmode should actually hook into e.g. Graphviz out of the box. And indeed with a little fine tuning, this is an amazingly elegant way to include visualizations in the posts.

As org-mode (through exporting to LaTex Beamer) has also become the source format of my presentations, this new freedom easily extends into presentations and even regular PDF documents by exporting to LaTeX only. So the means shown here to produce diagrams for the blog are also usable when you want to generate Beamer presentations or LaTeX documents. As we will see, the choice of output formats is linked to the targeted use-case.

Read more… (9 min remaining to read)

Delisted by DuckDuckGo

DuckDuckGo_logo_and_wordmark.png

While working on my blog as described in my recent post Blog internals, I came across the possibility to include a search engine into the blog directly. The Nikola documentation gives examples for DuckDuckGo and Google, and as I am skeptical of the data collection of Google, of course I tried DuckDuckGo first. The experiment returned no results whatsoever, so I was not sure if the integration into the website failed or if DuckDuckGo really did not return any results for my website.

Entering the search term site:lazy-evaluation.net into the search input field on the regular DuckDuckGo website showed that indeed there are no results whatsoever for my website. Ouch.

Trying the same search term with Google search reassured me that at least Google is still indexing my site.

As the other things regarding my blog were solved successfully, I returned to research the situation today.

Read more… (2 min remaining to read)

Blog internals (or learning new things to fix stuff)

nikola-50px-transparent.png

Recently I was made aware of a consequential GDPR ruling in Germany. The summary of the ruling is that a website owner was sentenced to pay a €100 fine to a visitor of his website because the website used Google hosted fonts. The visitor claimed that by loading the Google fonts, his IP address was exposed to the Google servers and this violates the GDPR.

Effectively this exposes every website in Germany using Google hosted web fonts to become the target of an €100 fine. At first, it seemed like a theoretic problem, but more recently it seems that people have turned this into a business-model (link is in German) and there now seem to be a wave of incidents based on this ruling. So it has become pretty urgent to fix this for web site owners in Germany.

Checking my Nikola generated site, I found that the zen theme that I use not only uses Google hosted fonts but also the Fontawesome icon set hosted on its own server. So I quickly decided that I need to switch those over to self-hosting before I get one of these lawyer mails. This blog post documents the things I learned on this journey which is still not over.

And I apologize in advance that this post has become rather large and very technical, but the things are really connected together so I decided not to split them out into smaller posts. I sincerely hope this was the right thing to do.

Read more… (17 min remaining to read)