website maker

Video recorder and streamer (wired IP camera)

view/record what is viewed inside and/or around the camper at parking lot or while driving

Mobirise

Main components:
- IP camera,
- the camper' NAS,
- the camper' router and switch.

The IP camera has an image processor inside that does a lot of work with the data and then broadcasts the video over standard RTSP Protocol. As a result, the devices that receive this video may be without a powerful processor. To utilize this advantages, the settings (resolution, frame rate, etc.) of the camera and the streaming from It must be configured in the camera and must not be changed in the devices receiving this video. These parameters, as well as the IP address of the camera (it should be a single IP address in the local network of the camper), login and password, synchronization of the camera time with the computer, automatic restart, are easily set in the local network with ONVIF Device Manager.

Ideally, it should be wired connected the IP camera directly to the camper’s router (switch), if possible to organize wires inside the camper. This case is described here.

Streaming from the IP camera will be available on the camper's local network by IP. Video recording (archive) will be stored in the camper’s NAS and will also be available.

All settings were made via Windows PC. In some cases will need switch off the PC firewall while settings.

Mobirise

After the camera was connected to the router (switch), the static IP address of the camera (DHCP off) was set through the ONVIF device Manager.

It was then authorized as the root user for the NAS from PC via PuTTY over the NAS IP on port 22. Then the command was made:

nano /etc/exports

In the open file, the full path of access to the NAS shared folder (in this case, CA-NAS-shfld) from any NFS client within the camper’s network was found. In this case, it was /export/CA-NAS-shfld.

In the shared NAS folder, it had to make a folder to archive video from the wired IP camera. Here the camera/folder name was external_cam_02. For this, commands were entered in the PC terminal:

Ctrl+X

mkdir /export/CA-NAS-shfld/outer_cam_02

Then the size of the folder for video archive from IP-camera to 10000 MB was limited. To do this, the crontab file was opened and added to its end:

crontab -e

# in this case, "Joe's Own Editor" was opened

# the following line gives the command every 6 minutes to delete the oldest files in the folder when the folder size exceeds 10000 MB

*/6 * * * * while [ $(du -sm /export/CA-NAS-shfld/outer_cam_02| cut -f1) -gt 10000 ]; do rm -f /export/CA-NAS-shfld/outer_cam_02/"$(ls -1c /export/CA-NAS-shfld/outer_cam_02/ | tail -n1)";done > /dev/null 2>&1

# and at least one empty line should be at the end of the file!

Ctrl+K, Ctrl+X

Then the FFmpeg package was installed within the NAS computer:

apt-get install ffmpeg

Whereas in this case:

- camera IP 192.168.1.10,

- the user name of camera is admin without a password,

- the frame rate of RTSP streaming from the camera is 17 (the best choice is not to change the frame rate further as the camera resolution),

- the duration of the video for recording - 2 minutes,

commands were entered in the PC terminal:

crontab -e

# in this case, "Joe's Own Editor" was opened

# the following line gives the command every 2 minutes to record 118 seconds of the stream from the camera to a file with the current date and time in name

*/2 * * * * ffmpeg -rtsp_transport tcp -i rtsp://192.168.1.10:554/user=admin_password=tlJwpbo6_channel=1_stream=0.sdp?real_stream -r 17 -t 118 -vcodec copy /export/CA-NAS-shfld/outer_cam_02/`date +\%Y\%m\%d\%H\%M\%S`.avi > /dev/null 2>&1

# and at least one empty line should be at the end of the file!

Ctrl+K, Ctrl+X

Streaming from the camera can be opened, for example, in VLC player by URL: rtsp://192.168.1.10:554/user=admin_password=tlJwpbo6_channel=1_stream=0.sdp?real_stream

The camera archive is located in the camper’s local network /CA-NAS/CA-NAS-shfld/outer_cam_02/, has up to 10,000 MB of archives of 2 minutes each, named by date + time of recording.

 

A software you can load here is free for a non-commercial use except for components for which their owners declared their own rights. Can be limited by local laws. 

All your data will be stored only locally with a software you can load here.

 

Get updates