Monday, January 14, 2008

Auli

Another dream comes true...
I dreamed that one day i would wake up and open the window and see the whole world covered in snow. And lo, it just came true...

Yes, i am talking about auli.

Auli is around 500-550 kms from New delhi. The way is from delhi to rishikesh via NH58, and from there to rudraprayag and to joshimath and from there to Auli. The way from delhi to rishikesh is around 200 kms and is plains - and the way ahead of rishikesh is all mountains.

We were 5 people in an innova and the driver was good at driving in hills. so we took around 12-14 hours for the drive. We started around 10 in the night on friday after diner. Actually we wanted to start early around 6, but we got the information that at 8 pm, the road ahead of rishikesh is closed and it is opened at around 5 am. Since the way from here to rishikesh is around 5-6 hours, we decided to start late and reach the road block at rishikesh at around 4 am. We had a halt at devprayag, half way from delhi to joshimath. But it was not required. Well, joshimath is a good place - small town with beautiful rivers flowing. It is the point of origin of The Ganga. Two rivers alaknanda and bhagirathi meet there and The Ganga is born. A very small town in the valley.

From devprayag around 2 hrs ahead is shrinagar a beautiful valley between all the hills. And before shrinagar is a very nice hotel to stay in - riverside. It is around 1 km from devprayag. We spent some time over there and moved ahead. By 7 in the evening, we reached joshimath the road from rudraprayag to joshimath is very bad - terrible seems a better word.



We spent the night in joshimath. And next morning we went to auli via cable car. The first cable car goes as early as 9:30 am. And if you miss it, you will have to wait untill there are atleast 15 person to travel in the cable car. Well, we missed the cable car and had to wait. You could hire gum boots from the same place at 50Rs/day.

The ride in the cable car was terrible. It was very crowded. I had the notion that since the requirement is minimum 15 people, it would be big, but it is a tiny place and if you have luggage - be prepared for some shoving and scolding. The cable car charges 400/- per person for to and fro. You can also take the road and it would be a better option if it is not snowing.



If you are travelling in cable-car, you would need to get down at tower no 8. And from there, you can either trek down or catch the chair car to gmvnl guest house. There are only 2 places to stay in auli, the gmvnl and the clifftop hotel. Clifftop is costly and the service is not that great. gmvnl is very good. Cheap and affordable. A ride in chair car is 200/- per person to and fro.



Clifftop hotel is very near to the tower no 8 of cable car. GMVNL has ski courses which is a 7 day course. And people from over the world come over here to learn to ski. Food was great. Avoid non-veg. They take too much time to cook non-veg and it is not that great - just ok. We used to be terribly hungry - maybe due to the cold and we used to eat a lot.

The cottages at gmvnl are either huts of deluxe cottages. Huts are very small and do not have central heating. Whereas the deluxe cottages are too good with central heating and all.

The good thing that happened is that it was snowing heavily when we reached Auli. For the first time in my life we saw snow.

All we did over there was play in the snow. It became terribly cold in the night. Even after central heating it was 7-8 degrees inside the room. Outside the temperature must have been -5 degrees or so.



Next morning was bright and clear. We enjoyed the sun and the snow and the clear skies. The people over there would try to make you ski - telling you that it is easy and you would learn in an hour. But dont fall for that. They would charge 200-300 rs/day for the ski and equipment. And you would say - thats great for 300 i can ski for the whole day.

But it is not possible to learn to ski in just 2-3 hours. You would need atleast 2 day practice to start skiing. And the ski equipment is very heavy. You would get tired in 1 hour max.

Return was ok. We felt we should have stayed for a day more. The driver drove at 60-70 kmph on the mountains and we were back in delhi at 2:30 in the morning.

Check out the pics at http://picasaweb.google.com/jayant7k/AuliJan08

Wednesday, January 02, 2008

play movies on xbox 360

So, you have got a Xbox 360. And you are tired of playing games on it. You would also like to use it as a Video and Audio player. Hmmm... Audio player is cool. Just plug in a USB pen drive with your favourite songs and playlist and play them out...

But what about video. Every Time you want to play a video, you have to "rent/buy/borrow" a DVD and play it. Do you have movies (DIVX/Avi) on your laptop and you wish you could play those movies on the XBox and enjoy the movie on your home theater.

Here is the ultimate solution.

The recipe requires you to have a linux (i am using ubuntu here. But you can use any flavour of linux) loaded pc with a net connection. A USB mass storage drive (pen drive or hdd). And an Xbox 360 - ofcourse.

The commands here are for ubuntu gusty. If you are not using ubuntu, then you will have to get the source and compile the files for yourself.

The magic software over here, which does our work is ffmpeg.

So what do you do???

  • download ffmpeg.
    svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

  • Get the required libraries
    sudo apt-get install libfaad2-dev libfaac-dev libxvidcore4-dev liba52-0.7.4 liba52-0.7.4-dev libdts-dev liblame-dev lame
    In case you are running something other than ubuntu, then please google for the libraries and install them from source.

  • compile
    cd ffmpeg
    ./configure --enable-gpl --enable-pp --enable-libvorbis --enable-liba52 --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-libxvid
    make
    sudo make install

  • choose the movie you want to convert into Xbox - playable format
    cd I.Am.Legend

  • convert the movie to wmv format
    ffmpeg -i I.Am.Legend.XviD.avi -vcodec wmv1 -acodec wmav2 IAmLegend.wmv
    This will take some time

  • Copy the movie into the USB device

  • Plug the USB drive into your Xbox 360.

  • Play the movie and enjoy



But, you would say, the picture quality is not that good. What happened to the picture quality and the sound. It was better on the lappy.

check out this information:

jayant@jayantbox:~/movies/I.Am.Legend$ ffmpeg -i I.Am.Legend.DVDSCR.XviD-THS.avi -vcodec wmv1 -acodec wmav2 IAmLegend_bad.wmv
FFmpeg version SVN-r11364, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-libvorbis --enable-liba52 --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-libxvid
libavutil version: 49.6.0
libavcodec version: 51.49.0
libavformat version: 52.3.0
built on Jan 1 2008 22:13:58, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (24000/1001)
Input #0, avi, from 'I.Am.Legend.DVDSCR.XviD-THS.avi':
Duration: 01:41:23.5, start: 0.000000, bitrate: 966 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 640x272 [PAR 1:1 DAR 40:17], 23.98 tb(r)
Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
Output #0, asf, to 'IAmLegend_bad.wmv':
Stream #0.0: Video: wmv1, yuv420p, 640x272 [PAR 1:1 DAR 40:17], q=2-31, 200 kb/s, 23.98 tb(c)
Stream #0.1: Audio: wmav2, 48000 Hz, stereo, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 3473 fps=274 q=10.0 Lsize= 5014kB time=144.9 bitrate= 283.6kbits/s


Here, you could see that the audio and video bitrate has been reduced from 128kb/s to 64kb/s and 966 kb/s to 283.6kb/s respectively.

To get the same quality, all you have got to do is match the output bitrate with the input bitrate. So when we convert the movie from avi/divx to wmv, we need to pass arguments so that the bitrate for audio and video remain the same. So lets do that.

ffmpeg -i I.Am.Legend.XviD.avi -vcodec wmv1 -acodec wmav2 -b 989184 -ab 131072 IAmLegend_gud.wmv

Remember: the bitrate is put here in bytes so 989184b/s = 989184/1024 = 966kb/s. And 131072 b/s = 131072/1024 = 128kb/s.

To identify the source bitrates, just do:

jayant@jayantbox:~/movies/I.Am.Legend$ ffmpeg -i I.Am.Legend.DVDSCR.XviD-THS.avi
FFmpeg version SVN-r11364, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-libvorbis --enable-liba52 --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-libxvid
libavutil version: 49.6.0
libavcodec version: 51.49.0
libavformat version: 52.3.0
built on Jan 1 2008 22:13:58, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (24000/1001)
Input #0, avi, from 'I.Am.Legend.DVDSCR.XviD-THS.avi':
Duration: 01:41:23.5, start: 0.000000, bitrate: 966 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 640x272 [PAR 1:1 DAR 40:17], 23.98 tb(r)
Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
Must supply at least one output file


So, now relax. No need to go to the nearby DVD rental shop. No need to purchase DVDs. If you have got a good quality movie on your computer, you can play the movie on your large screen TV and home theater and enjoy...