/streams

Streaming media from webcams

Primary LanguageJavaScript

Setting up a stream client

Please note: this client/capture combination only works with OS X, but anyone can play along with curl. See instructions further down the page.

Step 1: Downloading files

Save the following files somewhere on your computer:

  • wacaw, a tool for capturing images from a camera on OS X
  • stream, the command-line client

Step 2: Make the files executable

Open a Terminal window (Applications -> Utilities -> Terminal). Change to the directory where you just downloaded those two files, e.g.:

cd /Users/Timothy/Downloads

Make the files executable:

chmod u+x stream wacaw

Step 3: Start broadcasting

./stream

When you start the client, it will prompt you for a stream name; if the stream is created successfully your iSight should start snapping away wildly!

Using curl alone

If you don't have a Mac, or want to use a different application to capture images, here's how you would broadcast a stream using curl:

Update an image

Say you have saved an image from your webcam called capture.jpg and you wanted to update a stream called hungadunga:

curl -T capture.jpg http://streams-test.herokuapp.com/streams/hungadunga.jpg