Difference between revisions of "Theora"
(Mention wget.) |
|||
Line 27: | Line 27: | ||
streamer. There are quite a few settings so it can take some time to adjust | streamer. There are quite a few settings so it can take some time to adjust | ||
them properly to get a good picture. | them properly to get a good picture. | ||
+ | |||
+ | Instead of requesting the page through a browser, wget can be used to download | ||
+ | short Theora clips from the camera. When processing web requests the camera | ||
+ | will first capture the entire clip to RAM and then begin to send the clip | ||
+ | over the network. Requesting a Theora clip of only a single frame can be used | ||
+ | to quickly adjust the video parameters from a script without taking much time | ||
+ | to capture any video. | ||
== Theora Streamer == | == Theora Streamer == |
Revision as of 14:29, 14 May 2007
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.
The 353 camera has a larger FPGA with space for both Theora and MJPEG compressors. Porting the Theora compressor to the 353 is targeted to begin around September 2007.
We plan to resume Ogg Theora project on the new 353 hardware - Axis ETRAX FS is faster so it will better handle streaming (the bottleneck of the Ogg Theora implementation in Model 333).
Combining MJPEG and Theora in the same FPGA would complicate things - my plan is to unify the software part and the non-compressor part of the FPGA code that now are more advanced in MJPEG branch (histograms, gamma correction, timestamping, support of newer sensors). It will be possible to replace FPGA code at run-time or use software (lossless) Theora->JPEG conversion with the faster CPU. I'm also counting on native support of Theora in the browsers (like in Opera) so we can completely switch to Theora.--Andrey.filippov 11:57, 14 May 2007 (CDT)
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.
Instead of requesting the page through a browser, wget can be used to download short Theora clips from the camera. When processing web requests the camera will first capture the entire clip to RAM and then begin to send the clip over the network. Requesting a Theora clip of only a single frame can be used to quickly adjust the video parameters from a script without taking much time to capture any video.
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