Keno Posted September 27, 2016 Share Posted September 27, 2016 There have been several disjointed tutorials on making a raspberrypi or orangepi into a surveillance camera. So I threw this together to maybe help someone out there with any issues. I used the orangepipc+ but any orangepi board should work as long as it has the basics, internet connectivity, storage, and a camera. (I highly suggest heatsinks as well) any feedback or enhancements to this tutorial are greatly appreciated. ------------------------------------------------------------------ ORANGEPI IPCAMERA ------------------------------------------------------------------ su root apt-get update apt-get upgrade apt-get install wget https://github.com/ccrisan/motioneye/wiki/precompiled/ffmpeg_3.1.1-1_armhf.deb dpkg -i ffmpeg_3.1.1-1_armhf.deb apt-get remove libavcodec-extra-56 libavformat56 libavresample2 libavutil54 apt-get install python-pip python-dev curl libssl-dev libcurl4-openssl-dev libjpeg-dev libx264-142 libavcodec56 libavformat56 libmysqlclient18 libswscale3 libpq5 wget https://github.com/Motion-Project/motion/releases/download/release-4.0.1/pi_jessie_motion_4.0.1-1_armhf.deb dpkg -i pi_jessie_motion_4.0.1-1_armhf.deb pip install motioneye mkdir -p /etc/motioneye cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf mkdir -p /var/lib/motioneye cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service systemctl daemon-reload systemctl enable motioneye systemctl start motioneye sudo modprobe gc2035 sudo modprobe vfe_v4l2 systemctl restart motioneye Accessing The Frontend After having successfully followed the installation instructions, the motionEye server should be running on your system and listening on port 8765. Fire up your favorite web browser and visit the following URL (replacing [your_ip] with... well, your system's IP address): http://[your_ip]:8765/ Use admin with empty password when prompted for credentials. For further details on how to configure motionEye, see Configuration. ------------------------------------------------------------------ FOR UPDATES; ------------------------------------------------------------------ pip install motioneye --upgrade systemctl restart motioneye sudo nano /etc/motioneye/motioneye.conf ctrl+x then y (nano) Modifiy the motion.config file to turnoff localhost; stream_localhost off change the port to 80 from 8765 if desired by; systemctl enable motion systemctl start motion Tutorial sources; https://github.com/ccrisan/motioneye/wiki/Install-On-Raspbian http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=941 http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=1988 (some resources for motion) http://www.cnx-software.com/2015/09/26/how-to-use-orange-pi-camera-in-linux-with-motion/(VERY OLD) WIP tutorial, I want to add a version with facial recognition using openface and a version using ALPR (automatic license plate recognition, as the orangepi systems can have 2GB of ram) Update 1 09/30/16; seems there is a issue with motioneye and being unable to find the csi camera. I'm trying to find a work around, any help is appreciated. Update 2 11/05/2016 Updated motioneye installation added information on motion and basic setup (incomplete) the editor seems to be breaking my wget addresses I forgot to add the login information and frontend... *DOH* 2 Link to comment Share on other sites More sharing options...
B.K.O. Posted November 27, 2016 Share Posted November 27, 2016 I get when adding a new camera An error occured. Refressing is recomanded. After refresh there appears a Cam without immage. Tested it on Orange Pi One/PC/BananaPro with USB and OPiCam. The usb cam are autorecognised in MotionEYEOS so there is stil something broken in my install. sudo nano /etc/modules has alsow to be edited for gc2035 vfe_v4l2 ? Link to comment Share on other sites More sharing options...
B.K.O. Posted November 27, 2016 Share Posted November 27, 2016 progress with Xenial server Banana Pi pro https://github.com/ccrisan/motioneye/wiki/Install-On-Ubuntu sudo apt-get install python-setuptools pip install --upgrade pip but i still need it on OPiOne and Lite Link to comment Share on other sites More sharing options...
manuti Posted November 27, 2016 Share Posted November 27, 2016 You can try Orange Pi PC Beta image with Xenial and mainline kernel with the Orange Pi One and Lite. Link to comment Share on other sites More sharing options...
B.K.O. Posted November 28, 2016 Share Posted November 28, 2016 Where do i get those Armbian Xenial 16.04? You arent meaning 15.10 xulong ... Link to comment Share on other sites More sharing options...
manuti Posted November 28, 2016 Share Posted November 28, 2016 Where do i get those Armbian Xenial 16.04? You arent meaning 15.10 xulong ... In the official Daily Beta Preview ► http://image.armbian.com/betaimages/ Here you can find (at today) an image called → Armbian_5.24.161127_Orangepipc_Ubuntu_xenial_4.9.0.img You can use on Orange Pi One but remember: is beta and don't have HDMI support, you must config by SSH or Serial. Link to comment Share on other sites More sharing options...
B.K.O. Posted December 1, 2016 Share Posted December 1, 2016 Motioneye can be used with some combination of:? https://forum.armbian.com/index.php/topic/1000-read-only-file-system/ https://hallard.me/raspberry-pi-read-only/ or do we have to wait for Network booting on H5 (NOR Flash ...) im trying to get to a system with watchdog timer, POE, ... for least maintenance Link to comment Share on other sites More sharing options...
moshel Posted January 29, 2017 Share Posted January 29, 2017 Hi, I am very keen on installing motioneye on my orangepi zero. followed your instructions but getting : root@orangepizero:~# apt-get install python-pip python-dev curl libssl-dev libcurl4-openssl-dev libjpeg-dev libx264-142 libavcodec56 libavformat56 libmysqlclient18 libswscale3 libpq5 Reading package lists... Done Building dependency tree Reading state information... Done Package libmysqlclient18 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Unable to locate package libx264-142 E: Unable to locate package libavcodec56 E: Unable to locate package libavformat56 E: Package 'libmysqlclient18' has no installation candidate E: Unable to locate package libswscale3 I am pretty new to this arm world so any help will be greatly appreciated! Thanks, Moshe Link to comment Share on other sites More sharing options...
Keno Posted February 10, 2017 Author Share Posted February 10, 2017 Looks like something changed and this is broken again I'll try and get it up and working this week Link to comment Share on other sites More sharing options...
moshel Posted February 24, 2017 Share Posted February 24, 2017 Thanks! My pi zero is waiting eagerly. Regards, Moshe Link to comment Share on other sites More sharing options...
OLO Posted June 14, 2017 Share Posted June 14, 2017 The camera for raspberry pi could be used for orange pi pc? Link to comment Share on other sites More sharing options...
Marthinius Posted January 26, 2018 Share Posted January 26, 2018 Please restore instructions for install motioneye with motion version 4.1.1.1 Link to comment Share on other sites More sharing options...
Moklev Posted January 27, 2018 Share Posted January 27, 2018 21 hours ago, Marthinius said: Please restore instructions for install motioneye with motion version 4.1.1.1 You don't need a new guide. Motion 4.1.1 isn't available on Armbian, Mr Dave's build is only for Raspbian. On Armbian (i.e. Orange Pi Zero) download new Stretch build 5.38 next, mainline 4.14.14. Do not use Ubuntu. Follow original installation guideline: https://github.com/ccrisan/motioneye/wiki/Install-On-Debian (For Debian Stretch) BEFORE point 4 install pip dependencies: sudo pip install wheel sudo pip install setuptools sudo apt-get install zlibc zlib-gst zlib1g-dev Continue to point 4... ... at the end of installation point to [yourip]:8765 and configure it. et voilà! :-) Now Motioneye 0.38 run on motion 4.01. New motion version is usefull for new cam h264/rtsp based. With little OPZ performance is quite respectable: 15fps (streaming) / 10 fps (analisys and capture) with a HD stream 1280x720px, H264 900 kbit/s 12fps (streaming) / 7 fps (analisys and capture) with a HD stream 1280x720px, mjpeg 2,5 mbit/s Load: 1.94 1.24 0.53 Temp: 70 °C (without hardware acceleration...) Mk 3 Link to comment Share on other sites More sharing options...
Ucino Posted March 17, 2018 Share Posted March 17, 2018 @Moklev thanks a lot for yours indications it has worked very fine for me Important to know : CSI seems not be supported yet in mainline, so the orange pi camera will not work in armbian debian mainline ([edit] maybe it works now, and maybe this was because of a problem with the driver, please see the second reply below.) Link to comment Share on other sites More sharing options...
Ucino Posted March 17, 2018 Share Posted March 17, 2018 With USB cam it works very well Link to comment Share on other sites More sharing options...
Ucino Posted March 17, 2018 Share Posted March 17, 2018 @Tom_Neverwinter With ubuntu desktop armbian legacy and following this : the orange pi CSI camera worked for me with motioneye. Link to comment Share on other sites More sharing options...
chwe Posted March 18, 2018 Share Posted March 18, 2018 On 17.3.2018 at 2:56 PM, Ucino said: Important to know : CSI seems not be supported yet in mainline, so the orange pi camera will not work in armbian debian mainline http://linux-sunxi.org/Mainlining_Effort#Status_Matrix As it can be seen here... There is progress in mainlining the camera interface see here (mostly for the V3s): https://groups.google.com/forum/#!forum/linux-sunxi It's not trivial and might need a lot of work before we see a mainlined CSI interface. On 17.3.2018 at 3:06 PM, Ucino said: With USB cam it works very well Do you get acceptable framerates with a USB webcam with motionEye? I only played a bit with it months ago and I had terrible slow framerates (6-7 fps).. To be honest, I used the cheapest usb cam from Aliexpress and never paid attention if this was a camera or settings related issue. 1 Link to comment Share on other sites More sharing options...
Moklev Posted March 18, 2018 Share Posted March 18, 2018 15 hours ago, chwe said: Do you get acceptable framerates with a USB webcam with motionEye? I only played a bit with it months ago and I had terrible slow framerates (6-7 fps).. To be honest, I used the cheapest usb cam from Aliexpress and never paid attention if this was a camera or settings related issue. With an ELP 2mpx usb camera you can stream at 30+ fps, with streaming only and motion process disabled. Motion's slow dog process is a problem, you require an i5 cpu for a reasonable performance. With a little OPZ @1GHz Motioneye (Motion 4.01) runs at 15fps/720p but drop below 6-7fps if an event starts saving an image sequence (ca. 10 jpeg images). 1 Link to comment Share on other sites More sharing options...
Ucino Posted March 19, 2018 Share Posted March 19, 2018 On 3/18/2018 at 6:34 PM, chwe said: http://linux-sunxi.org/Mainlining_Effort#Status_Matrix As it can be seen here... There is progress in mainlining the camera interface see here (mostly for the V3s): https://groups.google.com/forum/#!forum/linux-sunxi It's not trivial and might need a lot of work before we see a mainlined CSI interface. Thanks for this information, that's good news that there is these progress. On 3/18/2018 at 6:34 PM, chwe said: Do you get acceptable framerates with a USB webcam with motionEye? I only played a bit with it months ago and I had terrible slow framerates (6-7 fps).. To be honest, I used the cheapest usb cam from Aliexpress and never paid attention if this was a camera or settings related issue. Using CSI or USB the framerates are both identical and low (3 - 5fps) using only streaming , i have also no idea if it's because of motionEye default configuration, because I use OrangePiPC+, or other reasons :/ However it's enough for what I'm trying to do (a camera to put in birdhouse for the school project with orangepipc+). On 3/18/2018 at 9:44 PM, Moklev said: you require an i5 cpu for a reasonable performance oh ok, thanks for your feedback. Link to comment Share on other sites More sharing options...
chwe Posted March 19, 2018 Share Posted March 19, 2018 On 18.3.2018 at 9:44 PM, Moklev said: Motion's slow dog process is a problem, you require an i5 cpu for a reasonable performance. With a little OPZ @1GHz Motioneye (Motion 4.01) runs at 15fps/720p but drop below 6-7fps if an event starts saving an image sequence (ca. 10 jpeg images). I think this is mostly related to this stuff here... http://www.lavrsen.dk/foswiki/bin/view/Motion/ConfigOptionFfmpegVideoCodec There's a lot of enhancement for the cameradriver and I think @@lex did some stuff there and maybe you get better performance with the cedrus ffmpeg stuff.. I never paid that much attention to see if this can help for motion... 1 Link to comment Share on other sites More sharing options...
Moklev Posted March 20, 2018 Share Posted March 20, 2018 9 hours ago, chwe said: I think this is mostly related to this stuff here... http://www.lavrsen.dk/foswiki/bin/view/Motion/ConfigOptionFfmpegVideoCodec There's a lot of enhancement for the cameradriver and I think @@lex did some stuff there and maybe you get better performance with the cedrus ffmpeg stuff.. I never paid that much attention to see if this can help for motion... Motion has a complex workflow and an accelerated ffmpeg can help only partly. See the Raspberry/OpenMax version... which performs similarly despite is fully gpu accelerated (he's only more rapid to generate mp4 by events). Motion's analysis is frame-by-frame: you need to demux input stream, convert to raw single frames, processing and remux final stream. Link to comment Share on other sites More sharing options...
Ucino Posted March 22, 2018 Share Posted March 22, 2018 On 18/03/2018 at 6:34 PM, chwe said: Do you get acceptable framerates with a USB webcam with motionEye? I only played a bit with it months ago and I had terrible slow framerates (6-7 fps).. To be honest, I used the cheapest usb cam from Aliexpress and never paid attention if this was a camera or settings related issue. I have made some tests. It's not with USB but with CSI camera of orange pi, on orange pipc+ + armbian ubuntu desktop (but used without screen) & using a debian laptop to connect to the opipc+ If I do : General settings > advanced settings > on Video device > Frame rate > 20 Resolution > 640 x 480 (was by default) I have a better framerate : 10 / 12 fps. Link to comment Share on other sites More sharing options...
Moklev Posted March 22, 2018 Share Posted March 22, 2018 20 hours ago, Ucino said: I have made some tests. It's not with USB but with CSI camera of orange pi, on orange pipc+ + armbian ubuntu desktop (but used without screen) & using a debian laptop to connect to the opipc+ If I do : General settings > advanced settings > on Video device > Frame rate > 20 Resolution > 640 x 480 (was by default) I have a better framerate : 10 / 12 fps. Very bad performance. I got ca. 15/20 fps in 1280x720 and 30+ fps in 640x480 (limited...). With a Orange Pi Zero (slower than your PC Plus) and a system load of 1.30 ca. Motion trigger, light trigger and smart area mask. Link to comment Share on other sites More sharing options...
Ucino Posted March 22, 2018 Share Posted March 22, 2018 28 minutes ago, Moklev said: Very bad performance. I got ca. 15/20 fps in 1280x720 and 30+ fps in 640x480 (limited...). With a Orange Pi Zero (slower than your PC Plus) and a system load of 1.30 ca. Motion trigger, light trigger and smart area mask . Very nice ! Have you made some special setup of motioneye ? I'm using armbian ubuntu desktop (but without screen), maybe you use a headless version ? Or maybe it's because of I'm using wifi with an important distance ? Link to comment Share on other sites More sharing options...
Moklev Posted March 22, 2018 Share Posted March 22, 2018 53 minutes ago, Ucino said: Very nice ! Have you made some special setup of motioneye ? I'm using armbian ubuntu desktop (but without screen), maybe you use a headless version ? Or maybe it's because of I'm using wifi with an important distance ? With Motioneye use ONLY Debian server/headless, best with cabled ethernet. With wifi the performance is reduced. My setup is: Orange Pi Zero (512MB) with Armbian 5.41/Debian Stretch 4.14.18 (next), MotionEye 0.38.1 and Motion 4.01. Use H264 for maximum performance and MJPEG for maximum quality. 1 Link to comment Share on other sites More sharing options...
Ucino Posted March 22, 2018 Share Posted March 22, 2018 Thanks a lot for your reply. As I'm using CSI camera, it seems that I need for the moment legacy. On https://dl.armbian.com/orangepipcplus/ Debian Strech next is mainline, no ? So the best choice could be Debian Jessy Default for motion eye + CSI camera ? 1 Link to comment Share on other sites More sharing options...
Moklev Posted March 23, 2018 Share Posted March 23, 2018 Yes, for CSI camera you must stay on legacy (Jessie dafault). CSI on mainline is on WIP stage. Main difference is Motion 3.2.12 (instead of 4.01). Next kernel 4.14.18 is more stable than 3.x (uptime: weeks vs few days). On Jessie may need "deb multimedia" packages for a recent ffmpeg version. I recommend you a good USB camera H264/MJPEG capable. 2 Link to comment Share on other sites More sharing options...
Ucino Posted March 25, 2018 Share Posted March 25, 2018 Ok thanks a lot for these informations. Link to comment Share on other sites More sharing options...
malaga Posted January 11, 2020 Share Posted January 11, 2020 many many thanks for this posting and the great thread about motioneye i am currently working out a IoT-based birdhouse: I have a bird house in the garden - more precisely in a nesting box - and I want to attach a camera there. To date, great tits have always been inside. There are already many Birdhouse (Vogelhaus)-camera projects and many solutions with a OrangePi-base: The goal: I would like to transfer pictures from the bird house next year (in the hope that someone will move into the house again) to a server. The alternative would be a Orange Pi - including a Cam - would probably be better.main goal and approach: The bird-house will be outfitted with some ideas of IOT to track what kind of conditions attracts guests and will tweet you when they are at the door! in fact for the bird watchers, it is hard to know when the birds will be visiting your bird house. The smart birdhouse detects guest bird entries and exits. the set-up: It is also set up to take a photos and furthermore also tweet-notifications when a bird comes near the birdhouse. Sensors measuring the temperature, humidity, ,sounts and light inside/outside the birdhouse to help analyze the optimal condition for attracting guest-birds so that they will want to fly to the house. i will read all the things here in this thread and will follow the instructions. Well - i am glad to see this thread bout the MotionEye that should run on OrangePi also -(too). Many thanks for all you do i am so glad to be part of this great community. have a great day Link to comment Share on other sites More sharing options...
Recommended Posts