Theora

From ElphelWiki
Revision as of 07:53, 14 May 2007 by Eplese (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The model 333 camera is able to encode and stream video in Ogg Theora in realtime. In order to encode in Theora the older 6.3.9 firmware must be loaded onto the camera. Due to space limitations in the FPGA, each firmware can only support a single encoding algorithm, either MJPEG or Theora. The 6.3.x series supports Theora and the 6.4.x and 6.5.x series support MJPEG.

Web Interface

Once the 6.3.9 firmware is loaded and an IP address is configured, the web interface on the camera is used to download short Theora clips for testing and also to set the video parameters which are also used by the Theora streamer. There are quite a few settings so it can take some time to adjust them properly to get a good picture.

Theora Streamer

The Theora streamer can be acquired from the SourceForge download site and the file is Theora_str_1.0.tgz. This contains the source and compiled binaries for the streamer (theora_str) and the receiver (theorartp-client).

For the following examples it's assumed that the streamer has an IP address of 1.2.3.4 and the receiver has an IP address of 1.2.3.5. The examples use unicast rather than multicast for simplicity.

Streamer

This method uses HTTP to transfer the executable to the camera so a webserver of some sort is required. In addition this is temporary and will be completely lost when the camera is powered off.

$ telnet 1.2.3.4
$ cd /tmp
$ wget http://webserver/theora_str
$ chmod +x theora_str
$ ./theora_str -a 1.2.3.5 -p 20000 -k 25

This will download and run the streamer on the camera. The -p option is the IP port and the -k is the number of interframes between intraframes (keyframes) in the Theora stream.

Receiver

$ theorartp-client -i 1.2.3.5 -p 20000 -f output.ogg