The One with the Thoughts of Frans

Archive for Operating Systems

Less Noise and Louder Voice from Low Quality Microphone in Audacity

The basic problem: the various mics I own are all pretty terrible in their own way. This is how to lift it from unacceptable to bad, but similar principles apply to better mics as well. This post is dedicated to those who don’t put up annoying video tutorials lasting several minutes. Admittedly I could’ve recorded and uploaded this in a few minutes rather than the ten or so it took me to write this post, so that probably explains.

Disclaimer: I’m not an audio recording hobbyist, or I would have at least a low-end reasonable mic like the BM-800. This merely describes something incredibly basic I should’ve done last year with the integrated audio recorded by a Sony HDR-CX280E camera.

I’m not sure whether the mic on my phone or the one on my webcam is the best for voice. I think it might be my webcam, so that’s what I used for these samples.

The Recording

I recorded the phrase, “Etymologically, harvest and herfst are the same word.” (See here.)

Pretty terrible. This is how I sound on Skype.

Noise reduction

Luckily Audacity is clever enough to filter out noise. Select some noise, EffectNoise Reduction… and click Get Noise Profile. Then make sure to select the whole track, or at least everything where you want to apply the noise filter, and actually do it.


The final step is to apply a compressor, again through the Effect menu.


Finally, you could consider limiting your finished audio file. In this case it doesn’t really do anything but it can prevent clipping.


KOReader Beta 20180314

As one of the maintainers of KOReader, a versatile a document and image viewer for E Ink devices, I’m proud to announce the latest release.

This release adds support for the Kobo H2Ov2 thanks to @cairnsh. You need to use at least KSM 9 with update 1.

@dengste added a widget to configure the natural light on the Kobo H2Ov2 and the Kobo Aura One in #3744.


The Android x86 build is now a regular part of the nightly builds (see #3384 but it wasn’t finalized on the build server until koreader/koreader-misc#14).

We’d like to thank all contributors for their efforts. Some highlights include:

Full changelog


MariaDB Fix “Can’t init tc log” Error

I messed up my automation of backups, meaning that after two years my entire VPS had secretly filled up. This lead to MariaDB being unable to initialize. After taking care of the root cause MariaDB still refused to start.

$ sudo tail -3 /var/log/mysql/error.log
2018-02-20 12:07:45 140649776292416 [Note] Recovering after a crash using tc.log
2018-02-20 12:07:45 140649776292416 [ERROR] Can't init tc log
2018-02-20 12:07:45 140649776292416 [ERROR] Aborting

Stupidly, just removing the zero byte `/var/lib/mysql/tc.log` file took care of the problem.


Improving Gource Videos with Background and Audio

Gource videos have been popping up on my radar for several years now, but for some reason I decided to play around with it yesterday. My tweaks were very minor: much increased speed, avatars, a logo, a background image, and some music to go along with it.

I started with the avatars. To grab them, I used this script with a quick replacement for the error handling:

    if($rc != 200) {

        my $gh_url = "".$author."?size=".$size; 

        warn "fetching gh image for '$author' $email ($gh_url)...\n";

        my $rc = getstore($gh_url, $author_image_file);


That way users without Gravatars but a GitHub username in their commit message still get the one you’re used to seeing. I manually deleted all of the default GitHub no avatar images. That sounds like a lot of work, but you can just sort by size.

I did a quick inversion of the KOReader logo in GIMP. Nothing special there.

The background image I grabbed from Pixabay, a useful site for free photographs. The music I got from, something similar for music.

Now for the pièce de résistance, thanks to the Gource wiki:

gource -1920x1080 -a 0.1 -s 0.05 -i 0 --logo koreader-logo-inverted.png --user-image-dir .git/avatar/ --background-image fairyland-canyon-1632749_1920.jpg -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4

The most important aspect is the resolution and how fast or slow you want the video to be. Then once you have the video, you can mix in the audio:

ffmpeg -i gource.mp4 -i mindmapthat_-_Transmutation.mp3 -c:v copy -c:a aac -strict experimental -filter:a "volume=0.6" gource-muxed.mp4

Note that I lowered the volume of the music, more on that here. You could also play around with fade-outs, whether in Audacity or straight from ffmpeg. Also see my post on lossless audio cutting for when everything is good but you just want to trim the audio a little. That’s all!

CommentsTags: ,

Six Years of KOReader

This is a little experiment with Gource. Direct link to video here. KOReader is a document viewer for E Ink devices. It supports PDF, DjVu, XPS, CBT, CBZ, FB2, PDB, TXT, HTML, RTF, CHM, EPUB, DOC, MOBI, and ZIP files. It currently runs on Kindle, Kobo, PocketBook, Ubuntu Touch and Android devices. More information here.



Music: Transmutation by Kara Square (c) copyright 2017 Licensed under a Creative Commons Attribution (3.0) license. Ft: Spinningmerkaba

Also see…

Back in 2015 Landon Wilkins uploaded a visualization here.

Comments (2)Tags:

Android Version API Level

It’s in the docs, but I’m always losing it. So here’s a quick overview of some of the ones that are more important to me.

Android version API level
Android 8.1 27
Android 8.0 26
Android 6.0 23
Android 5.0 21
Android 4.1 16
Android 4.0.3, 4.0.4 15
Android 4.0, 4.0.1, 4.0.2 14
Android 2.3 9


KOReader Nightly 20180212

As one of the maintainers of KOReader, a versatile a document and image viewer for E Ink devices, I’m proud to announce the latest release.

Special thanks to @dengste this month for adding natural light support on the Kobo Aura One (#3679).

You can control the natural light feature on the Kobo Aura One through the regular frontlight widget and the frontlight gesture controller. The latter allows for controlling warmth by swiping on the right of the screen, and is accessible via ToolsMore pluginsFrontlight gesture controller.

Those who read two-column papers might like the new two-column navigation (@FranMarelli This does not work in conjunction with scroll mode.

Those willing to experiment can try the new Open with… option (#3651).

Finally, a little clarification on last month’s HTML dictionary support. We use MuPDF to render the HTML dictionary results. Unfortunately, MuPDF expects its input to be well-formed XHTML, meaning XML. When the HTML is tag soup instead, KOReader will fall back to a stripped version of the HTML dictionary entry. Should this be the case, you can manually fix up the output by adding a .lua file in the dictionary directory. Further details and a few examples are provided by @poire-z in #3611.

We’d like to thank all contributors for their efforts. Some highlights include:

  • Fix speedup of dictionaries init (@poire-z
  • Swipe down or tap on top left/right to access left/right reader menu tab directly (@nagyation
  • Menu: configure number of items per page, wrap entries (@robert00s
  • OPDS – add confirm when file exist in local destination (@robert00s
  • HTML dictionary link support (@TnS-hun
  • Update History and Last open document when move (cut and paste) file (@poire-z
  • Do not execute background runner if device is suspended (@Hzj-jie
  • [feat] Add NetworkManager:isConnected() (@Frenzie
  • Filemanager – sort by percent of book (@robert00s
  • [UX] Move “Go back to previous location” up one menu level (@Frenzie
  • Wikipedia: show images and allow interrupting queries (@poire-z
  • luasettings: backup previous file and auto-recover (@poire-z
  • epub metadata: support multiple authors (@poire-z
  • HtmlBoxWidget: fix selection when starting from end (@poire-z
  • Bump base: fix gray background instead of white on Kindle (@poire-z
  • Add MovableContainer: allow moving some widgets (@poire-z
  • Add menu item for toggling auto_book_status (@poire-z
  • [UX] Dict: scroll back with tap: go to bottom of prev definition (@poire-z
  • NewsDownloader: better exception handling and basic redirects (@mwoz123
  • [feat] Open with: choose which engine to use for file (@Frenzie
  • Menu: speed up rendering of long texts (@robert00s
  • cre full text search: fix inconsistencies (@poire-z
  • kobolight.plugin: Support for setting natural light (@dengste
  • Show vertical marker at original position when back from link (@poire-z
  • File manager: added ‘Go to letter’ (@robert00s
  • cre cache: allow for disabling compression (@poire-z
  • [feat] Two-column navigation (@FranMarelli
  • [fix] larger max font size for crengine (@Frenzie

Full changelog


Conveniently Developing an R Package

Half a decade ago I neglected to jot this down, so I had to figure it out again. Just in case someone landed here searching for the most basic R problem, you start the program using uppercase R, not lowercase r. Anyway, to work with a package in a git repository or some such the easiest method is the devtools package.


Without any parameters, the load_all() function from devtools loads the current directory without installing. You could effect the same with more keystrokes using load_all('./'), and of course you can pass any path instead of relying on the current working directory. But in combination with git I find it easiest to just stick with that. After you’ve made some changes in the source, just run load_all() again.


Why Windows Is Better Than PulseAudio

Wait, what? You heard me. On Windows you can set sample rates per sound card. It looks like this.

Setting one soundcard to 24 bit, 96 kHz in Windows. Windows refers to this as “Studio Quality.”

In PulseAudio you’re limited to a primary and secondary sample rate. I’ve actually been using pasuspender more, also because its AC3 passthrough never seemed to work.

CommentsTags: ,

Is My Firefox Out of Date?

When I logged in, WordPress tried to inform me that the particular browser I was using was out of date.

WordPress’ “Your browser is out of date” greeting.

So, is it?

Well, we can take a look at the Firefox ESR download page to find out.

The current version of Firefox ESR is 52.4.1, releasenotes here.

Nope. Still Firefox 52, which will remain supported until Firefox 60.

The Firefox support window. Source:

Always fun, these automated checks. 🙂


Older Entries »