-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine motion and timelapse #5
Comments
Krist. Looks like a great idea. Pi Timolo does have video when motion is detected Is this what you were thinking?. On Thu, Apr 2, 2015 at 9:38 AM, krist10an notifications@github.com wrote:
See my YouTube Channel at http://www.youtube.com/user/pageaucp |
Hi Claude, Thanks, sounds like a nice way of doing it. Come to think of it, it might be possible to get this effect by just set the output directory for the motion detection and timelapse in the same output folder and using the same name prefix? In that case you get extra images every time there is motion and when generating a movie it will look like it slows down when motion is present. In that case I guess the numbering might not work directly, but date/timestamps should. |
Hi Krist I have fixed some bugs and added the fast time lapse feature. Was I have fixed motion video, text colour display bugs and added new quick When you copy the attached files to the RPI you should run dos2unix command sudo apt-get install dos2unix to test from putty ssh or desktop terminal execute the following _cd ~_ Note. The old config.py and templates files will not work due to new and Thanks Claude ... On Thu, Apr 2, 2015 at 10:38 AM, krist10an notifications@github.com wrote:
See my YouTube Channel at http://www.youtube.com/user/pageaucp User Configuration variable settings for pitimoloPurpose - Motion Detection Security CamCreated - 13-Dec-2014Done by - Claude PageauconfigTitle = "pitimolo default configuration motion and timelapse 1080p images" These settings should both be False if this script is run as a background /etc/init.d daemonverbose = True # Sends detailed logging info to console. set to False if running script as daeman print a test imageimageTestPrint = False # default=False Set to True to print one image and exit (useful for aligning camera) Image SettingsimageNamePrefix = 'cam1-' # Prefix for all image file names. Eg front- Low Light Night SettingsnightMaxShut = 5.8 # default=5 sec Highest cam shut exposure time. IMPORTANT 6 sec works sometimes but occasionally locks RPI and HARD reboot required to clear Date/Time Settings for Displaying info Directly on ImagesshowDateOnImage = True # Set to False for No display of date/time on image default= True Motion Detect SettingsmotionOn = True # True = motion capture is turned on. False= No motion detection Time Lapse SettingstimelapseOn = True # Turns timelapse True=On False=Off ---------------------------------------------- End of User Variables -----------------------------------------------------#!/usr/bin/python pitimolo - Raspberry Pi Long Duration Timelapse, Motion Detection, with Low Light Capabilitywritten by Claude Pageau Dec-2014 (original issue)getStreamImage function based on utpalc code based on brainflakes lightweight motion detection code on Raspberry PI forum - ThanksComplete pi-timolo code is available on my github repo at https://github.com/pageauc2.3 released 1-May-2015 added motion quick TL and fixed video hang bugprogVer = "ver 2.3" import os Check for variable file to import and error out if not found.configFilePath = baseDir + "config.py" if verbose: import remaining python librariesimport sys #================================== System VariablesShould not need to be customized#================================== #-----------------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------- |
Hi Claude, Thanks! We have a new member of the family joining very-soon-now(tm), so I cannot promise a speedy response, but I'll try it when I have some time. |
Hi Claude, Sorry for taking so long to test this. We just had a baby, so he got most my attention lately 👶 I tried to download the attachments you made, but all line breaks are removed which makes it a bit difficult to test Python code 😄 . Would it be an option for you to push the changes to a branch so I can test that? |
Kristen Files would be in Unix Format. Source and instructions are on Github at Here are brief instructions FYI. Please note you will need the new Quick SetupSSH (putty) or Desktop Terminal login to RPI and perform the following cd ~ Install dependancies and required softwaresudo ./setup-timolo.sh Initialize pi-timolo.py files, motion and test motion.python ./pi-timolo.py Verify motion then ctrl-c to exit pi-timolo.pyEdit config.py file using nano editor to change any desired settingsper comments. ctrl-x y to Savenano config.py test edit changes.sudo ./pi-timolo.py Regards Claude ... On Tue, May 19, 2015 at 2:49 AM, krist10an notifications@github.com wrote:
|
Thanks Claude for this. I'm wondering if there is a way for me to get both a JPG image when motion is detected and an H264 video? From playing with the settings it seems I can get one or the other, but not both. I was hoping to get a single JPG when motion is detected, and then a video for whatever duration I specify in the settings. Jeff |
I think you can do this by adding some of the takeVideo(filename) function Sample code to add to userMotionCodeHere() function
motionNumCount) On Tue, May 19, 2015 at 5:03 PM, Jeff Tarr notifications@github.com wrote:
See my YouTube Channel at http://www.youtube.com/user/pageaucp |
Makes sense. Will give it a try. Thanks again for everything. |
Claude, Thanks again. Got it working, but had to manually build the filename since getVideoName breaks if MotionVideoOn is False. Separate question now - seems that sometimes my camera thinks it should be in "night" mode when in fact it should be in "day" mode. Could you offer any suggestions for how to make it more reluctant to switching to night? Thanks again! |
Change the twilightThreshold setting. This will adjust when the camera If the ambient day lighting is lower then reduce from default 90 to a lower You can also increase the wait time in the takeDayImage() function to maybe I am working on automating this setting in the checkIfDay() function but it Hope this helps Regards On Wed, May 20, 2015 at 10:48 AM, Jeff Tarr notifications@github.com
See my YouTube Channel at http://www.youtube.com/user/pageaucp |
Claude, I was not able to download the files, so I had to copy&paste them from the source here which was causing me issues since newlines were stripped for some reason. Anyway, I got that sorted out and tested the code now (finally). Quick motion detection works and it generates several motion detection images upon detection! 6 images were captured in my first test, with showDateOnImage disabled it captured 9 images in my second test. Seems to work great, is there anything special you'd like me to test? How do you suggest to use both the motion and timelapse images together in a movie? Motion images are stored in motion/ and timelapse in timelapse/, while the makemovie.py only uses images from timelapse/ as far as I can see. |
I would recommend you change settings so both timelapse and motion go into This setup will work for shorter sequences that you are interested in that If you want to speed things up then reduce image dimensions to maybe eg Let me know how you make out. Claude ... On Thu, May 21, 2015 at 1:50 PM, krist10an notifications@github.com wrote:
See my YouTube Channel at http://www.youtube.com/user/pageaucp |
Hi Claude, Thanks for describing how to do it for me :-) Thanks again for the fix, much appreciated 👍 |
Kristen Time lapse is deceptive sometimes. We humans live at a different faster It is here if you have not already seen it. https://youtu.be/pFkt0ZOrPzg On Fri, May 22, 2015 at 2:10 PM, krist10an notifications@github.com wrote:
See my YouTube Channel at http://www.youtube.com/user/pageaucp |
I believe this enhancement is implemented and tested. I had fun with this and hope it is useful for others |
fyi I have released version 2.6 of pi-timolo at Version 2.6 release notes
see Readme.md for details. Please note, I am also using another very good web based interface that is If you are looking for a good web based interactive RPI camera interface I http://elinux.org/RPi-Cam-Web-Interface This interface can also be setup to use gdrive syncing. Contact me if you On Fri, May 22, 2015 at 3:57 PM, Claude Pageau pageauc@gmail.com wrote:
See my YouTube Channel at http://www.youtube.com/user/pageaucp |
Thanks for the excellent program, worked right out of the box for me 👍
Would it be possible to combine motion detection and timelapse in order to create a timelapse movie that updates more often when there is motion? You can see what I had in mind here:
https://youtu.be/gyeTsl8ghcQ?t=3m
I like the effect, allthou the street in the video is a bit too busy to see the effect very clearly :-)
The text was updated successfully, but these errors were encountered: