High motion quality webm

ffmpeg by default aims for the lowest bitrate it can manage for a video when encoding webm. I have been happy with this so far, but the video I grabbed of a waterfall today does not look good in this mode. I tried changing the bitrate options as discussed on the ffmpeg wiki , I thought I would show what you can expect with a couple of differnet rates.

The original mov file generated from my camera was 21MB.

$ ffmpeg -i INPUT.mov -an output-default.webm

The original ultra low, 443kb/s that ffmpeg generates, file is 369KB.

$ ffmpeg -i DSC_3536.MOV -an -c:v libvpx -b:v 1M  output-1M.webm

Doubling the rate, file is 976KB. Still a lot of artifacts in the video.

$ ffmpeg -i DSC_3536.MOV -an -c:v libvpx -b:v 10M  output-10M.webm

This passed the smell test for me, I think it looks good enough for its size, this file is 5.6MB roughly the size of a jpeg of the same scene.

Pictures

I had a look through some of the pictures I have from my Iceland trip in August, but it was really painful. My network drive seems to be struggling delivering large files over sshfs, it probably doesn't help that they are 25MB raws.

I used darktable to crop the image, everythin else I had on my machine chocked on the CR2 raw files.


Reading: Abaddon's Gate, Reamde

iPhoto Mess

As I have said already, I am trying to get control of my photo collection. I want to have an image on almost every blog post, but before I can do that I need to sort out the mess that is my collection. Currently I have raws and jpegs in a directory structure, an iPhoto library and some almost structure files.

I want to have the directory layout:

year/month/day/[raw|jpeg]

For today it would be:

2016/11/11/raw
2016/11/11/jpeg

Before I can do that I need to extract images from iPhoto and collate everything together. Unfortunately iPhoto on my laptop does not want to start up at all and I suspect the App Store will want me to upgrade my OS too. I am a hacker so this isn't a problem.

Some searching turned up exportiphoto a python program that will extract images from your iPhoto library. Download, run:

python exportiphoto.py [options] "iPhoto-Library-dir" "destination-dir"

Running this script there was some crunching, some promising output and then it was done super fast, awesome! I sshfs ed out to the storage box and started looking around for my photos. Instead I found a bunch of empty directories, I must have done something wrong.

Instead of poking at the script I thought I would have a look at the iPhoto app bundle. Apps on a back are made up of a bundle, the bundle is just a directory which the finder treats in a special way. Looking into the bundle I found a Masters directory. The Masters directory was 40GB of photos in a raw format, most of the pictures that will be in the library.

The Masters directory has the photos stored in the correct directory structure, so I copied that out to use as the basis for my tidy.


Reading: Abaddon's Gate, Reamde

Making MacOS be Friendly with gdb

MacOS has lots of cool security features, by default the OS will only run signed code. Great security has trade offs, tonight I was hit my MacOS restricting permissions. gdb needs to be signed before it will be allowed to debug other program. It manifests like this:

$ gdb -q neat-streamer 
Reading symbols from neat-streamer...done.
(gdb) r
Starting program: /Users/jones/code/neat-streamer/neat-streamer 
Unable to find Mach task port for process-id 13334: (os/kern) protection failure (0x2).
(please check gdb is codesigned - see taskgated(8))

Learning lldb seems like far too much work, this needs fixed. Searching brings up stackoverflow questions, with a pointer to this guide that explains the entire process. In general you need to create a code signing key, sign the gdb binary and then restart the enforcement service taskgated .

The restart commands were a little harder to track down.

Restart taskgated :

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.taskgated.plistv
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.taskgated.plistv

There are also start and stop commands, but this didn't work for me. The troubleshooting on the guide was of no help. I even went as far as trying a reboot, but no luck. Maybe I will try figuring out lldb .

If anyone has any idea hows to get this working, I would love some help.

Politics

Politically the last few years have been really hard for me, 2014 , 2015 , and 2016 saw votes go completely against my expectations. This week was also surprise. It is easy to think I hold fringe views, that I am all alone surrounded by fascists, but the numbers show that only about have the electorate disagree in each of these cases.

The problem in almost all of these votes is not the right, but the inability of the left to draw people out. The fascists have it easy, they can hold a deplorable ideal, get rid of the immigrants and their supporters can galvanise around the idea. The left only seems to offer the status quo.

There are two courses of action at a time like this.

  1. Get some supplies and a gun, go up a hill and disconnect from the world. (I can reccomend some hills)
  2. Get involved and try to advance the causes you really care about.

Today, I really just want to climb a hill and start living in a cave. But that is the easy way out, instead I am going to start helping make the world a better place.


Reading: Abaddon's Gate, Reamde