Postby markfm » 17 Jun 2004 13:24
As an example:
c:\vlc\vlc.exe C:\cygwin\home\mfm\Sail.mpg :sout=#transcode{vcodec=WMV2,vb=256,scale=1,acodec=mp3,ab=96,channels=2}:duplicate{dst=std{access=mmsh,mux=ts,url=127.0.0.1:8080}} vlc:quit
The above says:
-Start vlc
-Play sail.mpg
-Transcode to WMV2 video CODEC (an older Windows media CODEC, generally supported by more viewers), mp3 audio
-Set the output video to 256 kbps, audio to 96 kbps
-Use mmsh as the Output Method
-Use MPEG Transport Stream as the encapsulation mechanism
--Pump it out on the PC's local network interface, on port 8080
-- Quit (close) VLC when it is done playing
There is also some way to install VLC as a service -- use vlc --advanced -H to see the full set of options. I'm not sure what that would be used for, however.
A Windows Media Player can connect to this by using File -- Open URL
and plugging in: mms://server_IP_address:8080
in the space provided by WMP
Depending on if/how Windows Media Player has been linked to Internet Explorer to automate how WMP launches, you can then also use the mms:// line in IE and it will automatically open WMP and start playing the movie that VLC is streaming.
I am not sure if once you already have an http connection open to a Web server, you could "just" launch the vlc commmand and IE would automagically declare it to be something that it should open with WMP.
If it's a case of moving static content, files, any real reason you want streaming off of the server itself? Personally, I would just use VLC to transcode the movies so there were a couple of different bandwidth versions available. Make the links on IIS simply act as a straight file selection (users click on "mybigfile.avi" or "mysmallfile.avi"); IE automatically recognizes that an AVI is a file that it should open with WMP -- it will download the file to the user's local disk and automatically open it with whatever player is identified for the file type (WMP is normally default on Windows, for MPEG and AVI files).
(I would definitely use VLC if I was trying to stream live video feeds, since by definition there is no single file to move, but if you are moving/opening single multimedia files, simple is not a bad thing. If you experiment on the 'Net, you will see that even though a given location has a nominally high bandwidth, there are often "burps" as given content (whether a single file or a live stream) traverses the 'Net, delivered bandwidth varies pretty radically. To view live streams you have to crank buffers up, else get annoying pauses. My opinion only, but I would rather wait to get the whole video file locally on my disk, let IE auto-launch WMP, see the movie play nicely.)
Good luck!