Tips, tricks and traps

Tips

Get the latest tips on the latest geeky things going on in the world

Tricks

Once you find something there's always a trick or two that will make you even more productive

Traps

Traps and gotchas that will make it hard for you, so why not read on and avoid them?

Things that break when you change your iCloud password and Tunnelblick problems

Well a bunch of things definitely break when using your Mac in a secure way. I have two problems. First is with Tunnelblick, the open source VPN connection. It keeps hanging Yosemite. I finally uninstalled it and am trying privateinternetaccess.com’s own client.

Also. I’ve been having trouble with iCloud and with so many hacks, decided to change the password.

This causes many issues if you have synced your iCloud Password to be your Mac password. For instance keychain access just breaks completely and it keeps asking for the old iCloud password. Here is what I think is happening:

  • I think what is going on is that there is not really a sync. Instead, when you say use your iCloud password as your local Mac password, it is just taking the current password and validating that it is the true iCloud password and then using it’s own hash to store it. This means that if you change the iCloud password it will not sync with your Mac. So after you change, break the link and reauthenticate.
  • If you don’t do this, then all kinds of strange things happen to the local keychain since it is encrypted with your old iCloud password and not your new one. Most folks recommend just deleting it, but this causes more sync problems. I’m still investigating.

Finally on tunnelblick, I’ve been having more and more problems with it. It seems to hang networking. So I’ve uninstalled it for now. It also doesn’t seem to work well with DNSCrypt.

Lensrentals and testing

Well it certainly is a great time to try new high end cameras. In looking at lensrentals.com, it’s a great way to test them without spending thousands. Here’s my drool list:

  • Blackmagic Design 4K Production Camera. This is 4K with a Canon EF mount system, so a great complement to all that Canon glass if you own lots of it
  • Sandisk Extreme Pro 960GB. OK a compact flash that is fast enough for 4K video?! Or use the removable SSD storage system on it!
  • Canon 5DS R. Due sometime in June, this is a 50 megapixel landscape lovers dream. It reverses the aliasing filter and will only show off with the very best lenses. But what a dream.
  • Canon 600mm f/4L II. This is 3 pounds lighter (although still $10K worth of glass), but one of the finest pieces of long sports photography lense ever. 
  • Panasonic Lumix DMC-LX100. This is a a micro-4/3 system that is a little bigger than the Sony RX-100 Mark III

Then there are the cameras that are not quite here yet but which should make for a great summer:

  • Sony RX-100 Mark IV. The rumor is that this is going to be micro-4/3 (rather than a 1″ sensor), so close tot eh DMC-LX100
  • Sony A7R Mark II. The rumor is that this will be even more than 36MP and let’s hope they get away from their lossy RAW format :-)
  • Sony RX-1. Potentially the first camera with a larged curved sensor (so nicer edge sharpness).

Mac Vuescan fails

Well I’ve been using Vuescan and suddenly it started doing dark blue scans and ignoring things in the user interface. it would continuously scan four times. The fix seems to be the age old delete all the preferences and start over.

Here is how on a Mac

  1. Go to Finder and hold the Option key and choose Go/Library 
  2. Look in Preferences for vuescan all those files

 

Storing photos and cloud music too and other subscriptions

So given all the photos that are happening, where’s the best to store things. Much has changed and it has gotten incredibly cheap to store photos and see them everywhere. So I’ll sort the list with two criteria, size of storage, privacy and convenience:

Photos in the cloud

  • Amazon Cloud. They just announced that Amazon Prime member ($99/month) get unlimited photo storage. You can just copy your folder with the Mac application (or PC) and it puts it up there. And Amazon seems reasonably unfocused on reading all your content, so I’d guess it’s a decent place to put it. And the marginal cost is basically zero. 
  • Crashplan. This is a backup service and although it costs $69/year, seems like a good option for backup. You do need an application running on your NAS or a PC or Mac to keep it fed though.

  • Bluehost. For $10/month they also have unlimited storage as long as objects are less than 1GB . This is again for me basically a zero marginal cost, although Bluehost is now owned by a gigantic hosting company so who knows how good the service will continue to be.

Next down on the list

  • Yahoo. They have a 1TB storage limit. The main issues are privacy as Yahoo is of course an ad driven company, but the interface is nice. And 1TB is a decent amount of storage. I have about 400GB of photos, so it just about fits.
  • Google. For $10/month, they will give you unlimited storage with Google Drive. 

  • Apple. I don’t know why Apple charges so much but it is $20/month for unlimited Photo sharing. 

  • Music in the cloud

    Now on to music storage and download:

    • As an aside, with Amazon Music bundled it seems like an even lower cost way to do things
  • I’m wondering if I should give up my $25/year Apple Match subscription, it does give very high quality m4a files (which by the way if you are smart, you can find on your machine).

  • Backup into the cloud

    I use Crashplan now but wonder if Backblaze isn’t a similarly good choice and you can now install Crashplan on Synology which is great

    Lightroom 6 has it all, HDR, Panorama and Facial recognition

    Adobe continues the drum beat of including everything. Perhaps this is the right subsittute given Apple Photos issues. The latest Lightroom has a bunch of the separate utilities I’ve been using:

    • HDR Merge. This works with Raw and is like the Photomatic I’ve used or HDR Luminance (open source)
    • Panorama. Like Hugin which I’ve loved

    • Face Recognition. Hopefully better than the best I’ve found in Picasa (pretty much orphaned by Google) or Fotobounce (Slow)

    It’s $10/month when bundled with Photoshop or $149 for the standalone (marketed as Lightroom 6)

    Using an old Minolta Dimage Scan elite 5400

    They don’t even make this anymore (heck Minolta became Minolta-Konica and then I think Sony bought them). But it is still a good 35mm film scanner. As I get nostalgic, I’ve reinvigorated the desire to index all those old photos my Dad and I have taken. Here are some operating notes:

     Firewire vs USB 2.0

    This thing has an old Firewire 400 connection and it does seem to work well on an old iMac 2009 even with Yosemite. Speed-wise, theoretically USB 2.0 is 480 MBps vs 400 MBps but in the real world it is nice to have a separate Firewire hub and not have it on the USB 2.0 bus. It’s in reality just a bit faster as well, but mainly seems to make the iMac more responsive. I suspect because the interrupt load is lower on Firewire.

    Vuescan

    This trusty piece of software still allows scanning with the DiMAGE with infrared support for getting rid of scratches. The main thing that is different now is the multiple samples seems to require complete new scans. The older versions were much faster.

    • Multiple Samples. But if you do four scans, it is four times longer, so beware.
    • Resolution. One big question is what resolution to scan. Film is analog, so there is no specific resolution (see Ken Rockwell) but http://pic.templetons.com/brad/photo/pixels.htmlBrad points out that says that 7000 pixels across a 35mm image (24x35mm is the aspect) is pretty amazing and at the top of resolutions so with this system that can do 5400dpi, that’s pretty close to the highest possible resolution. Of course that’s with good film, ideal lense and so forth. The average instamatic is more like 4000 dpi

    • Autoskew. Some of the guide recommend turning this off as it is done digitally

    • Multiple Exposure. This is done in the scanner, but basically uses two light levels so you get more dynamic range out of your slide.
    • Grain Dissolver and ICE. The Dimage has an internal scratch remover called ICE and Vuescan has it’s own scratch remover. To use ICE, you need to turn on grain dissolver. That’s a fancy name for a light diffuser that make grains in the film less obvious. 
    • Grain Reduction. There are bunch of post processing things that Vuescan does that are probably better done in Photoshop including restoring colors, fading, grain reduction and shapening. I sometime use these though for photos I’m not going to take the time on.
    • White Balance. You can also adjust this, but sometimes for the quick and dirty I right click in the Color tab on something white to get rid of balance issues.
    • Number of Samples. This is an attempt to reduce the noise of the scanner itself. The main problem is registration. That is there is wiggle in the mechanical mechanism so this might actually cause more blur not less. It does work with film scanners. Experimentally, this Dimage does multiple passes with 4 samples, so I’m going to try fewer samples but just listening to it, it looks like multiple exposure works in a single pass but multiple samples requires multiple passes.

    Markdown

    As an aside, I’ve started to use the Jetpack Markdown in Scribefire. It’s confusing as there are two levels of support:

    • You access Markdown directly in Scribefire (which isn’t well documented) in the Edit Code section where it appears to interpret Markdown itself but not Markdown Extra, so it doesn’t handle code sections for instance and does immediate conversion to HTML in Scribefire itself. This is nice in that it means that you don’t have to rely on a plug-in at the WordPress server level. 
    • You can use Markdown extra in WordPress by editing the Edit Visually section, this passes markdown up to the server which then interprets it.
    • There are some strange interaction here, for instance, you can’t do a link within Scribefire using server Markdown because Scribefire interprets URLs and adds the link directly, so it’s best to use their link button instead.

    So for instance, to get the code block you have to pass that up directly, so most of the time you want to Edit Visually in Scribefire


    Here's a code block

    Mac Finder tricks

    Wow incredibly useful things that I didn’t know (hat tip to Cult of the Mac) on using Finder in OS X. I’m almost a power user:

    1. Get a full-screen slideshow, complete with available index sheet, by hitting Option-space bar with several files selected. You’ll be able to scroll through them all with the arrow keys, either onscreen or on your keyboard, and if you click the little Index button, you’ll see all your selected files on one screen. Click on the one you want to see full-size, or hit Esc to get back to the Finder.
    2. To rearrange Status Bar icons, simply hold down the Command button on your keyboard, then drag and drop the icons into the order that most pleases you. This applies to the Apple-provided ones, mostly, as third-party apps don’t necessarily allow this trick. If you want to get rid of the icons, simply Command-click and drag one of the menubar icons toward the middle of the screen. When you let go, the menubar icon will disappear in a cute little puff of simulated smoke, just like when you drag an icon off the Dock. 
    3. Rename multiple files. You know when you have 47 different files, all named Screenshot? Well, it’s super-easy to rename them all to something better, like Cat Pictures, right in the Finder. All you need to do is select all the files you want to rename, then right-click (or Control-Click) on any of them. Next, click on the contextual menu item “Rename X Items,” where X is the number of files you’ve selected. Then you can do a simple replace text rename, add text to the end of the current file name, or append a number, counter or date at the end using the pop-up menu provided. 
    4. Restart Finder. There comes a time when even the hardiest app on your Mac, the Finder, will freeze or crash. You can always reboot at times like this, or shut down with a long press and hold to your power button, but try to relaunch the Finder first. It’s just like Force Quitting any other app — simply hit the Option-Command-Esc key combination to bring up the Force Quit dialog box. You may need to Command-Tab your way to a different, non-crashed app first to see it. Once you see the dialog, highlight the Finder in the list and click Relaunch. This can save you some valuable time as an alternative to rebooting your whole Mac.
    5. Finder Toolbar. There’s a wealth of helpful widgets and buttons at the top of any Finder window, and for the most part, the default set will do you just fine. If, however, you want to add or delete anything up there, all you have to do is right-click (or Control-Click) on an empty space in the toolbar itself and choose Customize Toolbar from the contextual menu that pops up. Then drag and drop to your heart’s content, or — to reset it — drag the default set up from the bottom of the panel.

    Final tip if you are on a MacBook, Chrome is great, but it burns way more CPU than Safari. Something like 30% more. So use Safari if you care about battery life.

    Yikes Photo library of 400GB generates a 250GB modelresources so make sur you import

    I don’t know what is going on but it looks like others are hitting this “bug”. With “don’t copy” checked, my 400GB photo database is generating a 250GB (see Apple support comment on discussions.apple.com, macrumors and on reddit) which is consuming essentially all of my hard disk. There’s some debate as to whether these are hard links or not but it appears that the “don’t copy” feature is basically useless, if you want to use Photos, you have to nearly double your disk requirements.

    Basically, it is all or nothing, you need to commit to Photos (unlike iPhoto) and send your photos into it. For me, this is a real problem as I’ve had iPhoto crash quite a few times losing its entire database (I don’t think it likes 180K photos :-), so on to other solutions. Probably will try Lightroom, but keep my file system storage method so I don’t have to commit to any one database format or company and use standalone tools that manage it.

    Here are some more of the details:

    Some of the other reports are:

    • 113GB library generates 32GB Photos library
    • 250GB of jpegs generates 110GB Photos library
    • 90GB jpegs generates 55GB Photos library

    This looks like something that is because of the faces feature, in trolling through model resources, I see things that look like thumbnails, but quite often I see a 2MB photo that is copied there without a face. Looks like it is getting confused and copying whole images over that it doesn’t recognize.

    Makes Photos kind of useless on machines without lots of disk space!

    Getting nVidia proprietary drivers to run on Ubuntu

    https://launchpad.net/~mamarley/+archive/ubuntu/nvidiaThere are so many different notes about how to do this. Basically, the default appears to be Nouveau open source drivers, but you can also used the proprietary nVidia ones. The main problem is that with Ubuntu 14.04, these proprietary drivers don’t show up in the driver user interface. So how to kick it when say installing a new GTX-970 card.

    There are a few new commands. First is to use ‘Jockey’ which handles drivers (get it?) and it has been renamed to something more sensible:


    sudo ubuntu-drivers devices
    sudo apt-get install nvidia

    However at least for 14.04.02 with GTX-970, this doesn’t work and there are no devices found. So to do manually you need someone’s PPA, so that is either mamarly or edgers


    sudo apt-add-repository ppa:mamarley/nvidia

    The edgars more usually:

    sudo apt-add-repository ppa:xorg-edgars/ppa
    sudo apt-add-repository
    sudo apt-get update

    Now figure out what version you want by looking for the stable release on geforce.com, right now it is 346


    apt-cache search nvidia-
    sudo apt-get install nvidia-346

    Swift and Cameras and Gstreamer

    Now that I’ve got the basics of Swift, time to start learning how to use AVFoundation to take photos and videos.

    1. With James‘ tutorial gives you the very basics and here are the gotchas:
    2. If you plug your phone in for the first time while running XCode it may not work properly. I had to close Xcode and plug the phone in first before running Xcode. It wil take some time compiling libraries

    Getting Gstreamer 1.4 to work with hardware acceleration and Swift. Wow that’s a challenge:

    1. Installation of Gstreamer 1.4. It looks like it is just a .pkg file, so you install it, but now where does it put the framework is unclear
    2. Tutorial for Gstreamer looks a bit old, but what the heck give it a try and are from gstreamer.com which isn’t the same as the open source project so they are tuned for 0.10
    3. Update for the tutorial to 1.x seems to have happened. I git cloned it but it doesn’t work when you open Xcode and in fact says he never tested it. By spelunking through the Xcode setup, it looks like the tutorial is set of IOS 6.1 (?!) and that the frameworks are in ~/Library/Developer/GStreamer which is where a bunch of Xcode gunk lives and isn’t in ~/Library/Frameworks. Also this tutorial compiles for i386 which doesn’t make much sense for IOS :-)
    4. OpenGL in Gstreamer on IOS. Basically you can use Apple’s EAGL which allows OpenGL contexts on IOS with Gstreamer and provides GPU support for OpenGL manipulations.
    5. Hardware encode and decode acceleration. Apparently with some release you can do this on IOS 8 and 1.4 at least for video decode. Not clear how to get that working. This requires that you compile from source I think but it isn’t clear where he put the `vtdec` and `vtenc_h264` plugins. This is in addition to OpenGL hardware acceleration.
    6. HTTP Streaming. A long post I barely understand about streaming over HTTP vs RTP, but essentially http streaming is supported by Apple directly.

    The biggest problem is lack of documentation 

    1. When you install the pkg you can do it from gstreamer.com but this is out of date so you should install it from the open source site. 
    2. It isn’t clear where the pkg actually installs so it is hard to know where the .framework and .h files are. Looking at ~/Library/Frameworks and /Library/Frameworks didn’t show anything. So I moved ~/Library/Developer/Gstreamer/gstreamer.framework to /Library/Frameworks and it seems to find it.
    3. I then get the error, http://stackoverflow.com/questions/21985909/no-architectures-to-compile-for-only-active-arch-yes-active-arch-x86-64-valid, and it says just flip it to active architecture = NO. This makes sense as I’m running a cross compiled application. Tutorial 1 works here.
    4. Also it is a little confusing how you run different applications in the same Xcode project. Something that I just learned how to do with `Product/Scheme` and then select what you want. And then by selecting the GStreamer IOS Tutorials and select the Targets to change the architecture.
    5. However the Tutorials for the rest don’t seem to work with problems with i386 so I changed this to architecture NO and got a host of `Undefined symbols for architecture i386` and stackoverflow explains that in addition to adding frameworks at the top, you need to correct this in the Build Phases when you have multiple schemes. With a single scheme, just adding the framework at the top works, but you have to manually do for the rest
    6. Tutorial 2 needs something called the VideoToolbox.framework. It isn’t documented in the .h files, so it must be needed by gstreamer somewhere so this now works properly. It uses an delegate protocol and uses a separate Grand Central dispatch thread to run the gstreamer pipeline, so conversion to Swift means we need to understand this as the main work is done by a class `Gstreamerbackend`
    7. The tutorial recommends using the Gstreamer template, but when run on Xcode 6.2, this crashes Xcode!
    8. Tutorial 3, 4 and 5 just need UIKit.framework, VideoToolbox and Gstreamer and they seem to work.

    So with the tutorial working on next to figuring out how to use hardware acceleration in the GPU with Gstreamer.

    1. This works apparently in the GIT build accordingin to Coaxion, but you have to build gstreamer yourself on ioS.
    2. The two plugins are called VTenc and VTdec264 which refer to the VideoToolbox apis that allow ahrdwar acceleration
    3. These will eventually go into gstreamer 1.5.1 as ARM support isn’t quite there yet but we are right now at 1.4.5 stable release.

    Ok so how to get the latest gstreamer on Cerbero. First make sure not to use a VPN. For whatever reason, certain download sites that cerbero uses will not download using VPN-based addresses.


    git clone git://anongit.freedesktop.org/gstreamer-sdk/cerbero ``` This line let's you run there build facility without have to install it, so assuming it is in ~/ws/git and note this is different from the realm. The cross indicates the bootstrap is for IOS.

    cd ~/ws/git/cerbero

    cpan XML::Parser


    Now you need to make sure that you can use multiple cores as Cerbero by default is single core as explained by <a href="https://tausiq.wordpress.com/2014/12/11/ios-gstreamer-framework-custom-build/">tausiq</a>&nbsp;you need to add `allow-parallel-build = True` into your cbc file

    echo “allow-parallel-build = True”  >> config/cross-ios-universal.cbc

    ./cerbero-uninstalled -c config/cross-ios-universal.cbc bootstrap

    ./cerbero-uninstalled -c config/cross-ios-universal.cbc package gstreamer-1.0

    “`

    At least for me this seems to fail many times depending on how well the internet is up, so you will have to retry quite a bit before it works.

    But finally, this will create a gstreamer.pkg which you should install and this creates a gstreamer.framework which you can then add to the framework section of your application and it should build. This takes quite a while. Been running 

    As an aside, the above This fails on vanilla OS X without the install of XML Parser


    XML::Parser... configure: error: XML::Parser perl module is required for intltool

    So how to get this as www.cpan.org explains you need cpanm, but Macinstruct says not. Cpanm doesn’t install properly by the way, but first the Parser first you need the underlying expat library which does the parsing. 

     

    So I tried another path which was just to use the Objective C framework directly into Swift