Live streaming cameras using wifi, in Dakar

The goal is to provide local and internet live streaming for outside events, using a wifi network made with home-made antennas.

It's for a project from the Scénographies Urbaines, with x-réseau, that happened on 8th 9th and 10th of may 2010 in Dakar and on x-reseau.fr/dakar/.
You can take a look at the blog that tells about our trip.

This page is about the technological part.
We did some of the antennas at the Théâtre Paris Villette, and then we worked at Kër-Thiossane in Dakar.

    Contents:
  1. Architecture
  2. Hardware details
  3. Software details
  4. Photos
  5. Ressources
  6. Thanks

Architecture

Each element of the schemas is explained under.

Day 1 : Two dancers with on-eye cameras in a batiment, live local projection and internet streaming.

day1 network schema

Day 2 : Two dancers with on-eye cameras in a market, live internet streaming

day2 network schema
There where no internet on the outside market, so we had to take it from a house quite far, relay it to a big building above the market, and put an omnidirectional access point there.

Day 3 : One static camera in the street, live local projection and internet streaming

day3 network schema

Dancers

The dancers have an on-eye webcam, replacing one of their eye. The camera is mounted on glasses frames, it's very easy to do :
dancer on-eye camera
It is connected to a netbook in a bag, and connected to the central machine using an a wifi adapter.
Here are the two bags opened :
dancer camera bag

The OS used was Ubuntu, on which a VLC instance was running, capturing the image and sound of the webcam, and streaming it on vlc's httpd.
We used MPEG-2 codec, quite heavy about the size, but easy on CPU and good quality.

Central machine

The central laptop is running a wifi access point using an external usb adapter. It has 1 or 2 VLC running, each one connected to one dancer's / static camera vlc, and streaming on the local network using vlc's httpd.
That way, other machines connected to the wired network can use the stream without disturbing the wireless network.
We choose OpenBSD for that central machine, for the easy configuration and robustness.
The VLC on that machine didn't transcode the stream, to keep the best quality for the video projections.
See the
localstreaming section.

Relay machine

The relay laptop used on day 2 was running OpenBSD, and was just routing the web streaming traffic between the wired internet connection and the point to point wifi link.

Video projections

Those are laptops, here running on MacOS X or Windows 7 and using VLC, connected to video projectors or large screens, and displaying the streams live in good quality.

Web streamer

VLC reads the streams from the central machine, and streams it to a streaming server. See the webstreaming section.

Streaming server

The streaming server is Red5 on a Debian server on an OVH machine.

Hardware details

Wifi usb adapters

We are using powerfull usb adapters from Alfa Networks that are more powerfull (1 / 2W max) than traditional usb adapters (~100mW).

Antennas & Cables

On the wifi adapters of the point to point connections of day 2 and day 3, we connect home-made wireless antennas, using home-made cables.
Here is an example : Usb adapter - cable SMA reverse to N connector - Yaggi antenna with N connector
wireless chain
We didn't use that Yaggi antenna, built with an ice cream stick, paperclips and a piece of copper wire.

For the point to point connection, we used cans antennas, using Ricoré boxes :
ricore antenna 1 ricore antenna 2

For the access points, we built a colinear one, and then we decided to use the default antennas because our antenna wasn't better ... I'd like to do a waveguide one, or a colinear using pieces of coaxial cable.

If you want to build such antennas, see the links in the ressources sections.

Software details

Running the access points on OpenBSD

I added a buggy hostap mode in the OpenBSD run(4) driver, so i can create a wireless access point with Alfa AWUS036NH / AWUS036NEH on my favorite OS.
Here is the patch. It's mostly adapted from FreeBSD and the OpenBSD rum driver.
It worked for the event (9 hours video streaming between one client and the Access Point, no cuts), and I still use it for temporary access points, but it's far for complete : no way to set wpa keys, and it will rapidly refuse to accept new clients because it misses many things and I did no workaround for the chipsets limitations.

Local streaming

ffmpeg : nice potential, but our versions (0.5.1 and svn) crashed often on both linux and openbsd, we hardly found (poor) documentation, and there where a big video delay we couldn't solve.
Xuggle can help ffmpeg streaming to an rtmp server.

VLC : very functionnal with filters, there is some documentation, you can make it work. See their wiki too.

Web streaming

camtwist and soundflower are used to capture the video and audio output from VLC and it is streamed as a virtual webcam using the red5 streaming interface.

Until the end we wanted to use VLC or ffmpeg to bring the stream to our server in France in h264, but we failed ...
Capturing the streams is interesting because it's very flexible. But it's not solid enough, and in our case it was a Flash only solution for the clients.
So i'm not satisfied with that and I hope we'll be able to find a solution offering more choice to the clients, with better quality. It's possible, thats for sure.

It is interesting to see that you can already stream to flash applications using VLC, but we didn't had time to fully test that.

Photos

my photos

Ressources

Sites about building wireless wifi antennas :

Ricore :

Sites about wifi :

Amplifiers for 2.4Ghz :

Powerfull wifi usb adapters :

Connectors :

Similar projects in africa :

Telecom regulations in senegal

Thanks

Estelle Senay from x-reseau and I would like to THANK :