Embedded/Hardened Flash Media Server 3 on X/Ubuntu Hardy Heron 8.04
A mil spec hardened FMS server and raw video stream publisher were required in order to stream drive camera , ptz and thermal surveillance video over RTMP streams from a robot back to a Flex user interface. I opted to use a PC-104 stack from to meet the temperature requirements and a mil spec hard drive. I also used a PC-104 4 input frame grabber in order to get all four robot cameras online. The frame grabber showed up as /dev/video0 with all four channels and we had to write a crop tool that brook the four quadrants of data and placed them onto vloopback V4L2 buffers. The new Flash Player 10 beta2 player was not able to pick-up vloopback as a valid V4L2 device so I opted for using the FlashCam project to convert my V4L2 device back to V4L. I used an AIR application that picked up the four streams and “published” the video at it’s highest quality to a localhost FMS server. Because of this need I had to have an X sessions so I used Xbuntu as the operating system. It is pretty slick install as it gets rid of all the traditional junk the Ubuntu desktop has in order to keep it fast. I assume that I could have cut down RHEL and gone with a supported FMS server but the following information will tell you how to get a dev version of FMS up and running on Xbuntu 8.04.
To install Flash Media Server on the box I had to follow the patch process outlined by Markus Bertheau and the first half of these steps were taken from this aYo Binitie II.
The following process gets Flash Media Server installed properly.
Install the additional libraries needs to run FMS on Ubuntu
$ sudo apt-get install libnspr4-dev
Unzip the download which for me was on my Desktop
$ unzip Flashmedia3_Int_Strm_ALP.zip
$ cd Flashmedia3_Int_Strm_ALP
$ tar xvzf FlashMediaServer3.tar.gz
Download and install the patch
$ cd FMS_3_0_1_r123/
$ wget http://www.bluetwanger.de/~mbertheau/flash-media-server-3-ubuntu.patch
$ patch -p1 < flash-media-server-3-ubuntu.patch
$ sudo ./installFMS
I ran with the defaults on everything. If you have Group issues then the patch did not work properly!
Installation complete! Double check
$ sudo /etc/init.d/fms restart
$ tail /var/log/messages
Jul 16 08:24:10 wade-laptop Service[21193]: Server stopped .
Jul 16 08:24:10 wade-laptop Service[22858]: Server starting…
Jul 16 08:24:10 wade-laptop Service[22858]: Server started (/opt/adobe/fms/conf/Server.xml).
Jul 16 08:24:10 wade-laptop Adaptor[22878]: Listener started ( _defaultRoot__edge1 ) : localhost:19350/v4
Jul 16 08:24:10 wade-laptop Adaptor[22878]: Listener started ( _defaultRoot__edge1 ) : 1935/v4
Jul 16 08:24:15 wade-laptop Service[23053]: Server starting…
Jul 16 08:24:15 wade-laptop Adaptor[23053]: Listener started ( FCSAdminIpcProtocol ) : localhost:11110/v4
Jul 16 08:24:15 wade-laptop Adaptor[23053]: Listener started ( FCSAdminAdaptor ) : 1111/v4
Jul 16 08:24:15 wade-laptop Service[23053]: Server started (./conf/Server.xml).
$ ps -e | grep fms
22858 pts/1 00:00:00 fmsmaster
22878 pts/1 00:00:00 fmsedge
22881 pts/1 00:00:00 fmscore
23053 pts/1 00:00:00 fmsadmin
Now to add an application and set proper permissions. I had a PTZ applications folder on my desktop with the new FMS app that I wanted installed. The following commands are necessary because you need to first make the applications owned by the user and group fms and then you need to remove the setuid bit that is added.
$ sudo cp ~wade/Desktop/applications/PTZ /opt/adobe/fms/applications/PTZ
$ ls -la /opt/adobe/fms/applications/ | grep PTZ
drwx–S— 2 root fms 4096 2008-07-16 08:52 PTZ
$ sudo chown -R fms:fms /opt/adobe/fms/applications/PTZ
$ sudo chmod 755 -R /opt/adobe/fms/applications/PTZ
$ ls -la /opt/adobe/fms/applications/ | grep PTZ
drwxr-sr-x 2 fms fms 4096 2008-07-16 08:52 PTZ
$ chmod -s -R /opt/adobe/fms/applications/PTZ
$ ls -la /opt/adobe/fms/applications/ | grep PTZ
drwxr-xr-x 2 fms fms 4096 2008-07-16 08:52 PTZ
Note that the setuid bit has changed from s to x
$ sudo /etc/init.d/fms restart
Your good to go now! Start using FMS like the documentation says and everything will work fine.


Recent Comments