Tuesday, July 6, 2010

xBhp Tri State G2G video editing

Recently, I went on a road trip to Yercaud along with all my biking pals. I took a camcorder to get my hands dirty with some video editing. While trying to record the videos, I had some hard learning.
  1. A camera mount on the handle bar or to any part of the bike doesn't really help if the road is slightly bumpy or if the speed is high. The video is pretty shaky. The best I could get was when I strapped the camera on to the helmet.
  2. Quite some shake to the camcorder makes is difficult for it to record. Some times it also corrupts videos that have already been recorded.
After some trials, I got a bunch of clippings that I got back home and edited. The final video can be seen below. I used Adobe Premiere CS3 for the editing. The content of the recording was on the DVD, so I didn't have to spend time on the conversion. However, I used OJOsoft Total Video Converter to convert the DVD format to editable AVI format.


Tuesday, May 4, 2010

Using the Blogger RSS across domains

Problem
I run a biking blog (http://touring.praveenselvam.com) and also have a personal website (http://www.praveenselvam.com) setup, which has a single page with external links to my other sub domains. I wanted to use the RSS feed from my biking blog to add some jazz to my personal website's home page. Since these are from different sub domains, the browser wouldn't allow me to make XHR requests to my target. I wanted a solution that would be as simple as possible, not having to reinvent the wheel.

Solution
I looked through some interesting hacks on the client side, but nothing looked like a fail safe option to me. I decided to craft a request to my own domain at http://www.praveenselvam.com, that would in turn read the RSS from the sub domain at http://touring.praveenselvam.com and give me a stripped version of the information I needed.

I found a rss2html converter, which is a PHP script. I primarily went looking for a PHP script simply because my hosting was of that nature. The package comes with a converter script and a template. The template is a HTML file with simple markings on where the title, description, etc. from the RSS feed needs to come. It was quite easy to edit it, and I directly placed it on the server.


Actual feed: http://touring.praveenselvam.com/feeds/posts/default
Template:

Output:

Thrills of touring

02/21/2010 02:36 AMWelcome aboard!
04/16/2010 01:23 PMThe "been there, done that!" Map
11/02/2009 12:05 PMThe Big Rides
10/25/2009 01:41 AMWeekend Madness

Other interesting findings:
In the process of searching for alternates, I found a couple of interesting links that are good alternates on the client side itself.

Friday, May 1, 2009

Floating elements

When moving from tables based layout to div based layouts, the first things people struggle to understand is how to use div elements. The very first thing that comes to the mind is to make div elements display in an inline fashion. There is a different tag for such things, called span. It is therefore not a good idea to make div tags inline display elements. Rather, there is a whole new alternative to float elements around.
Floating is a concept of making elements flying around the web page, constrained to the space provided by their parent elements. The general trick used are to float the elements left, or right. When an element is asked to float right, it tries to fly to the maximum position it can reach to it's right, without being blocked by any other elements that may be in it's path. This comes handy when we need to split pages to form skeletal structures.

The simplest form of a float trick, involves 2 steps.
  • Define the width of the element.
  • Float it "right", or "left".
Lets consider a problem to better explain this. Assume that we need to create a page that has 2 columns, and boxes inside each column that position themselves one below the other. Each box's height does not depend upon any of the boxes in the nearby column.

CSS code

HTML code

Sample output


There is a small problem however with this approach. Elements containing floating children don't consider the height of their children. It is therefore required to "clear" both sides at the end of all the child elements.