Technical blog about AI programming and Open Source technologies
As a member of the French Python user group (AFPy) I took part in the organization the second edition of Pycon FR in Paris last week. The event itself was a great success with more than 120 physical attendees and on average 40 people remotely attending the event through our live video stream.
The following shows how we got the stream up and working hoping that our experience might help other benevolent conference organizers to set up a similar 100% free software based infrastructure.
The Agora room of the Cité des Sciences et de l'Industrie features sonically isolated monitoring room with a high bandwidth internet connection. The room is equipped with 3 remote controlled cameras and 2 microphones. Three monitors and a remote control allows the operator to adjust the cameras and select the one to broadcast. The audio-video analogical signal is then plugged into a movie box that outputs a live DV stream over a firewire link.
The movie box is then plugged into a Core 2 Duo laptop running Ubuntu Gutsy. The laptop is used to encode the DV stream into a ogg theora / vorbis stream using the ffmpeg2theora utility. The unix 'tee' command is used to pipe a local copy of the video on laptop hard drive while broadcasting to the remote streaming server using the oggfwd tool.
The streaming server is a single kimsufi box running Ubuntu Feisty with icecast. The bandwidth of the server is 100 Mbps which should be enough for up to 400 simultaneous clients (for a stream at 250 Kbps). For more clients it is possible to setup several icecast relays and spread the load across them.
Here is the helper script I saved as ~/bin/oggbroadcast on the laptop that did the live acquisition of the DV signal through a cheap PCMCIA / firewire adapter I found here.
#!/bin/sh
# encoding and broadcasting settings
X=320
Y=240
SERVER_NAME=oliviergrisel.name
SERVER_PORT=8000
PASSWORD=theprecious
MOUNT_POINT=/pycon_fr_2008_live.ogg
STREAM_TITLE="Pycon FR live stream"
# local copy settings
BACKUP_DIR=/home/ogrisel/streams
TIME_STAMP=`date +%F-%T`
# ensure the backup directory exists
mkdir -p $BACKUP_DIR
# the actual grabing / encoding / broadcasting chain
dvgrab -f raw - | \
ffmpeg2theora -a 1 -v 6 -f dv -x $X -y $Y -o /dev/stdout - | \
tee $BACKUP_DIR/stream_${TIME_STAMP}_${X}x${Y}.ogg | \
oggfwd -n "$STREAM_TITLE" $SERVER_NAME $SERVER_PORT $PASSWORD $MOUNT_POINT
These encoding settings (X=320, Y=240, -a 1 and -v6) give a 250kbps ogg stream (around 180kbps for the video and 70kbps for the audio). I think these settings are optimal for live streaming since any broadband user should be able to track the presentations without interruption.
The video quality is unfortunately too poor to make it possible to read the slide contents on most presentations. Next year we will collect the slide files earlier to be able to publish them on our website before the beginning of the event so as the remote attendees not to be penalized by the video quality.
sudo cpufreq-selector -g performance
posted at: 23:31 | path: / | permanent link to this entry