Thursday, May 31, 2012

Copy all EXIF data from one file to another

Sometimes I come across an old photo where the date and time stamp are all wrong, and then looking at the EXIF data, there's nothing there. It seems this happens mostly with old panographs where the software does not copy EXIF from source to destination.


EXIFTool can fix this for you:


exiftool -tagsfromfile source.jpg -all:all destination.jpg


The original is rename to .original, you can then use jhead to fix up date and time.

Tuesday, May 29, 2012

Howto view Fuji 3D video on 3D TV

When in movie mode, the Fuji Film Real 3D W3 makes 3D AVIs, and the question is how to display them on my Samsung 3D TV.



There are two methods:

  1. Connect the Fuji camera to the TV using a micro-HDMI to HDMI lead. You can get them on Ebay for less than about $10. Then play the movie.

    The thing with this method is that not everyone wants to keep all their movies on the camera / SD card.
  2. If you want to play movies from USB or other storage eg DVD, you need to convert the 3D AVI into something more useful.

    If you have Mac OSX - requires QuicktTime Pro

  3. If you have Mac OSX then use StereoSplicer to split into left and right movies by dragging the AVI onto StereoSplicer, and say where you want the Left and Right movies

    Then open each movie.

    Select all (apple-a) of the Left movie

    Select all (apple-a) of the Right movie and copy.

    Then with the Left movie selected, you should get an option "Add to Selection & Scale".



    What this does is create two new tracks in the one movie file ie we've layered the Right hand movie onto the left hand movie.

    Then, open the movie properties (apple-J), select the second video track



    and set the 'offset' to be width of the movie, with a W3D that'll be 1280 pixels.


    This creates a side by side movie.



    You can then export as .mp4 or H264. Bonus points for deleting the extra sound track first.

    If you are using Windows:

  4. I found the best / easiest / cheapest ( as in free) is to use StereoMovie maker from stereo.jpn.org/eng/stvmkr/, and create a side-by-side, or SBS video. You'll need the MJPEG codec, the lightest weight one I found is www.free-codecs.com/motion_jpeg_codec_download.htm. When creating the SBS video you are asked what encoding to use. On my seldom used WinXP box I didn't have any other codecs, so I just used the same MJPEG. Then use say QuickTIme Pro eg on my Mac and re-code as H264.

You can then place the encoded file onto a USB stick and play that.


Couple of tips:


  1. When converting to H264 / mp4 you need to use a much higher bit rate than usual because otherwise you'll get artefacts that are different in each frame, which is visually displeasing
  2. To quickly switch the TV into 3D mode, the Samsung has a 3D button on the remote - press it and select side-by-side





Saturday, May 26, 2012

com.google.GoogleDrive: SystemError: store to keychain failed: 100013

After updating my OSX Lion from 10.7.3 to 10.7.4, Google Drive kept asking me to login, but it kept failing. Looking in the logs I saw


com.google.GoogleDrive: SystemError: store to keychain failed: 100013


Nothing showing on the Internet for that, decide to delete the application, and re-install, which fixed the problem.

Friday, May 25, 2012

OSX: Finding when I took photos, or, Howto List all Files Recursively

Set myself a little project. I was wondering if during the time I've been doing digital photography I've now taken pictures on every day of the year, including Feb 29th.


My photos are arranged in one of two methods:
  1. If I've been on a trip, I create a 'collection' called eg "NZ_Sept_2011" and in there sub-folders for each camera eg "D300" and the sub-folders eg "NEFs" and "JPGs".
  2. For regular day to day stuff, I create numerical based folders eg "Nikon_01200" which would contain Nikon photos from 01201 to 01300.
Also, I use tools such as jhead to change the time stamp of processed files to match the EXIF date/time. This means:
  1. Creating a listing of all my photos with their modification date, so in theory I can just recursively list all files.
  2. Then I need to process the results, shedding extraneous data, and the year, so I'm left with just Day and Month and full path of the file

Here's what I came up with:


  1. First off is to run the command
    $ find /dir/ -ls > all-photos.list

    which creates a (large file), with details such as

    3538871      232 -rwxrwxrwx    1 user            staff              116581 15 Oct  2008 /path/to/photo/John/IMG_7048.jpg

  2. This list brings back everything including Photoshop, Autopano and other files so we need to remove all the extra entries

    $ cat all-photos.txt | grep -i jpg | grep -v -i ".pano" | grep -v -i ".pld" | grep -v -i ".psd" | grep -v -i ".plb" > all-photos-jpg.txt

  3. Now, print only the fields needed. Can do this by inclusion
    $ awk '{print $8,$9,$11,$12,$13,$14,$15,$16;}' all-photos-jpg.txt > all-photos-jpg-fields.txt

    or exclusion

    awk '{ $1=""; $2=""; $3=""; $4="";$5="";$6="";$7="";$10="";print $0 }' all-photos-jpg.txt > all-photos-jpg-fields.txt

  4. Finally, change the separator to a comma so we can import into a spreadsheet and create a pivot table

    $ sed s:" /":,/:g all-photos-jpg-fields.txt > all-photos-jpg-fields.csv

  5. Import into Google Docs, and then add a row at the top. You need the first column to be called say 'Date' and the Second 'Photo'



  6. Select both columns, then click Data > Pivot table report. When it loads:

    row - "date"
    values - "photo" - counta




  7. And here we are:



  8. And even better, by using filtering you can easily see what photos you took on what date





Tuesday, May 22, 2012

Coloured icons in OSX Lion's sidebar

Let's face it, OSX Lion's sidebar is rather drab. Wouldn't it be good to have a bit more colour?


Well you can, and here's how.


  1. Download and theninstall SIMBL.
  2. You need the SIMBL plugin.
  3. Add the ColorfulSidebar.bundle to this SIMBL plugin folder:

    /Library/Application Support/SIMBL/Plugins/ or

    ~/Library/Application Support/SIMBL/Plugins/
  4. You need to restart the Finder by one of the following

    a - Logout / Login

    or

    b - Use the terminal kill the Finder and relaunch it: "killall Finder"

    or

    c - If you have turned on "Finder Quit', then just quit and relaunch the Finder, which is my preferred way


Then you get your nice icons

 
before                                              after


Interestingly, looking through the plugin and plist, it looks like all the nicely coloured icons are there already, just not being used. Have a look through /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources



Sunday, May 20, 2012

Picasaweb - reverting to the Picasa view not the Plus view

You'll notice that a recent change in the Picasaweb / Google Plus interaction is that Picasaweb albums and photos now redirect to their Plus equivalents. You might not like that because, for example, the geolocation information is missing, and also the thumbnails are much bigger.


The answer is to take the old picasaweb URL and add a "?noredirect=1" to it, for example, instead of 


https://plus.google.com/photos/104721696289765922296/albums/5739200664576060001?noredirect=1

which gets you


use 


https://picasaweb.google.com/104721696289765922296/TerrigalAndAvocaMay2012?noredirect=1


this instead, which gets you



If you want to send all your albums then send a URL such as


https://picasaweb.google.com/104721696289765922296?noredirect=1



where you replace the "104721696289765922296" with your own ID.

Friday, May 18, 2012

Airport Utility cannot find Time Capsule or Airport Express

If like me Airport Utility v6 on OSX Lion doesn't find any of your Airport basestations even a brand new Airport Express, as well as my Time Capsule, the you can download and Revert to older version here: support.apple.com/kb/DL1482.



Tuesday, May 15, 2012

OSX: Finding Duplicate Files

In preparation for moving a load of data in Google Drive I needed to de-dupe a bunch of files.


Duplicate Files Searcher from http://duplicatefilessearcher.net/ is a good app. Yes it runs under Java, but does the job, and even better, free.




Add your Directories to search, flick to 'Searching Options', decide if you want to compare by file name as well as content (uses hash functions) and off you go.


Pretty quick to search my Dropbox folder with ~2500 files. Turned out I had about 800 dupes, and saved me 500MB of space.

Saturday, May 12, 2012

Simon: your web site monitor - changes and if its up

For a while I've been looking for a simple tool to check if my NAS servers are up, and if certain internet pages have changes.


After some looking I found Simon from http://www.dejal.com/simon/. From the web site there is only a chargeable product, but, if you go through OSX App store there is a version which is free, though seems to handle only 5 checks. Does what I need though.


Here's what it looks like



To add something new to check / monitor, click the big "+" button, and then work through the tabs




This example shows me adding a monitor for the ExifTool web site so I know when to download a new version.

Wednesday, May 9, 2012

Google Drive: runs through Goggles to do image recognition

Very very cool feature. When you upload an image, it is run through Goggles to see if anything can be recognised.


As a test, I upload a photo without the name of the location in the title, and then search for 'Sydney', and Drive returned my photo.








Doesn't work for everything you run through at it of course, even so very very cool and useful. 

Monday, May 7, 2012

Stacking and Blending Images in Photoshop



Decided I would try to stack and blend some images I took of waves crashing into rocks.


The main problem I had was that since I didn't have a tripod with me, I needed to align the images.


In Photoshop you can do it two ways, it seems.


1.  Load the images first, drag them all into the the same image, select them all, and then do Edit > Auto Align Layers.





I found this didn't actually align the layers very well.


2.  A better method is to use File > Scripts > Load Files into Stack and check "Attempt to Automatically Align Source Images"






When you've selected the images, ensure "Attempt to Automatically Align Source Images" is selected, then click OK.






When this has finished, go into History, and move one step back - we need to undelete the base layer





Then, to get the affect I'm looking for select all layers above the first image later, and change the Blending Method to "Lighten". Since the crashing waves are white, and much brighter than the rest of the scene, the waves becomes additive.


So I get this



from this



Friday, May 4, 2012

Howto: QuickTime Pro to convert Flash to mp4 mov without recoding

Maybe you got sent a Flash .flv video and want to play it on your iOS device. But you don't want to recode it with the loss of quality.


Here's the original video, which I've opened in QuickTime Pro 7.



With QT Pro 7, I do a apple-J and get the properties of the file.



Since Flash is just another container, I can extract the video and audio.


So, select each track in turn and then click 'extract'. You'll get two new windows




The, do apple-A on the audio track to select it all. Switch to the new video window, and then select Edit > Add to Movie



Then save as self-contained movie, and you'll get a .mov instead of .flv




And here we are



For extra points, you can rename the .mov to .mp4 and it should play OK on most devices. The reason is that the mp4 container format is based on the QuickTime mov container.

Tuesday, May 1, 2012

Samsung TV - what video formats does it play?

I was curious what file formats my Samsung D550 series TV would play. (PS51D550 since you ask, and its great). Tucked away on this page is a table, which I've reproduced here.





Huge number of formats. The reason I did this was to check and confirm that it would not play .m4v files that iTunes likes, and can be produced by HandBrake. HandBrake can do .mp4 as well of course, though you lose chapter information which can be useful.


If you do have files with .m4v extension, you can change the suffix to .mp4 and they will play OK from USB.