Screen sharing with VLC media player

I have created a batch script that will share your screen with others. The disadvantage is you will need to allow inbound connections (why port forwarding is sometimes necessary).

start VLC -I dummy screen:// :screen-fps=4.000000 :screen-caching=300 :sout=#transcode{venc=ffmpeg{keyint=40,hurry-up},vcodec=WMV2,vb=150,fps=4,height=480,acodec=none}:http{mux=asf,dst=:PORT/} :no-sout-rtp-sap :no-sout-standard-sap :sout-keep

  1. Change PORT to the desired port. It may be any unused port above 1024. Examples include 2199 and 8080.
  2. Put the code into a text file in your VLC directory called stream.cmd.
  3. Double click to run.
  4. Access the stream with WMP10 or VLC at http://YOUR_IP:PORT/
  5. Replace YOUR_IP and PORT with your current IP address and your chosen port. An easy way to find your current IP address is by going to ipchicken.com or whatsmyip.org

This will broadcast your screen at 4 fps at 150 kilobits/second. It can be opened in any program that can display wmv2/asf/http. Example programs include Windows Media Player 10 and VLC. If need be, you can change height (the vertical resolution in pixels) and vb (the bitrate in kilobits/second) as necessary. Note that the width is inferred from the height. This batch file could potentially be modified to run on operating systems other than Windows. I use this often to share my screen with friends, and to allow friends to watch me play Starcraft 2. Note for Starcraft 2 in particular, the game will need to be in Windowed-fullscreen or windowed mode.

Leave a Reply