Video Streaming with VLC Player

The VCL player form VideoLAN is an awesome piece of software. Apart from playing most video formats and supporting conversion from one to another, it has a video streaming server built into it. All you need is a video file or video capture device and a few clicks to start broadcasting your videos over network. The best part is it is open source and available for multiple operating systems.

Screenshot of the VLC Player on Windows.

Setting up the server

  • This is really easy. Download and install the VLC player from this site. Choose all components during installation.
  • Select the Start->Program Files->VideoLAN menu and click on VLC Media Player in the submenu. This will start the VLC player
  • From File menu , select Wizard and the Wizard dialog will show up. Now with ‘Stream to Network’ radio button checked , click on ‘Next’ button.
  • Here you will be prompted to select an existing stream or choose a new one. We will create a new stream, so click the ‘Choose’ button.
  • The ‘Open…’ dialog box shows up. Here you can select a video file which you want to stream. So browse and select a file. Click the ‘OK’ button. Then click the Next button.
  • Right now we will select HTTP radio and enter nothing in the ‘Destination’ editbox. Click ‘Next’. Here select a format (on windows, select ASF) and click ‘Next’ button again.
  • You can enter ‘1’ in the TTL box for now and click ‘Finish’ to complete the process.

VLC Player streaming video onto network.

Your server is working. Now open another instance of VLC Player . From ‘File’ menu select ‘Open Network Stream’. On the dialog that shows up, select the ‘HTTP/HTTPS/..’ radio button on ‘Network’ tab and enter ‘localhost:8080’ in the edit box beside it . Click ‘OK’. You should be able to see the video in the VLC Player. At this stage you can pause and restart the video on server and it will reflect in the second instance of VLC Player. You can also start Windows Media Player, and from File->Open URL , open the http://localhost:8080 stream and enjoy the video. If you are connected an intranet then you can access the video stream from other machines similarly by substituting ‘localhost’ with your IP address.

Streaming from different sources

Source of video can be a file, VCD/DVD, TV tuner card, camcoder or (it seems) any common video capturing device. When you choose to create a new stream you have the option of picking up the video source. Most video/audio capture devices would show under the ‘DirectShow’ tab. I connected a camcoder and it was detected as a video source after clicking Refresh.

My camcoder showing up in the video devices dropdown.

You can broadcast to a single computer using RTP Unicast or broadcast to a range of IP addresses using RTP Multicast.

Showing videos in webpages

Once you have a server , you may want to host webpages that show the video. The good news is that you would have installed the Mozilla Plugin for VLC Player by opting for a full installation. The code to make a basic webpage with the plugin is given below:

<embed type="application/x-vlc-plugin"
autoplay="no" loop="yes" width="400" height="300"
target="http://localhost:8080" />
<br />
<a href="javascript:;" onclick=''>Play video1</a>
<a href="javascript:;" onclick='document.video1.pause()'>Pause video1</a>
<a href="javascript:;" onclick='document.video1.stop()'>Stop video1</a>
<a href="javascript:;" onclick='document.video1.fullscreen()'>Fullscreen</a>

More details can be found on this page.

Screenshot of VLC Player plugin (FireFox) and Windows Media Player (IE) showing streaming video in web pages.

Similarly on IE , we can use Windows Media Player for this purpose. Sample code for an HTML file is given below:

<OBJECT id=WMPPlayer41 style="width:350px;height:350px" 
classid=clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6 VIEWASTEXT>
<PARAM NAME="URL" VALUE="http://localhost:8080">

Experimenting with the VLC Player. I am sure you will find out many interesting features and applications. Please share them with me.

Home page of VideoLAN Project

Download site for VLC Player

Online documentation of VLC Player

Information on RTP Unicast and RTP Multicast

Information on TTL (Time To Live)

A cleaner way of handling the Flash's fscommand within IE

Very recently I was debugging a piece of javascript with my colleague. I thought that the javascript didn’t look very clean, though it was copied from a reputed website. The javascript was basically meant for handling the fscommand event from a Flash movie and perform some actions.

The code to do this consisted of javascript as well as VBScript code, and involved document.write() which I found a bit odd. I thought that there had to be a cleaner way of doing things and soon found out this neat jscript code to accomplish the same. Let me tell you I am not an expert on Flash and the following code will work only with IE. Given below is an example flash movie and it’s actionscript code that calls the ‘fscommand()’ on mouse click and passed the coordinates of the point as parameters.

Click anywhere on the above flash movie

class Main
static function main()
_root.t.text = "Click Here!";

_root.onMouseDown = function ():Void {
_root.t.text = _root._xmouse + ","+ _root._ymouse;


First we write a javascript function that we want to call on the fscommand. Then we write the code that links this function to the fscommand.

<object id="testflash"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
codebase=",0,0,0" align="middle"
style="width: 200px; height: 50px" VIEWASTEXT>
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="test.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffff00" />
<script language="javascript">
function ChangeText(x)
{document.getElementById("info").innerHTML ="You clicked here:"+x;}
<script FOR="testflash" EVENT="FSCommand" LANGUAGE="Jscript">
var count = arguments.length;

It is worth nothing here that the script is mixture of javascript and jscript. But at least it doesn’t contain document.write().

Introduction to GIMP for Windows Users


When we talk of editing an image, the first name that comes to Windows users is ‘Paint’. But most of us will agree that this little program can do very limited when it comes to image editing. A professional image editing software can cost you dear, considering your need. Are you looking for an alternative that is free, feature rich and reliable? Your search ends here. GIMP stands for ‘GNU’s Image Manipulation Program’. GIMP is a high quality open source program for working with pictures and images. It is a default installation on most modern Unix/Linux systems. The windows version for GIMP has been around for quite a while, but hasn’t become as popular as some other open source software. The windows version of this software works as good as the Linux version and we will see that ourselves in this article.

Getting GIMP

GIMP for windows comes in a nice self-installing package (setup.exe) from this site . If you are an open source freak, you can even download the source code for GIMP and compile it on your machine. One important thing here; GIMP was made using GTK+ , so you have to install GTK+ before installing GIMP. Installable of GIMP as well as GTK+ are available from the above mentioned site. GTK+ is set of runtimes required by the graphics library used by GIMP. If you already have GTK+ installed on your system you can skip this step. Package for GIMP is about 8Mb in size , and GTK+ around 5 Mb.

Using GIMP

Once you install GIMP , you would be very eager to explore this wonderful tool. When you click on its icon under ‘Start Menu‘ you will see the main window with following entries on the toolbar ‘File, Xtns and Help‘. The screen does not look spectacular at this moment, but click on the ‘File->New‘, and then ‘OK’. This will create a new image file in separate window apart from the main window. Now you can see familiar looking entries on the menu of this window like ‘File, View, Edit, Select….‘. Click on the ‘Dialogs‘ item , and you should see a menu showing different dialogs that can be made visible , like ‘ Colors, Brushes,Gradients,Patterns ‘ etc.

GIMP running on Windows.

](images/gimp/GIMP1.jpg)With a little experimentation, you should be able to create simple drawings. If you have used other image editing software then using GIMP should be really very easy. Some prominent features of GIMP are: Over 25+ image format supported. The GIF image standard is used to store images with transparency (non-rectangular images), while the PNG format is used for image that can be translucent, useful for web and UI designers. GIMP can even store an image as a C program, which is really cool. Other interesting formats supported include bzip(compressed format), postscript, ico (windows icon) and even HTML ( table with colored cells). GIMP can store image in form of layers. This is helpful for complex image processing tasks, where you can save your image as layers and later open it work on those individual layers. GIMP also has the ‘magic wand tool’, which is very useful for selecting similar colored irregular areas in an image. This tool is generally not seen in many low end image editing programs. It has over 150 standard effects and filters . Just click on ‘Filters’ in the main menu. You will see a list of categories of different filters. Each category has several nice filters. The ‘Scripting-Fu’ is my favorite. It makes lot of really awesome looking artwork available at click of single mouse button. We will definitely give it a close look later.

My favourite GIMP tricks

Do your screenshots or images look poor in quality, once you export them into JPEG format ? Or you wished you could furture compress a JPEG image . This is where GIMP comes in handy. Once you specify the extension for saving a file as ‘*.jpg’ , GIMP asks you how much to compress the image. More compression means lesser quality of the resulting image.[

Setting compression level for images using GIMP

](images/gimp/GIMP2.jpg)Want to tweak those blur looking images from your digital camera! Try the ‘Sharpen‘ filter. From ‘Filters‘ menu select ‘Enchace>Sharpen ‘. You can select how much sharp you want your image to be. Many blur images can be made to look somewhat crisp by using this filter.[

Applying the sharpness filter

](images/gimp/GIMP3.jpg)You will definitely love this one. Have you noticed that adding shadow to photos makes them look awesome on webpages and magazines. You can achieve this using by a single click in GIMP. Open your image and from ‘Script-Fu‘ menu select ‘Shadow>Drop Shadow ‘. One important thing to note here is to save the image in PNG format, or else your image will show shadow on default white background. Send such images via email to your friends and they will be impressed by the professional look.

Using the ‘drop shadow’ function(click to enlarge)

GIMP creates professional looking logos for you in no time. From the ‘Xtns‘ in the main menu select ‘Script-Fu>Logos ‘, you will see a list of all kinds of logos GIMP can make for you. Click on a few, accept default settings by clicking ‘OK’ and see what happens. Impressed !! You can supply text and alter properties for each type of logos to create amazing custom made effects.[

Few of the many types of logos generated by GIMP

](images/gimp/GIMP5.jpg)The ‘Sphere‘ function under ‘Xtns>Script-Fu>Misc>Sphere.. ‘ is a unique one. It creates a cool 3D looking sphere for given color and radius. Great for using in webpages and other graphics.[

The sphere function in action

](images/gimp/GIMP7.jpg)GIMP is so very well designed! You can generate quite a few types of bullets, textures and buttons for webpages at the click of a button. Using ‘Xtns>Script-Fu>Buttons‘ and ‘Xtns>Script-Fu>Web Page Themes ‘ functions you can generate different types of buttons and bullets for your website.[

Screenshot of different types of buttons created by GIMP(click to enlarge)

Tutorial and Documentation

If you are thrilled by reading this article so far, then you will definitely go crazy when you visit this site: A must see site for all interested in digital photography . This collection of tutorial actually teaches you how to create some spectacular and professional looking art with your photos and GIMP. There is also a comprehensive free ebook on GIMP at . The official web site ( contains lot of imformation, do have a look . You may find more interesting links on the wikipedia entry for GIMP here: The official wiki for GIMP is located at Even googling for ‘GIMP tutorials’ will give you hundreds of sites. There is no lack of documentation and tutorials for this tool. As you can see yourself, GIMP is very well designed. It doesn’t try to be a full-fledged complex image processing program. It has been made so simple, that anyone can use it. It gives you easy access to many general image manipulation tasks. Also its ability to generate logos, buttons, bullets, and graphics make it a very useful tool for anyone with modest graphics designing needs. A major complain with open source software is lack of proper documentation and support. We saw that this is certainly not the case with GIMP.Creative ones can spend hours working with GIMP and even normal people like you and me cannot afford to miss this wonderful and productive tool.

Copyright (c) 2007-2019 Ashish Patil . Please read FAQ for more details.

Javascript Snake Game

This is a very simple snake game written by me. It has been entirely written in javascript.Please send in some comments and suggestions if you like it .

Click on Start Button. Use Arrow Keys to navigate.

Copyrights 2006 -2019 Ashish Patil []. Permission granted to use/modiy this script for any reason with following RESTRICTIONS:
1] You WILL RETAIN this original notice.This notice should be also included in derivative works
2] You will include a notice on the page running this script which says "Copyrights 2006 Ashish Patil []"
3] The page running the script should have link to

Running Linux on Windows Like Normal Programs

Using small Linux distro like Puppy Linux and open source emulator like QEMU, it is possible to run and stop Linux like normal windows programs. By creating virtual hard disks and using software like WinImage you can actually transfer data between Linux and Window. You can also create a virtual network between Windows and the guest OS for sharing and transferring files. And not to forget SAMBA in this context.

Screenshot of Puppy Linux

About Puppy Linux

1. Its small size 60-70 MB with full fledged GUI.
2. Rich collection of software like text editors, Mozilla, multimedia players ,ghostscript and support for networking.
3. Nice GUI tools for performing common and configuration tasks. This is something which windows users are very used to.
4. It even has a small web server and Tcl/Tk.

About QEMU

QEMU is an open source and fast emulator. The best thing about it is size (only 6MB).Though for now windows port is in alpha stage, it rocks. I like its simple command line interface for starting.

Getting Started

First download QEMU for Windows (Alpha)and unzip it to some directory.QEMU comes with a demonstration Linux distro image. Open the qemu-win.bat file, you see the following:

REM Start qemu on windows.
START qemu.exe -L . -m 128 -hda linux.img -enable-audio -localtime

Now download puppy Linux from any of its sites. I downloaded puppy-1.0.3-mozilla.iso which is about 62 MB in size. It has Mozilla as default browser. Copy it to same directory as qemu-win.bat file. Modify the qemu-win.bat file to:

REM Start qemu on windows.
@ECHO OFF START qemu.exe -L . -m 128 -hda linux.img -cdrom puppy-1.0.3-mozilla.iso -enable-audio -localtime -boot d -user-net

Hey! you have a full fledged Linux system running inside windows.

Starting Network

At the Puppy Linux shell type the following:

#dhcpcd eth0

Get the address for eth0 of emulator.I always get the address for eth0 as .On your windows machine you can get your ip using ipconfig (say it is Puppy Linux shell type:


If it is successful, start Mozilla and point it to some site on your IIS web server (Assuming you have one or else install one). In the screen shot you can see a site hosted on IIS server being accessed with Puppy Linux running Mozilla. By enabling directory browsing of the site you can even share files between both operating systems. Below is screenshot of Mozilla on Puppy displaying a page hosted by IIS on Windows 2003.

Enabling Sound

Enabling sound is also very easy.QEMU supports SB16 emulation .This is something I like about running Linux on QEMU , no problems with sound card .But Puppy could not detect sound card by itself. I used help documentation accompanying with puppy was of great help. Make sure you started QEMU with ‘audio’ option.

#cd /lib/modules/2.4.27/sound
#modprobe -v sb

You should see following entries in output of lsmod


I just put a simple audio file on my web server and pointed Mozilla to the site. From directory listing you can save the file and/or play it using gxine. Below is screenshot showing gxine playing a wave file. The sound may be quite squeaky though ;-)

Transferring Data using Virtual Hard disk Images

If you are a samba fan then you should definitely try installing and running samba with QEMU+PuppyLinux. Another nice way of sharing data between host and guest OS is using ‘disk images’. QEMU comes with a utility qemu-win.exe which can convert different types and sized virtual hard disks for use with Puppy Linux .I could successfully create qcow and raw formatted disk images. The advantage of qcow format is its small size which grows as you write to it. The advantage of raw format is that you can format it and use with a program like WinImage.Now comes the question of accessing this data .WinImage is an excellent program for this. It can even write(inject) files into a (raw formatted) virtual image files with FAT. Then I used FreeDOS floppy image and QEMU to format it to FAT16. Now you can use such a hardisk as ‘hda’ or ‘hdb’ of QEMU , mount it on puppy Linux and save data on it.

Doing More interesting things!

There are many more interesting things still you can try out. Firstly you can try out samba and experiment using OpenVPN(QEMU TAP version). There are many additional packages called dot-pups available for Pupply Linux here.I think combination of QEMU and Puppy Linux is just the perfect combination for small Linux that runs inside windows like normal programs. Moreover the executables for QEMU and Puppy Linux ISO occupy just around 70 MB of disk space and give you a full fledged Linux system with GUI and networking. This combination I think will be very helpful for those interesting in making small Linux distro ,students and hackers.

Puppy Linux download

Puppy DotPups


Puppy Home Site

QEMU for Windows TAP patch

QEMU with OpenVPN

Transliteration Tools for Indian Languages

Do you frequently type Marathi or Hindi using English alphabets . Ever wished you could write your stuff in Devanagari , without much hassles, then you should definitely read this.Transliteration is process of converting letters of one language to their phonetic equivalent representation in another . In simple language if you type ‘Kaise ho‘ you should get ‘कैसे हो‘ . Imagine how easy and fast it would make typing your mother tongue .

  • kaay kam karato = क्या काम कर रहे हो
  • kyaa chal rahaa hai = क्या चल रहा है

If you ever tried writing in Devanagari into your text editor then you must be very well aware of special fonts that one has to install on his/her machine. Also the person who reads your document should have same fonts installed. This can be a bit of pain. Well, this is the older way, before Unicode existed.

So what is Unicode ?

Unicode is an encoding standard for characters, that gives a unique number to every single character in every single language. It is consistent across all platforms and operating systems. It means if I write something in Unicode and email it to a friend using Linux, he will be able to read my message, without having to install any special software. This is because most modern operating systems and software libraries have inbuilt support for Unicode. To find if your system is capable of showing Unicode stuff visit this link , you should see something meaningful.Let me tell you, thought Unicode is universally supported these days , you need at least one Unicode complaint font like ‘Mangal’ or ‘Arial Unicode’ installed . Generally such a font is bundled with operating system , very rarely need should arise to download them separately.Okay lets get to business. The following are a few well known software packages that perform transliteration.

Google Input Tools

By far, the most popular and convinient online transliteration package. Supports many Indian languages and has already been integrated into Google’s online product ecosystem. You can try it here .

There also exists an desktop version of the tool in form of Google Input Tools for Windows . These are basically IMEs (Input Method Editor) for Indian languages available for many Indian languages. Once installed an IME can be basically used with any program you want like messengers,browsers, text editors etc.


ITRANS is a well known old transliteration software. It works with special Indic fonts which the user has to download before using it. It is no longer under active development. The reason is UNICODE. But if you are using older system then you may want to have a look at it. ITRANS provides transliteration for Devanagari (Sanskrit/Hindi/Marathi), Tamil, Telugu, Kannada, Bengali, Gujarati and Gurmukhi. The very first thing you will want to look before using it is the ‘Transliteration Map’. It shows you which letters in English will produce what output in Indian languages. There is an online interface for ITRANS , which was not working at the time of writing.


JTRANS is a package similar to ITRANS , but has been written in javascript. So you can download it and use it offline.It also makes use of special fonts (instead of Unicode) for output. The online interface for JTRANS works really well and you should try it after installing required fonts.


You all will like this , because it supports Unicode. So you don’t have to have any special fonts installed . Just following this link . Now, there’s a small problem. I couldn’t get it working on IE , but it works just fine on FireFox. On more small problem I noticed was, I couldn’t see joined words properly.For example for ‘kra’ I was expecting the output क्र , but end up getting क् and र seperately. This problem seems to be of FireFox or rather of ‘FireFox for windows’. If you copy the hindi text for ‘kra’ and paste it in Microsoft Word you get correct letter! If you are interested to know how ‘joins’ are rendered in Indic languages read this. On this page search(Ctrl +F) for “half forms” of Devanagari letters and read the answer to the question. The FAQ is very interesting.

Indian Languages Type Pad

A cool transliteration software entirely written in javascript by Vishal Monpara. It offers transliteration in quite a few Indian languages. It integrates into your existing web applications effortlessly. Just add the following HTML to your webpage:

<input type="button" value="Type Hindi" 
onclick="win ='','Comment',
win.document.write('<script language=\\'javascript\\'>
var id=\\'TEXTAREAID\\';</script><script

You can also check out an online demo on his site here. The best part is that this is a free software.


Baraha is nice source for Transliteration tools. This site offers you a complete IDE for composing Indian Language documents , which can be downloaded here. I haven’t tried it out though. BarahaIME is very interesting, it is an Input Method Editor which works with Windows. Once you install it , you will see a small icon to right of your taskbar. Now start any editor or program . Click on taskbar icon and select the Indian language of your choice and just start typing into the editor/program. One important thing here, if you see some meaningless characters as you type change the font of the editor to a Unicode complaint one. IMEs are a great way of transliteration as it allows you to use multiple languages simultaneously. For example you can chat with someone in Hindi in one window and Kannada in another one.

Menu that appears on clicking on BarahaIME taskbar icon

Typing Indian language text directly into messenger using BarahaIME


iLeap is from CDAC ! You might have used it . I have tried the older version . Hope the newer versions support Unicode and don’t rely on special fonts.You can download iLeap from this site . Ileap is the only true ‘editor’ for Indic languages . I would really love to see Unicode support.If anyone has any news on this please write a comment.


Vachak is a Indian language Text to speech software . An impressive online demo is available here, which performs transliteration as well as text to speech ! Don’t miss this one.


I just found this tool from the internet . I haven’t used it, yet . If you know anything on this please inform me

More !

Implementing a transliterator is not very difficult. If you have descent knowledge of a programming language and have a descent transliteration map at hand, you can make your own transliterator (as I did sometime back). I prefer transliteration to onscreen keyboards.People tend to expect a lot from transliteration , then often confuse it with ‘translation’.I see transliteration as an effective method on inputting ‘Unicode text’ . It can work wonders if used in mobile phones ,handhelds and instant messengers. If you know of more such tools , do post a comment .

How to use my album script on your website

I assume you have very basic knowledge of HTML. There are quite a few steps to be followed:

1] Download the zip archive from this location and unzip it to a folder.

2] Get all your images into the ‘hh’ folder. You will have to resize all images to 640*480 for displaying. Also thumbnails of 100*75 are required. Put the thumbnails into same directory with a different name. You can use GIMP to do the job of creating thumbnails and Picassa to resize images to 640*480.

3] Once you have thumbnails and images, the fun begins. Now you need to get a Google Map key. Visit this site and register to get your 86 charactor Google Map Key. Edit the photoalbum.html page and replace the #######… in first <script> tag with your google map id.

4] Open the images.xml file in notepad or any XML Editor. It is this file that contains all important information. To find latitude and longitude you can search for the place in wikimapia. Move the desired location to the center of the screen for maximum accuracy. On the address bar you should be able to see something like . You can get the coordinates from this query string. Here latitude of place is 17.991438 and longitude =73.027003 . If you see closely you can even get the zoom !(z=17). Enter one tag for each image . Make sure that you entered the right paths for images and thumbnails. An example file is given here:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="images.xsl"?>
<caption>Nice big mushrooms in the garden.</caption>
<tooltip>Somewhere here (I think!)</tooltip>

5] Do not enter any special charactors or line breaks into the text inside <caption> and <tooltip> tags. Right now the script is unable to handle it and produces errors.

6] Now upload all the files to your website , simple access the photoalbum.html file and your album should be working ! You can comment on this using email address specified in the FAQ section of the website or drop a comment.