The boundaries of Data Visualization

It is always great fun to try and find patterns in vast amounts of data. Sometimes you find causation, other times just spurious correlation, but it’s a great excercise and the insight you get can be surprising.

For a while, I have been wearing a light sensor that measures the surrounding light. The light that is around us, everywhere we go. It’s intensity and color. These graphs below are just two data points from January and April. Each horizontal pixel represents one minute, with data ranging from 6 am to 8 pm. You can see how the light changes from winter to spring, but as I know my daily routines, looking at these data reminds me of the course of events on the represented days.

Changes over time can be shown well in a time lapse animation.

Power point play

My nephew’s laptop is so old, he can’t play fifa. Instead, he animates soccer games in Powerpoint.

Dynamic Adaptive Streaming over HTTP (MPEG-DASH) for everyone

I had a simple dream. A dream of embedding videos in a web page without using third party services such as youtube or vimeo. For a while it seemed that I found the solution: using ffmpeg to convert the source videos to highly optimized h264 mp4 files. I wrote about my process before. The drawback is, that you only get one quality setting. Use a high bitrate and the video will load slowly or stutter on slow connections. Use a low bitrate and it will load smoothly but never looked quite as beautiful as it should. You can never win.

Luckily, there is a solution: Dynamic Adaptive Streaming over HTTP (MPEG-DASH). The concept is quite simple: you generate a few versions of your video with different bitrates, a manifest file that links to those versions, and let the browser decide - according to the current bandwidth - which version to load.

But see for yourself:
A single page with three autoplaying videos, using the standard html5 video.
And the same page, but with MPEG DASH.

Every modern browser supports MPEG-DASH through the use of media source extensions. Well, except iOS Safari and Opera Mini. For those, an additional HLS stream - or a fallback to a normal mp4 file - can be used. Media source extension support in the browsers means that you still have to use an additional js player such as dash.js or shaka player to play your MPEG DASH streams.

So, lets convert our videos with some command line magic. You will need ffmpeg for the conversion and MP4box(part of gpac) to create the manifest file. On a mac, the easiest way to get those is through Homebrew.

brew install ffmpeg gpac

Convert the source file called input.mov into an audio file and two video files:

    ffmpeg -y -i "input.mov" -c:a aac -b:a 192k -vn "output_audio.m4a"

    ffmpeg -y -i "input.mov" -preset slow -tune film -vsync passthrough -an -c:v libx264 -x264opts 'keyint=25:min-keyint=25:no-scenecut' -crf 22  -maxrate 5000k -bufsize 10000k -pix_fmt yuv420p -f mp4 "output_5000.mp4"

    ffmpeg -y -i "input.mov" -preset slow -tune film -vsync passthrough -an -c:v libx264 -x264opts 'keyint=25:min-keyint=25:no-scenecut' -crf 23  -maxrate 2000k -bufsize 4000k -pix_fmt yuv420p -f mp4 "output_2000.mp4"

What do all those options mean?

V.I Lenin died and left the stumps behind

What do we see here? On the left is a papier-mâché box, with a Palekh style miniature on it. It is dated 1961. The style developed after icon painters from the city of Palekh had to find new jobs following the revolution of 1917. The painting on the box depicts the tree stumps on which Vladimir Ilich Lenin used to rest and work. In the distance a foreign delegation looks on.

On the right, Fidel Castro is laying flowers to the tree stumps, on which Lenin used to sit and work. I repeat, Fidel Alejandro Castro Ruz is laying dying flowers to the dead tree stumps on which the deceased Vladimir Ilich Lenin used to rest and work.

The thing with the stumps is quite amazing in itself. How else could you stage the absence of a person if not by the stumps that signify the absence of trees that stood there once, tall and proud. The person is long gone and only the absence of the trees is left.

Sandwich