Tuesday, July 24, 2007

Grabbing frame from video

This is in continuation of my earlier post where I wanted to pick a color from an Image. Only this time, I wanted to grab a frame from a mpeg2 video and save it as a file so I could submit it to a photo contest. I got a couple of software none of which worked. I then decided to take matters in my own hand and use the Screenshot program in java that I had to take a snapshot of the video while it was paused. There's usually a slight blurring and I was okay with that.
To my amazement, the results were astounding like straight out of a Stephen King novel. First I played my video using Windows media player. Then I paused it at the frame I wanted. Then I ran my Screenshot program to save the frame to a PNG file. So far so good. Now that I had saved the frame I wanted, I let the video play till the end. Then when I checked the saved image guess what I found. The image stored was the last frame from the video and not the frame I wanted to save. It was as if the image got updated by itself after the java program had saved it and exited. How could this possibly be.
I wasn't ready to give up just yet. The last frame got saved to the file since the video kept running till the end. What if I didn't run the video after the file was saved and left it in pause mode. So I tried this out and I got my frame in a image. The picture was still inside of the WMP in the image which I planned to correct using the 'crop' tool of my image editing tool. Again, when I loaded the image into the ImageEditor, the results were frustrating to say the least. The 'crop' function wouldn't work. It was as if the image had a mind of its own and wouldn't respond to my effort to scroll the image. The picture inside the WMP itself would remain stationary while the rest of the picture scrolled. In the end, I decided to make the best use of what I had and just cropped the portion of the image I wanted AND was visible, and saved as a new image. So I had the picture I wanted or so I thought. I closed my ImageEditor and also WMP which was still paused. I was ready to upload the image I had saved to my website. I wanted to check the image before I uploaded it and when I opened it, I was amazed at what I found.

"The image was pitch dark and there was nothing but a black rectangle where earlier there was the picture of a marble structure."

Is there a scientific explanation that has to do with codecs and proprietary video formats or should I treat this as something out of a Stephen King novel.

Sunday, July 22, 2007

I was in Jaipur in May'2007 on some business and I had a chance to experience the culture and climate of Rajasthan for the first time. I was treated to some warm hospitality and saw some great architectural sights. Here's a video from my trip showing the magnificient Birla Mandir.

Friday, July 13, 2007

Recently, I got interested in plugins (extensions?) for the firefox browser and the feature I was looking for this. "Being able to capture the content of a portion of a webpage and store it somewhere with the possibility to transform it later into a different format. The search led me to this site which fit my need to a T. It is a web 2.0 site which allows uses to clip contents of web pages and store it on their site. Cool, isn't it.

The link.

Sunday, July 08, 2007

The Taj has found a place among the seven wonders once again. It took an intense SMS campaign towards the end to get the Taj among the elite list. The other monuments that have found a place include

>The great wall of china
>Rome's Colosseum
>Jordan's Petra
>Peru's Machu Picchu
>Brazil's Christ the Redeemer statue
>Mexico's ancient city Chichen Itza

The number of votes received by SMS seems to bethe basis for the selection of the final list. A more accurate criteria would have included a number of factors such as
the novelty of the concept, the awe inspiring nature of the monument (subjective) and more measurable factors like the number of visitors to the monument, the difficulty of execution etc. The monuments that made it to the list all deserve to be among the top wonders of the world irrespective of the number of votes they received.
Federer beat Nadal in a marathon 5-setter on sunday. The match was different from the games of the past when players like Becker, Edberg and Sampras were around when the point usually consisted of a serve, a return and a volley. This time around there were powerful groundstrokes from both players and both players played some great tennis. It was only in the very end that Federer could assert his dominance on grass to win his 5th Wimbledon title. So it is still "Federer on Grass and Nadal on clay". How long that will that stand good is anybody's guess.
In the women's segment, France's Marion bartoli fought valiantly against Venus Williams and it was only some powerful serving and raising of her game that saw Venus retain her title. With a better serve and volley game, Marion could be a force on grass court tennis.

Friday, July 06, 2007


I had mentioned earlier that I had cleared my mind of the wicket related stuff I was working on. I had kept the files intact and today I had the opportunity to tinker with it a little bit. I started tomcat and browsed to the link and it worked like a charm. I might be onto something here. A treetable component capable of editing XML in your browser could have many uses in these web 2.0 crazy times. RSS comes to mind immediately but any XML could be edited. Here's a screenshot of my editable XML treetable showing a ruleML file.

Thursday, July 05, 2007

The other day I was listening to the track "Stuck in a moment you can't get out of" from U2's album 'How to dismantle an a*****c b**b'. By their standards, it looks quite ordinary though that might change as I get to hear it more. I am great fan of U2 and feel that their album "Joshua Tree" is in my opinion the one of the greatest albums ever made and the song 'with or without you' quite simply the best song in the album. I have seen people rating 'Achtung baby' in the Top ten rock albums and Iam ready to agree with that too. One thing I noticed and Iam sure many would have also is why the long names. Their last album title and the song I mentioned above both have more than 5 words.
Their work in eradicating poverty is admirable and they deserve to be the highest paid Rock stars for their music and commended for their charitable work.