Relates to: Gigastrand and Next Level NVR Software
We have seen where the drive appears to fill up but there is no apparent reason for the drive being full. Three of the reasons we have seen so far are caused by 4 different but related issues.
- Apache errors – for some unknown reason, the Apache log file (located in /var/log/apache2/) sometimes grows to an incredible size. Deleting the log file resolves this issue.
- Virtual Ramdisk error – The Gigastrand NVR has a virtual ramdisk where it caches images. Sometimes (especially if the motion daemon is fiddled with) the ramdisk will start writing to the user folder. Deleting the files and and NVR restart will resolve that issue as well.
- Storage Limit – If you have a full complement of cameras, the default storage size of 20Gb will fill up very fast (less than 12 hours in some cases). This is too fast for the machine to effectively clean up. This issue manifests itself in the same way as the other 2 issues, but the system is essentially working.
To fix this issue, edit the /etc/kmotion/kmotion_rc file and change the images_dbase_limit_gb to something higher than 20Gb but less than your total available storage. Do an NVR Restart to make the changes go into effect.
Give Gigastrand OS about 64Gb in your storage calculations. Subtract that from your total drive space so that it does not interfere with your video storage.
4. Firefox – If you use live view on the NVR regularly, Firefox will save all the images it downloads in /home/user/.cache/mozilla/firefox/[profile].default/cache2/entries/. Clear this out first. Then, open Frefox and go to menu>Preferences>Privacy. Under History click Never Remember History. Close Firefox and restart the computer.
This list contains a list of IP cameras that have been tested with the Gigabytes NVR. Most cameras that support MJPEG or have a snapshot URL should work with motion-based NVR software (like Gigabytes NVR and MotionEye) but, occasionally, the camera contains some quirk that makes it incompatible or requires special / additional configuration to make it work.
|Dlink DCS‑930L, 932L, 934L|
|Notes||Will DHCP on wired connection first. Can configure wireless from there (where available).|
|Notes||This uses the still image URL.|
|Tenvis IP602W IP391W|
|Notes|| Gigabytes configures the port to 80|
|IP Webcam Android App|
|URL|| /video||Port|| 8080|
|Notes|| This is an Android app that turns a phone into a webcam.|
IP Webcam | IP Webcam Pro
|Linksys WVC54GCA, WVC80N|
Level One FCS-0040, WCS-0020
|Notes||1. Set Substream to MJPEG|
2. Set Main stream to 720p
|Foscam FI9851P, FI9853EP, FI9804P, FI9821W|
|URL||Snapshot (HD): /cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=admin&pwd=|
MJPEG Init: /cgi-bin/CGIProxy.fcgi?cmd=setSubStreamFormat
MJPEG Stream: /cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=admin&pwd=
|Notes||See also: Foscam Setup. Use Snapshot URL for HD. Init URL enables MJPEG stream but may not work on cameras with newer firmware. Pan/tilt controls (where applicable) should be operated from camera back-end. User and password must be transmitted in the stream URL (ex. &usr=admin&pwd=1234)|
|Notes||You will need to configure the sub stream for MJPEG and 640×480 before this will work. See also Amcrest IP2M-844E.|
|Notes||User and password must be transmitted in the stream URL.|
|URL|| /videostream.cgi?stream=0||Port|| 80|
|Notes||Motion errors: Unrecognized content type Error reading first header – re-trying Wireless SSID: Serial# Password: 12345678|
|URL||Currently testing the following URLs:|
|Notes||Use firefox for video: download browser-plugin-vlc from Apper. You may need to disable the Mplayer/gecko plugin so it does not conflict. One of the above URLs is reported to work but we have not tested to verify.|
Foscam cameras come in a wide variety for sizes and styles and have a number of features, however, they are not very Linux friendly. Just to access the back end to change camera settings, a Windows executable is required. This is the case on some other cameras as well.
The good news is that the Foscam cameras can be configured to stream video to the Gigabytes NVR without having to access the back-end. Using the default username and password, you can reserve the IP address it pulls down in the router. Then, follow the instructions below. Source: http://foscam.us/forum/how-to-fetch-snapshots-and-mjpeg-stream-on-hd-cameras-t4328.html
Fetching JPEG snapshots by URL (HD Video)
Fetching MJPEG stream by URL (SD Video)
There are two steps needed to fetch the MJPEG stream.
Step 1: Set the stream to MJPEG.
Here “1” sets an MJPEG stream, if we don’t want to set the MJPEG stream, we would set the number to “0” which sets an H.264 stream.
When inputting this URL and pushing “Enter” in your browser, it will return the following result:
Step 2: After setting the MJPEG stream, it can be fetched using an HTTP URL.
Simply replace the IP address, port, username, and password into the above URL to access your camera’s MJPEG stream.
Accessing Foscam Back-end Natively in Linux
If you absolutely have to access the camera back-end, it can be done with a Virtual box running Windows, however, there is a less complicated way to do this.
Using Crossover, install Firefox 20. You can use this Windows version of Firefox to download and install the web components executable. This has been tested to work, though you will not be able to view video directly from the camera. You can get around this by using the MJPEG video URL in a native browser.
Using a secondary storage drive was not originally in the design for the Gigastrand NVR software however, it is a critical feature for many users to be able to separate out the video storage from their main system drive. It also solves a host of other issues with storage and even allows for an external device or a RAID to be used for storage.
At some point we will release a script file to do this automatically. For now, this is how you can do it manually.
NOTE: This could result in data loss if not done properly. If you are not comfortable doing this on your own, Gigabytes can help you remotely.
- Format and setup the drive (using Parted or Gparted)
NOTE: If you format the drive EXT3, the rest of the instructions will work fine. Otherwise, in step 4, change ext3 to the file system that you set the drive up with.
- edit fstab (/etc/fstab) as root (right-click on the file>Root Actions>Open As Text)
- Add the line
for Gigastrand NVR Software:
/dev/sdb1 /etc/kmotion/images_dbase ext3 relatime,errors=remount-ro 0 2
/dev/sdb1 /home/user/.IvideonServer/archive ext3 relatime,errors=remount-ro 0 2
be sure to change “sdb1” to the appropriate drive or partition.
- Save the file
- Open the drive in Dolphin or Konqueror (or click on Computer on the desktop)
- Change ownership to active user (right-click>Root Actions>Ownership to Active User)
If you are running Gigastrand or Next Level NVR software you may have to edit an additional file.
- Edit /etc/apache2/envvars as root
- add the following 2 lines
- export APACHE_RUN_USER=user
- export APACHE_RUN_GROUP=user
- restart Apache
Open a terminal and type in sudo service apache2 restart
It wouldn’t hurt to restart the computer to make sure all the settings took hold but that is optional. Be sure to stop the NVR before you start and start the NVR (icons on the desktop) once complete.