Netcam Getting Started

From RidgeRun Developer Wiki

Introduction

This article discusses Netcam, RidgeRun's simplified solution for gstreamer-oriented IP Camera system and how to setup it up using RidgeRun's SDK.

Setting up the hardware

This application requires a supported platform listed in the main Netcam Application wiki-page: http://developer.ridgerun.com/wiki/index.php/Netcam_Application#Currently_supported_platforms.

From there you can follow the respective Getting_Started for each platform with instructions on how to install RidgeRun's SDK and how to setup up your target hardware. No special hardware configurations are needed apart for those inside Getting_Started pages in order to enable Netcam functionality.

Setting up the software

Once your target hardware is up and running, the next step is to unpack your Netcam tarball (given by RidgeRun) into your proprietary folder inside RidgeRun's SDK:

cd $DEVDIR
cd propietary
tar -zxvf Netcam.tar

Check dependencies

Before compile the Netcam application, be sure to check that your SDK does have every package needed by Netcam. The list of dependencies can be found on the main Netcam Application wiki-page with a description of each one: http://developer.ridgerun.com/wiki/index.php/Netcam_Application#Python_required_libraries:

Basically, those dependencies are python libraries that should already be included in your default RidgeRun's SDK package and some RidgeRun developed applications that should come inside the Netcam tarball; however, its always recommended to check if they exist in your SDK applications folder:

cd $DEVDIR
cd fs/apps/

# Each grep should output the name and the version of the package, if there's no output, that means you're missing that package: 

ls | grep flup
ls | grep flask
ls | grep werkzeug
ls | grep jinja2

Enable Netcam in SDK's configuration menu

Go to the configuration menu to enable Netcam build, this automatically enables all dependencies build.

cd $DEVIDIR
make config

# -> Propietary software
# -> RidgeRun Python Network Camera
# EXIT (save configuration on exit prompt)

Build the Netcam code

Since RidgeRun's SDK build system is completely automated, you only run the 'make' command in your SDK root folder:

cd $DEVDIR
make

If you wish to make some code modifications, you can just build the netcam app by running the 'make' command in your Netcam folder, remember that the first time you are going to build Netcam, 'make' should be called from the root SDK folder to be sure that all dependencies are being compiled.

cd $DEVDIR
cd propietary/netcam
make clean build install

Use Netcam

After compile the Netcam source code, reboot the board and check that Netcam initialization went fine by running 'tail -f /var/log/messages &' in the target hardware, the output under correct circumstances should look like:

Jan  1 00:00:32 dm385 syslog.info syslogd started: BusyBox v1.20.2
Jan  1 00:00:33 dm385 daemon.err lighttpd[180]: (../../src/src/log.c.166) server started 
Jan  1 00:00:34 dm385 user.err gstd[184]: Started
Jan  1 00:00:44 dm385 user.debug 'DEBUG:app.fcgi:14: app.fcgi starting'

Last line means that Netcam is up and running and you should now be able to connect through Mozzila Firefox browser. It is necessary to install the Firefox vlc plugin in order to enable the live view of the stream inside the web browser:

  • Ubuntu-12.04
sudo apt-get install mozilla-plugin-vlc
  • Ubuntu-14.04
sudo apt-get install browser-plugin-vlc

Finally, type your board's IP in Firefox to connect and open the Netcam's web user interface.

To check your board's IP you can use 'ifconfig' command and look at inet addr:xxx.xxx.xxx.xxx of eth0:

/ # ifconfig
eth0      Link encap:Ethernet  HWaddr 20:C9:D0:2B:5F:3F  
          inet addr:10.251.101.181  Bcast:10.251.101.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:72678 errors:1 dropped:525 overruns:0 frame:1
          TX packets:27297 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:75218938 (71.7 MiB)  TX bytes:2975059 (2.8 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Netcam restrictions

Currently, some Netcam features are on development, so not every feature will be working on every platform. You can check which features are currently implemented for your platform in the main Netcam Application wiki-page: http://developer.ridgerun.com/wiki/index.php/Netcam_Application#Currently_supported_platforms