February 26, 2009

simple scripting help for air mozilla

As I'm sure at least some of you know, I'm not a programmer -- not even close. So, when I run into even basic scripting tasks, I have to reach out to a colleague, or in this case my readers, and ask for help.

Here's what I'm doing.

For Air Mozilla streaming broadcasts, I've got a DV camera hooked up to a MacBook Pro via FireWire. The MBP is running Ubuntu 8.10. These are the steps I take to stream video to Air Mozilla.

  1. Connect the camera to the laptop and ensure that they're both powered up.
  2. Open a terminal and run the command sudo chmod 777 /dev/raw1394 which prompts for the root password. (This seems to be necessary for the user to get access to the FireWire device.)
  3. Run the command dvgrab --format raw - | ffmpeg2theora -a 0 -v 5 -f dv -x 320 -y 240 -o /dev/stdout - | tee [EVENT NAME].ogv | oggfwd icecast.mozilla.org 80 [PASSWORD] /[CHANNEL NAME].ogv
  4. ctrl+c to stop it all.

I'd like to simplify this so that others in the building can grab the camera and the laptop and stream without having to know any of this.

First, surely it's possible to permanently change permission on the FireWire device or make it so that it automatically gets changed at boot or login. It seems a pretty odd requirement but I don't know how to make the change stick.

Second, I need a simple script that that a user can just double-click on, be promoted for the "event name" (name of the local file that will be saved) the password, and the "channel name" (the name of the stream), hit enter and be streaming live video.

A somewhat more sophisticated script could ask for a quality and size setting, maybe offering a couple of presets.

An even more awesome version would have a simple little GUI so users didn't even have to see the terminal window.

Anyone out there willing to take a stab at this so we can have more Mozillians streaming more live events?

Posted by asa at 4:24 PM

 

asa2008.jpg