Upload your old photos to Flickr

I use Flickr for all photos I would like to share with everyone and (a locked down) Picasa album for family events and other more personal things.

I have been using different online photo tools the last couple of years. Everything form building my own, to Gallery, WordPress, Picasa and Flickr. But the last year I have been using Flickr more and more. Instead of having all my favorite photos scattered around the web I wanted to upload them to Flickr. It was a pretty massive job. Here are the steps I took.

Update EXIF data on my oldest photos

I had about 100 (of my oldest) photo folders without EXIF-data. The most important missing fields are the fields that tells when the photo is taken. Without this Flickr would show it as it has been taken the same day as it was uploaded. I didn’t want that.

I looked around a bit for tools that could write EXIF-data and lastly I decided that the command line tool ExifTool would be the easiest to use.

My photos are sorted in folders like 2001/010101_A-beautiful-winter-day-in-the-snow. I opened a command line window and added the ExifTool binary to the path. Then I went through the 100 folders and executed the following command (should be all on one row) for every folder. Don’t forget to change the three date fields.

exiftool -Make="FUJIFILM" -Model="MX-2700"
-ModifyDate="2001:01:01 12:00:00"
-DateTimeOriginal="2001:01:01 12:00:00"
-CreateDate="2001:01:01 12:00:00"
-FocalLength="7,6mm"
-FocalLengthIn35mmFormat="35mm" 
-Artist="Ola Lindberg" 
-copyright="Ola Lindberg" *.jpg

The day is the most important. I didn’t care so much about the time. I added some extra camera information since I knew what camera I had used for the different shots. An hour later I had my first years properly EXIF-tagged.

Export the photos from Picasa

I’m using the Picasa program for my photo management. So I started from 1998 and took one year at the time. I starred, adjusted and exported the photos I wanted. Then I sorted them to folders by years when they were taken. I ended up with folders from 1999 to 2009 with between 5 & 50 images in each.

To be sure that I wasn’t missing any EXIF-data I looked through all exported photos in Windows Explorer where you can see the Date taken property. If it says Specify date taken you have no EXIF-data. By now most of my photos had the date in that field. I completed those that didn’t (both on the original file and the exported file).

Uploading to Flickr

I used the Flickr Uploadr tool to upload all photos. I tagged, added to sets, added titles and descriptions to all photos. Then I uploaded it one year at the time. I put them in one set for every year.

I ended up with sets from 1999 – 2009 with my old / new photos.

Re-sort the Flickr stream

Flickr sorts all photos by date uploaded. While it’s ok I didn’t want all my old photos to be on the first page in my Flickr stream. I could just have waited a while and it wouldn’t be a problem but I wanted to have them in an order more like date taken than date uploaded.

It’s strange that Flickr doesn’t support any way to re-sort you photo stream. But I found one third party tool (Flickr photostream update) that changes the upload date to the same as date taken. I ran it one set at the time and it worked fine.

There are one limitation though. You can never set the date taken to an earlier date than when you joined Flickr. I joined Flickr 2005-05-17 so my photos from 1999-2005 could never get the right upload date. Instead I changed the date for all photos from 1999 to 2005-05-20. All from 2000 to 2005-05-21. All from 2001 to 2005-05-22. And so on.

I looked for tools edit date uploaded in a batch for all photos in one set. I found one tool that I tried but it didn’t work. I didn’t have that many photos in these old sets so I just edited them one at the time in Flickr. It didn’t take more than 20 minutes so I was pretty happy. You could probably find a tool for this. Or even write your own.

Result

I uploaded about 400 of my old photos to Flickr. All in all it took two days. I ended up with a collection of my best of shots with sets for each year. And I’m very satisfied with it!

Sony Vegas Platinum 8 HDV workflow

I’m using Sony Vegas Platinum 8 to make my video editing. It’s some years old but I like it a lot. I just updated my camera from standard definition to high definition (one Canon HV20-PAL and one Canon 550D). It gave me some problems. But I think I’ve found a decent workflow. There is a never version available that might work better with HDV but I’m sticking with my 8. For now at least.

Capture

To capture from the HV20 I use HDVSplit. It captures to M2t files. And with the 550d it’s just to copy the MOV files from the memory card. To get Sony Vegas to accept the MOVs you must install QuickTime. I used the free version and that worked fine. The video I have been working on doesn’t have that many files from the 550D so I cannot tell how good it performs yet.

Project settings and editing

Start Sony Vegas and let it automatically detect the project settings by opening one of your M2t files. It should then detect the format automatically. Open the project properties. It should look something like this.

I use Deinterlace methodInterpolate fields. I tried all the different options in Vegas. I tried to deinterlace in Handbrake but this way seemed to give the best results.

The Platinum version of Sony Vegas only allows 1440 x 1080 which is the maximum resolution from the HV20. The 550D does 1920 x 1080. Vegas automatically converts the clips so they work together. I’m not really sure what happens with the 480 pixels but the video looks good so.

When that’s set up you can start editing. If you get performance problems Eugenia has some tips you can try.

Rendering

When you are done it’s time to render your video. I started out by following Eugenia’s guide but Sony Vegas kept crashing on me. I tried some different methods and I ended up with the following.

Start out by following step 2 & 3 in another of Eugenia’s guides. The only thing I changed was that I’m using Pixel aspect ratio: 1.0000 here instead of 1.3333 as before. I’m not sure why but the videos turned up wrong otherwise.

This will export a HUGE file in a lossless format.

Once that was done I had to convert the file to some other format. I tried with some different tools but I found Handbrake to be the easiest to use. All you do is to open the file in Handbrake and select a preset profile and render the video.

Viola! That’s all. Maybe not optimal but it works.

WordPress development environment – Aptana, Virtualbox and Google Code

At work we always have a pretty hefty development environment. At home I’ve never had any dedicated environment for my web development. It’s both a relief and something I miss.

Today I’ll try to set up a WordPress development environment that’s a bit more robust than my old setup where I download the file I need to change from my website to my desktop, change it, upload it and refresh the browser.

The idea is to:

Setup Google Code

I registered mypersonalblog on Google Code. For now I’ll probably mostly use the SVN features so you can swap out Google Code for any other repository.

I created a wp-themes folder in trunk where I’ll put one folder for each theme I use.

I download the theme I want to use from WordPress Themes. I add -ol to the end of the theme folder to not confuse the themes with the original folder names. Then I check it in. This is done to easily be able to track my changes compared to the version I started out from later. Both to be able to see what I have done but also to easily be able to merge updated theme versions further down the road.

I change the styles.css file and add some information. Here is an example from the  Simplr-ol style.css file.

THEME NAME: Simplr-ol
THEME URI: http://code.google.com/p/mypersonalblog/ (Simplr http://www.plaintxt.org/themes/simplr/)
DESCRIPTION: My customizations to Simplr; "The original minimalist one-column, content-centered theme for WordPress. A different type of theme. For WordPress 2.6.x."
VERSION: 4.6.1-0.1
AUTHOR: Ola Lindberg (Simplr by Scott Allan Wallick)
AUTHOR URI: http:///olalindberg.com/wp/ (Simplr http://scottwallick.com/)
TAGS: variable width, fixed width, one column, widgets, theme options, options page, white, orange, blue, microformats, hatom, hcard

If any theme diverges a lot from the original theme I’ll maybe come up with a new name and upload it to WordPress Themes. For now I think it’s good enough to have them all in one Google Code repository.

Setup VirtualBox, Ubuntu, Apache and WordPress

I installed VirtualBox, created an Ubuntu appliance and installed Ubuntu 9.10 desktop. I installed the guest add-ons and Apache. I changed the VirtualBox network to Bridge mode so it get’s its own IP address.

Screenshot from the Network Adapters in VirtualBox. Open it from Devices / Network Adapters...

Update 101118: I recently wanted to make this setup on another computer (using a wireless network card) where I couldn’t get the Bridged Adapter to work. I searched around a bit and it and it seemed like some people had similar issues. Instead I configured VirtualBox to use two network cards. One using NAT (giving internet access) and one using Host-only Adapter.

2 nic setup. The first using NAT providing internet access from my guest
2 nic setup. The second card using Host-only Adapter to be accessible through my Host system.

With this setup you should access you guest os from your host os with the IP address your 2nd network card gets (in Windows).

I created an Apache Virtual Host and installed WordPress to that folder. The production URL is http:///olalindberg.com/wp/ and for the local URL I use http://o/blog. I added the IP for my virtual Ubuntu to the name o i my hosts file. Now I can surf to http://o/blog.

My virtual host is configured like this

	ServerName o
	DocumentRoot /home/ola/shared/web/ola
	#Only put the log file like this in the web root on a local server
	CustomLog /home/ola/shared/web/ola/ola-access.log combined

Share files between my workstation and the virtual Ubuntu server

To share files in VirtualBox I use SharedFolders. The folder on my Windows workstation where I checked out the repository is D:CodingMyPersonalBlog and it’s mapped to the name MyPersonalBlog in Ubuntu.

The VirtualBox Shared Folder dialog. Open it via Devices / Shared Folders...

To mount the folder MyPersonalBlog to /home/ola/MyPersonalBlog in Ubuntu you run the following from an Ubuntu terminal

sudo mount -t vboxsf mypersonalblog /home/ola/MyPersonalBlog

Make sure that the files are visible in you Ubuntu server by running ls -la in the folder.

Note! You need to run this every time you login or you can create a script and make it auto run.

ola@ubuntudevserver:~/MyPersonalBlog/wp-themes$ ls -la
total 28
drwxrwxrwx 1 root root 4096 2010-03-27 11:08 .
drwxrwxrwx 1 root root 4096 2010-01-01 19:09 ..
drwxrwxrwx 1 root root 4096 2009-12-29 11:45 AutoFocus-ol
drwxrwxrwx 1 root root 4096 2010-03-27 11:12 room-34-baseline-ol
drwxrwxrwx 1 root root 4096 2009-12-29 11:13 Simplr-ol
drwxrwxrwx 1 root root 4096 2010-03-27 11:13 .svn
drwxrwxrwx 1 root root 4096 2009-12-29 10:58 veryplaintxt-ol

The last thing to do is to tell WordPress that the themes exists. I do that by creating soft links in the theme folders

ola@ubuntudevserver:~/www/olalindberg.com/wp/wp-content/themes$ ls -la
total 24
drwxrwxrwx 5 www-data www-data 4096 2010-03-27 11:48 .
drwxrwxrwx 6 www-data www-data 4096 2010-03-27 11:20 ..
drwxrwxrwx 2 www-data www-data 4096 2009-12-19 00:22 classic
drwxrwxrwx 3 www-data www-data 4096 2009-12-19 00:22 default
-rw-r--r-- 1 www-data www-data   30 2010-03-27 11:01 index.php
lrwxrwxrwx 1 ola      ola        55 2010-03-27 11:48 room-34-baseline-ol -> /home/ola/MyPersonalBlog/wp-themes/room-34-baseline-ol/
drwxr-xr-x 3 www-data www-data 4096 2009-12-29 10:42 simplr
lrwxrwxrwx 1 ola      ola        45 2010-03-27 11:06 Simplr-ol -> /home/ola/MyPersonalBlog/wp-themes/Simplr-ol/

Now I can enable the themes in the WordPress admin panel.

The WordPress theme administration page

Note! If WordPress can’t see the themes look at the permissions for the shared folder. I set mine to 0777 since it’s a local setup.

Import all posts from the production setup

I use the build in WordPress feature to export all posts and pages to an XML-file. I import that file to my local setup. I include all attachments. Some minutes later I have all my posts in my local development environment.

If I need to re-import all posts I use the plugin Bulk Delete to empty my current local database. Then I empty the Media Library in the WordPress admin panel. One tip is to increase the number Media items per page via the Screen Options.

Setup Aptana

I installed Aptana, created a project file and added all my theme files to it. I have never used Aptana before so it’s a test. We’ll see how it goes.

Logitech QuickCam mod to fit a standard tripod

I have a Logitech QuickCam Communicate Deluxe webcam. It’s a decent webcam apart from the non standard mounting holes. I wanted it to fit a standard tripod so I did some modding. Here is how.

Webcam before mod

I started out by splitting the screen clip from the cam. It’s a bit scary but I pulled until it released.

Split clip from cam
Split clip and cam

We will going to use the plastic part with the screws so just unscrew it from the screen clip.

Removed the plastic part from the clip
Removed the plastic part from the clip

A standard tripod is just a 1/4″ screw. I found the following two.

I found the following two 1/4" screws that could work
One of these two could work

Here is how they would look. Not sure what the right one was used for but I think it would be easier to attach to the plastic part so I chose that one.

Trying out my options
Trying out my options

I’ll glue the plastic part with the metallic part so I’ll polish both to make the glue stick better.

Polish to make the glue stick
Polish to make the glue stick

Time to glue. I used a double sided tape but glue would work just as well.

Glue together
Glued together

Put the plastic part back to the webcam attach it to you tripod and we are done.

My modded webcam attached to a Gorillapod
My modded webcam attached to a Gorillapod

Replace batteries in Philips Philishave 5890 and Philips Hair trimmer HQ-C280

Recently the batteries in my shaver (an old, but working, Philishave 5890) and hair trimmer (an old, but working, Philips HQ-C280) died. I looked around online for replacement batteries but didn’t find any specifications. I opened the devices but they didn’t tell what to use for replacements.

The 5890 uses two serial connected batteries. I measured the original size for each battery to: 42.5 x 14 mm. A little bit too long for being an AA. But I took a chance and replaced it with two NiHM AAs (47 x 14 mm). You’ll have to shoe horn them in to fit but it does.

PhilipsPhilishave_Shaver_5890

The HQ-C280 uses one battery. I measured the size to match an AA battery exact so I just replaced it.

PhilipsHairTrimmer_HQ-C280

All the replacement batteries are standard AAs (for mounting) 1,2 V and 1500 mAh. I charged them for 20 hours and it worked fine!