|
Write a comment |
Articles |
DHTML Gallery |
.NET |
MyBlog |
About Me |
FAQ
|
![]() |
|
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
![]() 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
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"
name="video1"
autoplay="no" loop="yes" width="400" height="300"
target="http://localhost:8080" />
<br />
<a href="javascript:;" onclick='document.video1.play()'>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"> </OBJECT> Useful links [All trademarks and registered trademarks appearing on ashishware.com are the property of their respecive owners.] |
| Copyright (c) 2007-2008 Ashish Patil . Please read FAQ for more details. |