Sunday, January 28, 2007

Using Windows Media Encoder for videoconferencing

When you wish to talk face to face with someone across the internet, most of us would use an instant messenger like Yahoo or perhaps Skype.

But the quality and experience you get with these leaves a lot to be desired. The frame rates are typically quite low and there are frequent freezes.

For those of us who have a fast internet connection, there is a nice alternative and its absolutely free. Its called the "Windows Media Encoder" and it is available for free download.

With it, not only can you broadcast your webcam to multiple clients, but also let them view true streaming video unlike Yahoo which sends single frames at a time like a slideshow. Moreover you can easily "telecast" a video from your own PC to anyone you want to.

The name doesnt say much but it is a really versatile and professional tool which can perform a wide variety of multimedia tasks.

  • Capture video from your webcam, the live desktop screen or a video file
  • Encode using the advanced Windows Media codec
  • Stream the output to any number of clients with multiple bitrates
  • Client requires no additional software to view, just Windows media player

  • Here's how you can set it up for broadcasting your webcam.

  • Download and install Windows media encoder from this page
  • Next, you need to configure your network conection to accept incoming connections on some port or find a port number which is open to both TCP and UDP traffic. If you are on a local network, you may have to configure the gateway ( or get the administrator to do it ). DSL/Cable users will need to configure their router or modem. Also your software firewall has to be configured. You can confirm if the port is open by going to http://www.grc.com and trying the ShieldsUp test for the port that you configured.
  • You will also need to get the public IP address of your system. You can do that quickly by visiting http://whatismyipaddress.com which reports the public IP address of your machine.
  • On running the application ( Handy shortcut : you can just type wmenc in the Run dialog to launch it ), A wizard dialog pops up letting you choose the action you wish - Choose "Broadcast a live event".
  • In the next dialog, choose your Video and Audio capture devices.Note that any configuration that you make for those devices doesnt seem to get saved ( this is a bug )
  • Next, Select the option "Pull from the encoder..."
  • Then in the following dialog, enter the open port number that you found or configured earlier.
  • Now you are presented with a dialog where you can choose the bandwidth(s) of the broadcast stream. You can choose multiple bandwidths, in which case the stream gets more detailed if there is improvement in the network or if multiple clients with differing bandwidths are viewing the stream. Note that most webcams output at 320 x 240 at 15 to 30 frames per second, so it may not make sense to choose values much higher than that unless you are sure that the device supports it.
  • The dialogs which follow allow you to archive the stream or add information and tags to it, finally you can click Finish to end the configuration and start broadcasting ( check the box "Begin broadcasting when I click Finish" or click the green "Start Encoding" button on top after)
  • Now youre all set to broadcast to any number of clients by sending them a URL of the form mms://127.0.0.1:8080 where you replace 127.0.0.1 with your public IP address and 8080 with the port number that was configured earlier. They can simply open Windows media player, Click on File->Open URL and enter that URL there.The player will buffer data for a few seconds, depending on the speed of the network connection and then start streaming the broadcast.
  • At any time, one can stop the broadcast and configure several advanced options for DRM, custom encoding profiles, video processing plugins, buffering etc. The whole configuration can be saved to a file.
  •