Glitch Cards

Great news today about David Miranda's Case , but I can't help but feel down with the direction of the country. I can see British law being deemed incompatible with the ECHR being used to strengthen arguments against being a signatory to ECHR and part of the EU.

At home we have GCHQ dismantling secure communications at every turn. The low price of oil is causing a down turn up here and it doesn't look like there is bright future. Sometimes it is hard to stay positive when you let the real world seep in.

While I sit numbly at my desk I like to restlessly fumble with anything at hand. This week it has been this awesome mind bending deck of cards . I have already had many visitors complain my cards are misprinted and hurt their head, this real world glitch is doing well. The glitch_art sub reddit contains many more examples of images like these. None quite as satisfying as holding these 'broken' playing cards.

Setting up xorg on the pi

The Raspberry Pi page on the FreeBSD Wiki links to a blogpost about setting up xorg on the Pi. That post was written back in 2013 and most of the information there seems to be out of date.

I set up X on a Pi at the end of December 2015, this information is up to date for r292413. pkg is now available on arm images so there is no need to build everything from ports, considering tools like tmux could take 6 hours to build on the pi itself this is a huge improvement. I installed the following packages to get X up and running on the Pi:

# pkg install xorg xf86-video-scfb i3

The Pi isn't able to auto detect the X configuration, I looked for a while for a config that would work. Eventually I dug the following one from a mailing list post. Place the following into /etc/xorg.conf:

Section "Device"
    Identifier "Generic FB"
    Driver "scfb"
EndSection

Section "Screen"
    Identifier "Screen"
    Device "Generic FB"
    Monitor "Monitor"
    SubSection "Display"
        Depth 16 #24 32
    EndSubsection
EndSection

With a minimal .xinitrc I was then able to start an X server with i3:

exec i3

Making GIFS with FFMPEG

ffmpeg can now make gifs in a single step, no longer do you have to generate frames then pass them into ImageMagick. For most of the videos I have tried the initial gif from ffmpeg hasn't been very good.

I found a stackoverflow post that describes a two step process for generating gifs with ffmpeg that has great results. The first step generates a palette from the source video, then this palette is used as a filter when converting the video into a gif.

ffmpeg -i input.mov -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png

Output the GIF using the palette:

ffmpeg  -i input.mov -i palette.png -filter_complex "fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif

The improvement is more evident if you click and watch the full size gifs side by side. The stackoverflow post links a blog post with even more information on generating high quality gifs from video .

#!/bin/sh

if [ "$#" -ne 1 ]; then
    echo "usage: makegif filename.mp4"
    exit 1
fi

input=$1
filename="${input%.*}"

ffmpeg -y -i $input -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png
ffmpeg -y -i $input -i palette.png -filter_complex "fps=10,scale=0:-1:flags=lanczos[x];[x][1:v]paletteuse" $filename.gif

The Thirty Second Chaos Communication Congress

I still can't describe CCC, you have to go.

I wrote a post about how to survive congress, but didn't publish it. It contained a list a little like this:

  • All of the talks are recorded, streamed and put online at media.ccc.de.
  • The self organised sessions are not recorded.
  • The most interesting things are happening at the assemblies.

These points hold true, my original suggestion because the talks are available after the fact there isn't much point sitting in the lectures. At 32c3 I didn't attend any of the talks, this was a mistake. I really regret not going to any talks.

Going to the talks gives you something to talk about with the people at CCC.

The self organised sessions I went to were great and hanging out with people at their assemblies and at the Scottish Consulate was great. If I had been in a lecture instead of at our table I definitely would have missed #toiletparty . But I think if I had gone to some of the talks early each day I would have gotten much more out of the event.

Next CCC I will head to the event with more of a plan. I don't think there is a right way to do congress, it is just too insane, but I will try to go to each one in a different way.

DSO138 Kit

Around the December holidays I received three sets of the jyetech lcd scope kit. This cheap kit (~£10) builds a small low frequency (1Msps) oscilloscope.

In all it took me about 2 hours to solder everything together, that includes me misplacing a resistor and a capacitor. I wish I had sorted the resistors with a multimeter that scales automatically before starting.

I am planning to build these kits into some audio projects later in the year, getting three of them was great luck. The kit was really straightforward to build and didn't take too long, there are serial logging features on the board as well. This kit could be built into a portable work bench without much thought.