Seals at Newburgh Seal Beach – Deshaking a Video with Mac, ffmpeg and vid.stab

I had no idea that taking a video using my 300 mm zoom would be that shaky. Anyway, there is help at hand. Do you spot the difference between the left-hand side (original) and the right-hand side (stablized) in the video of the seals above–in full resolution, it is much more astounding, btw.? How did I go about it? This is how:

1) I got homebrew for my Mac. From this page I copied the command and pasted it into a terminal window I had opened before. This istalled homebrew on my computer.
2) I had homebrew install ffmpeg by just typing “brew install ffmpeg” into the terminal. ffmpeg came with the vid.stab filter enabled already.
3) I went to the folder my shaky video was in by typing “ls ” into the terminal and dragging the folder from the bread crumb trail in finder.
4) Now the filter works in two passes.
4a) First pass: command: “ffmpeg -i clip.mov -vf vidstabdetect -f null -“. This writes a file named “transforms.trf” into the same folder.
4b) Second pass: command: “ffmpeg -i clip.mov -vf vidstabtransform=smoothing=5:input=”transforms.trf” clip-stabilized.mov”. This writes the stabalized clip into the folder.
5) That’s it.

Max Ogden (commands in 4 are from his text) also adds a command to creade a side-by-side comparrison here.

You might want to rescale your video. Info on that filter of ffmpeg here.

Depending on the shakiness of your video, you might want to adapt the filter options a bit. On the website of vid.stab, you will find explanations on how to do that. I have found that with this really shaky video, it seems to work fine if I put shakiness to the maximum of 10 in the first pass (default is 5) and the smoothing to 30 (default is 10) in the second (see command line summary below).

Command Line Summary:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install ffmpeg
ls ***folder***
ffmpeg -i ***seals***.MP4 -vf vidstabdetect=shakiness=10 -f null -
ffmpeg -i ***seals***.MP4 -vf vidstabtransform=smoothing=30:input="transforms.trf" ***seals***-stabilized.MP4
ffmpeg -i ***seals***.MP4 -i ***seals***-stabilized2.MP4 -filter_complex "[0:v:0]pad=iw*2:ih[bg]; [bg][1:v:0]overlay=w" merged.mov
ffmpeg -i merged.mov -vf scale=1080:-1 merged1080.mov

Scotch Egg and London Road Fire Station, Manchester

Whenever I go to the UK, one of the first things I buy is junk food like pork pies or Scotch eggs, and some bread spreads for later on. That’s basically the things I like and I don’t get in continental Europe. The photo shows a Scotch egg in front of London Road Fire Station, Manchester, which is undergoing conversion into luxury appartents at the moment. What else, of course? I surely wouldn’t be able to afford property there, but I can afford a proper Scotch Egg. Yummy!

[“Scotch Egg and Fire Station, Manchester” – 2019-08-29]

Fonts’ Welcome

Whenever I visit the UK, there is this moment that makes me realize that I have arrived there. No, it is not the laid-back attitude of the border police. Neither is it the ability of people to queue or to stand behind lines or generally suddenly behave meek as lambs in crowded places. No, it is some tiny little sign with some mostly unimportant message. To be more precise it is the typeface the words on this sign are set in. You go to the UK and suddenly it is not Verdana, Arial, DIN or Frutiger any longer. The fonts that surround you in public are Gill Sans, Johnston, Transport or some other, more modern, grotesque font. Like here, at Manchester Airport: the sign does not only tell foreigners to behave appropriately, it also says: “Hiya! Welcome to the UK. Make yourself at home (and a nice cup of tea later on (before you go to have too many pints of overprized beer–for which you might have to queue in an orderly fashion)).”

[“Fonts’ Welcome” – 2019-08-29]

Bei #PostCantz: Ochsenmaulsalat, Rehgoulasch mit Kroketten und Preiselbeeren, und Passionsfruchtsorbet mit Wodka. Die Hauptspeise hat sogar der #Beigebeauftragte trotz Rosmarin-Zweigleins abgenickt.

[“Bei #PostCantz: Ochsenmaulsalat, Rehgoulasch mit Kroketten und Preiselbeeren, und Passionsfruchtsorbet mit Wodka. Die Hauptspeise hat sogar der #Beigebeauftragte trotz Rosmarin-Zweigleins abgenickt.”, August 06, 2019 at 11:16PM]

#Citylauf #Ludwigsburg: While the first have reached the finish line already, people still cheer for the slower runners. #wholesome

[“#Citylauf #Ludwigsburg: While the first have reached the finish line already, people still cheer for the slower runners. #wholesome”, July 20, 2019 at 10:04PM]

Replacing the Volume Changing Sound after My Update to macOS High Sierra

It really is a nuissance. You get used to the look and feel and sound (!) of a system. Basically, the OS looks very much the same after the update but the different volume changing sound is a bit unnerving. Unfortunately, you cannot just copy the old file into the place the system is using for storing the sound. Reason is the so-called “System Integrity Protection,” which takes away the rights of administrators to fiddle with the internal organs of their own system. This seems to be a good idea to protect you against malware. However, in me it creates an uneasy feeling. After all, I’ve paid for the computer. It’s mine. How dare the system hinder me from editing it? This is the workaround:

  • Disable SIP: 1) Reboot into recovery OS (you gotta press cmd + R upon start); 2) start terminal (in Utilities); 3) type in “csrutil disable” (without the quotation marks) and hit enter; 4) reboot your computer.
  • Copy the old sound file into the position of the new one. (By the way: Create a backup of the new file, if you want to keep it. You can always copy from the system folder into another folder using Finder.): 1) start terminal; 2) “cd /System/Library/LoginPlugins/BezelServices.loginPlugin/Contents/Resources”; 3) “sudo cp “***” volume.aiff” (*** is the path to the old sound file you want to copy into the system folder / you can drag and drop the address from the bottom of your finder window if you select the file in there).
  • Enable SIP: 1) see above, but this time type “csrutil enable”; 2) reboot the computer; 3) Robert is your father’s brother.

PS: Just read here that SIP can cause other issues, too…