FanPost

How To: Live Audio Race Commentary

VideoLAN (aka VLC) is the open source (free) swiss army knife of media streaming and transcoding. It runs on Windows, Mac, and Linux. It's indespensible for a media starved cycling fan. If you can watch it or listen to it, VideoLAN can encode it to a file, decode it from a file or serve it up on a network in dozens of formats.

You can use VLC to encode live audio from a microphone that's plugged into your PC or laptop into an mp3 stream. If you aren't satisfied with the commentary for the ToC, you can provide your own to the world!

The "how to" follows below:

Network Setup
You need some network know-how to make your world-wide debut. A detailed networking tutorial is beyond the scope of this write-up, so here are some basic hints.

There are a handful of common network configurations for cable and DSL providers. If you have a public IP address, you're good to go. You'll just need to configure your firewall to allow access to the port we'll use (more on that later). Alternatively, your modem might use NAT (Network Address Translation), so your PC has a private IP address (private addresses will start with "10" or "172" or "192"). In that case, you'll need to configure DNAT (destination NAT) so your PC can be reached from the Internet. Or, your ISP might use a private address scheme that prevents the outside world from connecting to your PC (Boo!).

Hardware Setup
You need a microphone and a relatively modern PC or laptop. If you don't have a mic, you can use a pair of headphones, though the sound quality won't be as good.

VLC Setup
Download and install VideoLAN (VLC). It has a spartan, functional graphical interface.

First, before you broadcast to the world, you'll want to do a loopback test.

Start VLC, and from the "File" menu select "Open Capture Device". A dialog box will pop up that allows you to choose audio and video sources. For the video source, select "None", and for the audio source select the name of your audio adapter. Next check the "Stream/Save" box and click the "Settings..." button.

Another dialog box will open with a mind boggling set of choices.

For the "Outputs" you want to serve your stream via the "mmsh" protocol. Check the mmsh box. In the "address" box next to "mmsh", enter 127.0.0.1. For the encapsulation method, select the ASF format. For the transcoding options, check the "Audio codec" box, and select "mp3". A bitrate of "128" kbits is great quality, but will probably consume all your available bandwidth with three or four simultaneous connections. A "32" kbps rate sounds like a bad cell phone call, but is intelligible, and you will probably be able to support an audience of 10 people! You'll be famous.

Finally, click OK, and you're ready to listen to yourself.

Open your favorite media player, for Windows Media, select the "open URL" option, and enter the following address:

mms://127.0.0.1:1234/

Note the "port" is specified after the colon. The VLC player typically uses port 1234. When you configure your firewall, specify TCP port 1234.

You should be able to hear yourself, or massive feedback. In either case, you're ready to broadcast world-wide.

Stop VLC, and run through the setup again, but replace "127.0.0.1" with "0.0.0.0" and let the world hear your cycling commentary!

Conclusion
This diary entry is just one example of the many things you can do with VLC. Numerous good how-tos on other topics are out there on the web. Have fun!