Thursday, April 16, 2009

Compressing digital camera videos

I love making videos on my digital camera. I know it is not ideal, but it is much more convenient because most of the time, I am taking pictures. It is much more easier to change it to the video mode rather than dragging the big camcorder along all the time. Another reason is that it is much easier to transfer the videos from digital camera to the computer.
However, most of digital cameras create huge-sized videos because they do not use compression at all. They use MJPEG format for the video. So, even a 3 minute video could end up using 450 MB of space, which is ridiculous.
So, I need to convert these videos to much smaller sizes while still maintaining the same quality. That means, I need to use compression formats like XviD, DivX, x264, etc.
The tool which I have been using is WinFF (Graphical User Interface for FFMPEG, which is a free/open source video convertor). I have been using it on Linux (Ubuntu), but they have Windows versions as well. It is free and easy to use. I am pretty sure there are other tools out there as well, but I could not find a decent one for Ubuntu.
It is pretty straightforward. You can either use the default options, or specify your own bitrate. For the most home videos (non-HD), a video bitrate of 500 should more than suffice. You might want to experiment a bit to find your right balance, but 500 should server as a good starting point.

Wednesday, April 15, 2009

Improving Firefox startup speed

Starting firefox used to take longer than Chrome and Opera on my laptop. However, after making some changes, the startup speed of firefox has improved dramatically. Here's what I did:
  • Looked at the list of installed extensions, and disabled the ones that I am not actively using. I did not really uninstall them because I use them pretty rarely (every few months), and would not want to hunt for them again. It is much easier to re-enable them.
Path: Tools -> AddOns -> Extensions -> Disable
  • Unchecked the option 'Always check to see if Firefox is the default browser'.
Path: Tools -> Options -> Advanced -> Last checkbox on the 'General' tab.
  • Unchecked all the options to automatically check for updates. From what I can tell, this had the highest impact on the startup time.
Path: Tools -> Options -> Advanced -> Update tab.

Note: If using linux, your options will be in Edit -> Preferences.

Thursday, January 15, 2009

Ubuntu: Annoying password prompt to unlock default keyring

I have my desktops and laptops (running Ubuntu) set to timed auto-logins. However, as soon as I did it, I found that soon after logging me in, Ubuntu would ask me for the password to unlock the default keyring. For laptops, it would say network-manager wants the key. For desktops, it would say evolution (I have google calendar synced to evolution).
I tried a lot of things after reading Ubuntu forums, but the only thing that worked finally was to delete the unlock password:
  1. Choose Applications --> Accessories --> Passwords and Encryption Keys.
  2. In the application, chose Edit --> Preferences
  3. Highlight the 'login' text in the main box, and choose 'Change Unlock Password'.
  4. Enter your normal login password for current password. Leave the new password fields blank.
  5. Click 'Change'. Click 'Accept' on the message box saying that having no passwords is insecure.

Ubuntu shutdown problem - CIFS VFS related

For the past few weeks, my laptop (running Ubuntu) would not shut down completely. It would say "CIFS VFS: Server not available". It was pretty annoying, but I thought it was a random message, and might go away with one of the updates. However, it turns out that the problem was due to the conflict in the order of shutting down of the network manager and samba shares. Samba shares need to be unmounted before network manager is shutdown for obvious reasons. Here's a blog entry with a more detailed solution:
http://blog.avirtualhome.com/2008/03/10/ubuntu-shutdown-problem-cifs-related/

* Update *
This solution stopped working once I upgraded to Jaunty (9.04). Here's the solution which works now:
  • Edit /etc/gdm/PostSession/Default (using sudo)
  • For each Samba mount, add this line to the top: umount to the top (right after the line: #!/bin/sh.
I read this from this thread: http://ubuntuforums.org/showthread.php?t=288534, which says that just adding /etc/init.d/umountnfs.sh should work, but it did not work for me. Adding individual umounts did.