{"id":608,"date":"2019-06-29T16:43:25","date_gmt":"2019-06-29T16:43:25","guid":{"rendered":"http:\/\/james-batchelor.com\/?p=608"},"modified":"2019-08-10T19:15:40","modified_gmt":"2019-08-10T19:15:40","slug":"motioneye-cent-os-cctv-server","status":"publish","type":"post","link":"https:\/\/james-batchelor.com\/index.php\/2019\/06\/29\/motioneye-cent-os-cctv-server\/","title":{"rendered":"Motioneye \u2013 Cent OS CCTV Server"},"content":{"rendered":"\n<p>If you\u2019d ever searched for Raspberry Pi projects that\ninvolved a camera then the results would certainly include Motioneye OS, an\neasy to use self-contained operating system that is truly (write then) plug and\nplay. <\/p>\n\n\n\n<p>Looking for a CCTV project earlier this year I too was drawn in by this, and with my small abundance of RPi spares it was the cheapest choice, using a couple of RPi 3B+ for video, and a Zero W for time-lapse image capture. All processing was self-contained on each Pi with capture data passed over via SMB to a Windows file share. <\/p>\n\n\n\n<p>This worked, but had a couple of problems that prevented it\nfrom being trustworthy. Firstly, it stops recording video after a few days of\nuptime, by creating empty files. And secondly the time-lapse camera seemed to\nreset every few minutes that created in white out image capture as the camera\u2019s\nexposure setting recalibrated, ruining a time-lapse video.<\/p>\n\n\n\n<p>Looking wider there was also the performance issue. In\nMotioneye OS\u2019 default state of managing all features, the highest FPS seemed to\nmax at 15 fps even on the Pi 3B+. Forums suggest this is due to the motion eye\ndaemon handling all the image processing in software, putting a strain on the Pi\u2019s\nmodest CPU.<\/p>\n\n\n\n<p>The idea and goal is to move the processing and IO\nresponsibilities to my server, which would be far more capable than the then\nlatest available RPi, and as I have chosen Cent OS to be my go-to Linux OS of\nchoice, this is what I\u2019ll be using.<\/p>\n\n\n\n<p>A gateway to make this possible is an option in Motioneye OS, Fast Network Camera. This when set relinquishes the Pi of all processing duties and serves to just stream the camera capture as best as possible via MJPEG.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"487\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs10.jpg\" alt=\"\" class=\"wp-image-625\" srcset=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs10.jpg 800w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs10-300x183.jpg 300w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs10-768x468.jpg 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/figure>\n\n\n\n<p>Here\u2019s how to set up Motioneye on a Cent OS server to be a central data hub for a network of RPi Motioneye OS cameras. <\/p>\n\n\n\n<!--more-->\n\n\n\n<h3 class=\"wp-block-heading\">OS Setup<\/h3>\n\n\n\n<p>In this VM setup two drives (VHD) are allocated, a 16GB\ndrive for the OS, and a 2.6TB drive to be manually mounted and used solely for\ncapture storage. Both VHD\u2019s are contained on the same single 3TB 6Gbps SATA\ndrive.<\/p>\n\n\n\n<p>Run the Cent OS install wizard, choosing just the 16GB drive\nas the install destination. Its also helpful at this stage to configure a\nstatic IP for easier locating.<\/p>\n\n\n\n<p>On successful setup and reboot, login via SSH and enter fdisk -l to discover the location of the large disk.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"138\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs01-1024x138.png\" alt=\"\" class=\"wp-image-612\" srcset=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs01-1024x138.png 1024w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs01-300x40.png 300w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs01-768x103.png 768w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs01-1200x162.png 1200w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs01.png 1321w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p>As the disk is larger than 2TB, we need to use the parted command to create a GPT disk format, in this case enter <\/p>\n\n\n\n<pre class=\"wp-block-verse\">parted \/dev\/sdb<\/pre>\n\n\n\n<p>Within the parted command, enter this to create the file system. <\/p>\n\n\n\n<pre class=\"wp-block-verse\">mklabel gpt <\/pre>\n\n\n\n<p>Assign the size of the partition to use the entire disk (referenced from the earlier fdisk -l command). <\/p>\n\n\n\n<pre class=\"wp-block-verse\">mkpart primary 0GB 2858GB <\/pre>\n\n\n\n<p>Exit parted.<\/p>\n\n\n\n<pre class=\"wp-block-verse\">quit<\/pre>\n\n\n\n<p>Format the new partition to make it usabl.<\/p>\n\n\n\n<pre class=\"wp-block-verse\">mkfs.ext4 \/dev\/sdb .<\/pre>\n\n\n\n<p>To use this new drive it first needs to be mounted to the sile system, and to do this it needs an entry point. Add a new folder as the entry point then mount the new drive to it.<\/p>\n\n\n\n<pre class=\"wp-block-verse\">mkdir \/cctv<br>mount \/dev\/sdb \/cctv<\/pre>\n\n\n\n<p>Check to see if its connected<\/p>\n\n\n\n<pre class=\"wp-block-verse\">df -h<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"330\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs02-1024x330.png\" alt=\"\" class=\"wp-image-613\" srcset=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs02-1024x330.png 1024w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs02-300x97.png 300w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs02-768x247.png 768w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs02-1200x386.png 1200w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs02.png 1242w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption><em>Mounted on<\/em> has \/cctv listed with large disk size<\/figcaption><\/figure>\n\n\n\n<p>This drive link will not work after a reboot, to do this the \/etc\/fstab file needs to be added to.<\/p>\n\n\n\n<p>My file editor of choice is nano, so I enter this to start editing:<\/p>\n\n\n\n<p> nano \/etc\/nano<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Nano is not available with the minimal install of Cent OS, to install, enter yum install nano, follow the prompts and nano is installed.<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"95\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs03-1024x95.png\" alt=\"\" class=\"wp-image-614\" srcset=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs03-1024x95.png 1024w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs03-300x28.png 300w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs03-768x71.png 768w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs03-1200x112.png 1200w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs03.png 1872w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p>Add the following:<\/p>\n\n\n\n<p> \/dev\/sdb &nbsp;&nbsp; \/cctv &nbsp;&nbsp;&nbsp; defaults&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 0<\/p>\n\n\n\n<p> Then save and exit.<\/p>\n\n\n\n<pre class=\"wp-block-verse\">Ctrl +O <br>Ctrl +X<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Cent OS prerequisites<\/h3>\n\n\n\n<p>The Motioneye <a href=\"https:\/\/github.com\/ccrisan\/motioneye\/wiki\/Install-On-Fedora\">Install Guide<\/a> had options for a number of Linux distributions but Cent OS is not listed. The closest match is Fedora which like Cent is based on the Red Hat architecture. To mimic a fedora install a couple of Repository libraries need to be added so the OS can find the install files, enter the next two commands and accept the prompts to add:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">yum install epel-release<br><br>yum localinstall --nogpgcheck https:\/\/download1.rpmfusion.org\/free\/el\/rpmfusion-free-release-7.noarch.rpm https:\/\/download1.rpmfusion.org\/nonfree\/el\/rpmfusion-nonfree-release-7.noarch.rpm<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">&nbsp;Motioneye Install<\/h3>\n\n\n\n<p>Before Motioneye can be installed it needs the supporting software to be installed beforehand\/<\/p>\n\n\n\n<pre class=\"wp-block-verse\">yum install motion ffmpeg<\/pre>\n\n\n\n<p>Install the building language and associated software:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">yum install python-pip python-devel gcc libcurl-devel\npango-devel<\/pre>\n\n\n\n<p>Now to download and install Motioneye:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">pip install motioneye<\/pre>\n\n\n\n<p>Create the operating folders and copy the configuration\nfiles to their intended location:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">mkdir -p \/etc\/motioneye<br><br>cp \/usr\/share\/motioneye\/extra\/motioneye.conf.sample \/etc\/motioneye\/motioneye.conf<\/pre>\n\n\n\n<p>Edit the motioneye.conf file to utilise the 2.6TB drive for\nstorage:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">nano \/etc\/motioneye\/motioneye.conf<\/pre>\n\n\n\n<p>Edit the following line:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"60\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs04-1024x60.png\" alt=\"\" class=\"wp-image-615\" srcset=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs04-1024x60.png 1024w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs04-300x18.png 300w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs04-768x45.png 768w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs04-1200x71.png 1200w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs04.png 1388w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-verse\">Ctrl+O to save and Ctrl+X to exit<\/pre>\n\n\n\n<p>Enable Motioneye to run as a service and to start at boot,\nand start it for the first time:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">&nbsp;cp \/usr\/share\/motioneye\/extra\/motioneye.systemd-unit \/etc\/systemd\/system\/motioneye.service<br><br>systemctl daemon-reload&nbsp;<br><br>systemctl enable motioneye<br><br>systemctl start motioneye<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Samba Setup<\/h3>\n\n\n\n<p>To enable easier access to the footage, installing Samba\nallows Windows machines selective access to the Linux file system.<\/p>\n\n\n\n<p>Install the samba service:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">yum install samba samba-client samba-common<\/pre>\n\n\n\n<p>Make a backup of the config file in case anything goes\nwrong:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">cp -pf \/etc\/samba\/smb.conf \/etc\/samba\/smb.conf.orig<\/pre>\n\n\n\n<p>Use nano to edit the config file: <\/p>\n\n\n\n<pre class=\"wp-block-verse\">nano \/etc\/samba\/smb.conf<\/pre>\n\n\n\n<p>Remove the default setup and replace with the below. This\ncreates a network share with access to the cctv folder, allowing Linux users in\nthe \u201csmbgrp\u201d group access to it:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">[global]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; workgroup = WORKGROUP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; security = user<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; passdb backend = tdbsam<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printing = cups<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printcap name = cups<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;load printers = yes<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cups options = raw<br>[cctv]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; comment = Camera Store<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; path = \/cctv<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; valid users = @smbgrp<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force user = root<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; browseable = Yes<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; read only = No<\/pre>\n\n\n\n<p>Now lets add a new user and give it secure access to the\ncctv folder.<\/p>\n\n\n\n<p>Create the access group:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">groupadd smbgrp<\/pre>\n\n\n\n<p>Add the user and assign it to the group:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">useradd cctv -G smbgrp<\/pre>\n\n\n\n<p>Set the password for the new user: <\/p>\n\n\n\n<pre class=\"wp-block-verse\">smbpasswd -a cctv<\/pre>\n\n\n\n<p>Next to amend the permissions of the cctv folder to grant access\nvia Samba:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">chmod -R 0777 \/cctv<br>chcon -Rt samba_share_t \/cctv<\/pre>\n\n\n\n<p>Time to set Samba to start on boot, and start for the first\ntime:&nbsp;&nbsp; <\/p>\n\n\n\n<pre class=\"wp-block-verse\">systemctl enable smb.service<br>systemctl enable nmb.service<br>systemctl start smb.service<br>systemctl start nmb.service<\/pre>\n\n\n\n<p>From a Windows machine, navigate to the server and check that\nthe folder is accessible.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"204\" height=\"135\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs05.png\" alt=\"\" class=\"wp-image-616\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Firewall<\/h3>\n\n\n\n<p>Lets allow access to MotionEye and Samba from the outsode\nworld (including local network) by editing the firewall:<\/p>\n\n\n\n<p>MotionEye needs port 8765 opened to allow setup and\nadministration:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">firewall-cmd --add-port=8765\/tcp \u2013permanent<\/pre>\n\n\n\n<p>Samba is a recognised service, so this can be allowed by\nentering:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">firewall-cmd --permanent --add-service=samba<\/pre>\n\n\n\n<p>Commit these changes by entering:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">firewall-cmd --reload<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Testing<\/h3>\n\n\n\n<p>From here and all things well, the MotionEye frontend should be available by visiting the server at http:\/\/server_ip:8765 .<\/p>\n\n\n\n<p>Login with a username of admin and entering no password, which\ntakes you to the familiar Motioneye GUI.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Camera Setup<\/h3>\n\n\n\n<p>Server now running the Pi Camera units need configuring \/\nreconfiguring to be accessible to the server.<\/p>\n\n\n\n<p>From Motioneye OS on the Raspberry Pi, login to access the settings options, navigate to <strong>General Settings<\/strong> and toggle on <strong>Advanced Settings<\/strong>. Click <strong>Apply<\/strong>.<\/p>\n\n\n\n<p>Now navigate to <strong>Expert Settings<\/strong> and toggle on <strong>Fast Network Camera<\/strong>, click <strong>Apply<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"488\" height=\"70\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs07.png\" alt=\"\" class=\"wp-image-618\" srcset=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs07.png 488w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs07-300x43.png 300w\" sizes=\"auto, (max-width: 488px) 85vw, 488px\" \/><\/figure>\n\n\n\n<p>Logging in again after the system reboot everything looks the\nsame initially, but now capture controls are replaced with just Video and Streaming\ncontrols, and this does give more access to the finer details of the camera.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"307\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs08.jpg\" alt=\"\" class=\"wp-image-619\" srcset=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs08.jpg 800w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs08-300x115.jpg 300w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs08-768x295.jpg 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/figure>\n\n\n\n<p>In the Streaming section, the stream port and authentication\ncan be set. Authentication is not required, but is recommended if the server is\non a shared network, as the footage will be available to view on any device on\nthe network.<\/p>\n\n\n\n<p>The streaming section also reveals the <strong>Stream URL<\/strong>, which is need to add the camera to the server\u2026 <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Adding Cameras to Motioneye Server<\/h3>\n\n\n\n<p>Log back in to the Server\u2019s Motioneye frontend, click the <strong>No Cameras<\/strong> dropdown box and choose <strong>Add Camera<\/strong>.<\/p>\n\n\n\n<p>Choose <strong>Network Camera<\/strong> from the next dropdown box and add the streaming URL of the Pi camera to the address field, and credentials if set on the Pi. If correct the Camera field will auto populate:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"608\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs09-1024x608.png\" alt=\"\" class=\"wp-image-620\" srcset=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs09-1024x608.png 1024w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs09-300x178.png 300w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs09-768x456.png 768w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs09.png 1085w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p>Click OK to add camera. From here the familiar capture storage\noptions are now available and configurable. <\/p>\n\n\n\n<p>Additional cameras can be added in the same way.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Tweaking<\/h3>\n\n\n\n<p>Setup does require revisiting in the first few days to\nascertain how many days footage can be retained before drive space runs out, if\nit does, MotionEye will stop recording. I had the benefit of setting this up during\nthe height of summer, where the longer daylight hours create more capture data to\nstore. As the nights draw the storage requirements per day will reduce.<\/p>\n\n\n\n<p>Since the raw MJPEG video stream is being pulled by the server\nover the network as opposed to a data file, its worth considering what impact this\nwill have on your network. To find out how much data is flowing iftop is a tool\navailable on Cent OS to visualise this, to install run:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">yum install iftop<\/pre>\n\n\n\n<p>Then run with:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">iftop -n<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"674\" src=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs06-1024x674.png\" alt=\"\" class=\"wp-image-617\" srcset=\"https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs06-1024x674.png 1024w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs06-300x197.png 300w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs06-768x505.png 768w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs06-1200x789.png 1200w, https:\/\/james-batchelor.com\/wp-content\/uploads\/2019\/08\/ccs06.png 1283w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p>Iftop shows data flow rates per IP address and gives 1min, 5min\nand 15min stats akin to uptime. From the screenshot above we can see the cameras\nare averaging between 30 and 50 Mbps, with a total of 160Mbps of the network utilised\nfor the CCTV system.<\/p>\n\n\n\n<p>This was based on 4 cameras, with larger setups it may be worth\nexploring a more robust network layout including additions like a all wired setup\nand configuring extra switches to reduce bottlenecks on the internal network.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Results and further research:<\/h3>\n\n\n\n<p>The functionality of this setup is great and far better than\nthe previous where the Pi\u2019s were doing all the processing work. Stability is\nmuch improved with the reliability of video capture and the increased frame\nrate, comfortably keeping 20 fps. And time-lapse images have a uniform\nbrightness throughout which makes them much smother after processing.<\/p>\n\n\n\n<p>Issues to work on following this install is that images fail\nto load in the MotionEye GUI, this can be overcome by someone used to the GUI\nbut for newcomers the absence of login and slider icons can be confusing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019d ever searched for Raspberry Pi projects that involved a camera then the results would certainly include Motioneye OS, an easy to use self-contained operating system that is truly (write then) plug and play. Looking for a CCTV project earlier this year I too was drawn in by this, and with my small abundance &hellip; <a href=\"https:\/\/james-batchelor.com\/index.php\/2019\/06\/29\/motioneye-cent-os-cctv-server\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Motioneye \u2013 Cent OS CCTV Server&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[212,4,5],"tags":[180,267,163,264,265,261,262,263,63,266,70],"class_list":["post-608","post","type-post","status-publish","format-standard","hentry","category-network","category-raspberry-pi","category-servers","tag-camera","tag-capture","tag-cctv","tag-cent-os","tag-centos","tag-motioneye","tag-motioneye-os","tag-pi","tag-raspberry-pi","tag-rhel7","tag-rpi"],"_links":{"self":[{"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/posts\/608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/comments?post=608"}],"version-history":[{"count":6,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/posts\/608\/revisions"}],"predecessor-version":[{"id":626,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/posts\/608\/revisions\/626"}],"wp:attachment":[{"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/media?parent=608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/categories?post=608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/james-batchelor.com\/index.php\/wp-json\/wp\/v2\/tags?post=608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}