Skip to content
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

Please advise best settings for Pi2B and Pi Camera #109

Closed
rjalexa opened this issue Jan 6, 2016 · 15 comments
Closed

Please advise best settings for Pi2B and Pi Camera #109

rjalexa opened this issue Jan 6, 2016 · 15 comments
Labels

Comments

@rjalexa
Copy link

rjalexa commented Jan 6, 2016

My setup is a Raspberry Pi 2 Model B with a Raspberry Pi Camera Module without IR filter.

This setup is meant to capture and store 5-10 max 5 minutes videos and store them on a 120GB SSD for max 1 month.

Can anyone please advise the best settings amongst or explain what process to find them myself.

Video resolution (currently 1600x1200 which is the max I see in the interface even though I would have liked FullHD. The camera supports 2592 x 1944 pixels AFAIK) ?

Framerate ?

Movie quality ?

GPU Memory ?

Overclocking (currently experimenting with Pi2 setting). Is it known to be stable ?

Thank you very much

@Crazyslade
Copy link

I have the same setup as you and would also like to know the settings. I seem to only be getting 2-3 fps in the preview window and streaming to a browser window. I have the settings set to 30 fps but no change. Is this the same for you rjalexa?

@rjalexa
Copy link
Author

rjalexa commented Jan 7, 2016

Same here my friend. Let's see if someone with more experience chimes in. Happy 2016.

@ccrisan
Copy link
Collaborator

ccrisan commented Jan 7, 2016

You won't get a better fps with resolutions as high as 1600x1200.

@rjalexa
Copy link
Author

rjalexa commented Jan 7, 2016

Just to understand I have lowered the resolution of the camera to only 1024x576.
What is the meaning of the two frame per second values overlayed on the bottom left of the video ?
For example I now have 25.0/15.0 fps with the frame slider set to 15.

It seems that when motion is detected one of those two values drops significantly even to only 2-3 fps !!! Why ?

@Crazyslade
Copy link

@rjalexa Happy 2016!
@ccrisan I have used the lowest resolution selectable and still the fps stays the same.

edit: I have the camera a 30 fps with low latency at 320 x 240 but anything above that is not very good.

Just a dumb question but why make a camera that is capable of 1080p video for a device that cannot deliver that result?

@ccrisan
Copy link
Collaborator

ccrisan commented Jan 8, 2016

@Crazyslade the camera and the device work perfectly together at high resolutions and framerates, but not when the entire stream passes by and is processed by the motion daemon. Any additional processing on the frames will eat up a considerable amount of CPU. If you want to get the maximum performance from your PI + CSI Camera, enable the Fast Network Camera option.

@rjalexa
Copy link
Author

rjalexa commented Jan 8, 2016

@ccrisan Would it be possible to use the Fast Network Camera option paired with a PIR sensor such as http://www.amazon.it/gp/product/B0104LSJGQ?psc=1&redirect=true&ref_=oh_aui_detailpage_o04_s00 to have both a fast capture and store only when motion (by the PIR) is detected ?

@Mikiya83
Copy link

Mikiya83 commented Jan 8, 2016

I just buy PIR module, i'm pretty sure we can enable/disable motionEye according to PIR detection (in a python script that monitor it like that : http://www.raspberrypi-spy.co.uk/2013/01/cheap-pir-sensors-and-the-raspberry-pi-part-1/ ) ... But i can't confirm that until i receive the module (from China so ... ).
My only concern is that i don't know if GPIO (RPi.GPIO) is recognized by motionEyeOS...

edit : seems to be ok according to source code but it could be safer if ccrisan can confirm that :)

@rjalexa
Copy link
Author

rjalexa commented Jan 8, 2016

@Mikiya83 I have already received it (the PIR sensor) but have no clue as to how to make it work with MotionEye :-( Please come back with detailed suggestions.
Also would you be using the Fast Camera thing too to have better framerates ?
Thank you

@Mikiya83
Copy link

Mikiya83 commented Jan 8, 2016

I think i will use it like that :
-A script in python (like this one : http://www.raspberrypi-spy.co.uk/2013/01/cheap-pir-sensors-and-the-raspberry-pi-part-1/) run in background at startup or started by another computer by SSH
-When a motion is detected by PIR (this script write a message when it occurs but you can start a bash script with "subprocess.call('bash script here', shell=True)" ), another script is called to start motionEye process (in init.d)
-When a motion is finished, after a delay, the same script is called with stop option

When motionEye process is started, it has to be configured to "Fast Network Camera" in advanced settings. In this mode, no motion detection can be set but a stream address is provided and perfs are much better, so you can read this stream on another computer and record it (when a motion is detected by PIR module, after starting motionEye process, you can send a message to this computer by SSH or HTTP to tell him to record the stream for example).

The drawback is the time for motionEye to start... if it's too long, the stream with motionEye should stay enabled and only recording should be managed by PIR detection (by SSH or HTTP)...

@Crazyslade
Copy link

@ccrisan That worked great! Thank you! Also thanks for the explanation!
@Mikiya83 Now if I can somehow figure out how to do as you explain. Thanks for your efforts as well.

@Mikiya83
Copy link

Mikiya83 commented Jan 9, 2016

First try to monitor your PIR module with the script above.
Then when it works, instead of printing text, try to execute a little simple SH script whit it.by "subprocess.call('bash script here', shell=True)"
Then start this python script at startup for example as explain in wiki (or use anotrher computer to start it by SSH if you prefer). Warning: at startup it's a BASH environment, and your script is python so use "python".
Then the tricky part : if you want to start/stop all motionEye process on detection, your SH has to start/stop the motionEye init.d script; if you want to monitor only your recording, it depends on your installation. For me, i use a QNAP NAS as recording system, so it always reads the stream and i have to send it a specific HTTP request to start recording.If you are stuck somewhere, feel free to asking help :)

@JahFyahh
Copy link

I am really late to the party, but what i do not get is what command should/could I use to manually (or by script) start/stop MotionEyeOS recording. @Mikiya83 you send a specific HTTP request to start recording, could you explain this a little more please?
Thank you.

@bortek
Copy link
Collaborator

bortek commented Feb 23, 2017

Anyone willing to comment more on this Issues or can it be closed ?

@bortek bortek closed this as completed Mar 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

7 participants
@ccrisan @JahFyahh @bortek @rjalexa @Crazyslade @Mikiya83 and others