In Defence of the Social Care Tax


The social care tax was dropped like a hot potato, but eventually something similar will become law.


Logitech C920 and FFMPEG


The Logitech C920 webcam is well supported on FreeBSD using webcamd, and some playing around has lead to the best quality full HD video being recorded using ffmpeg like this:

  • ffmpeg -f oss -i /dev/dsp1.0 -itsoffset 00:00:00.5 -report -f v4l2 -vcodec h264 -pix_fmt yuyv422 -video_size 1920x1080 -i /dev/video0 -copyinkf -vcodec copy -pix_fmt yuyv422 -framerate 30 output.mkv

Assuming /dev/video0 is the webcam, you may need to adjust if you have several recording devices, this command will record video from the webcam and store it in H.264 encoding in a Matroska container as output.mkv. The command arguments have the following meanings.

f oss
Audio device is of type OSS.
i /dev/dsp1.0
Audio input is from device /dev/dsp1.0.
itsoffset 00:00:00.5
Shift audio offset from frames by half a second.
Log verbose output to .log file in working directory.
f v4l2
Device is of type Video 4 Linux version 2.
vcodec h264
Input video codec is H.264.
Pixel formatting is yuyv422.
videosize 1920x1080
Set the video resolution to 1920 by 1080 (Full HD).
i /dev/video0
The input stream is to be recorded from /dev/video0, the webcam.
Copy non-key frame at the beginning of the video.
vcodec copy
Special value copy, means no encoding just copy the input to the output stream.
Output the same pixel format as was input.
framerate 30
Read the input at 30 frames per second.
Output to file called output.mkv.

That is all there is to it. Just press "q" when done recording.


Simple, Thread Safe Error Logging in C++


Simple C++ error logging framework with minimal features and an intuitive interface.


Openbox XDG Menu Generator


Openbox with tint2 is very hard to beat for a stable, high-performance desktop, but writing the menu can be a real pain, so I have written this little Python script to write a menu based on the XDG specification.

When run the script will generate generic menus based on the XDG top level classifications, with a few modifications for brevity and clarity. For example AudioVideo is renamed to Multimedia and the Education classification is grouped with Science.

After generating the menu the script will ask a few questions to allow you to establish a few handy shourtcuts to often used programs and create a custom configuration menu for theme selection, printer management etc.

Below is the output from a sample run, the final options will dump the generated menu to screen for inspection or commit to openbox by writing ~/.config/openbox/menu.xml, while backing up any existing one to ~/.config/openbox/menu.xml.old.

  • ./obxdgmenu.py
  • TerminalEmulator
  • 1. XTerm
  • 2. ROXTerm
  • Select Favourite: 2
  • WebBrowser
  • 1. Firefox Web Browser
  • Select Favourite: 1
  • Email
  • 1. Claws Mail
  • Select Favourite: 1
  •     Include Customise Look and Feel? [y/N]: y
  •     Include Panel Manager? [y/N]: y
  •     Include Authorisations? [y/N]: n
  •     Include Openbox Configuration Manager? [y/N]: y
  • 1. Dump Configuration to Screen.
  • 2. Dump Menu to Screen.
  • w. Commit Menu to Openbox.
  • q. Quit.
  • Select Option:

FreeBSD 11 on Dell XPS13


FreeBSD is a stable, fast and well organized UNIX-like operating system which sees much use on servers. Alas, it suffers from worse-than-Linux consumer hardware support. Nonetheless, it is possible to run FreeBSD on all but the most recent hardware. This article covers how to run FreeBSD 11 on a Dell XPS13 laptop with a Haswell processor.