0

I've been searching this for a while and I found a few posts that look interesting but it doesn't do what I really want. I am trying to set up a Raspbian security camera that records the video to a file but also streams via a web page that can be accessed from a local machine.

I've done this using python and it seems easy enough but I can't seem to stream the web page and copy the video to a folder at the same time but I can do one or the other using these tutorials: https://picamera.readthedocs.io/en/release-1.10/recipes1.html#capturing-to-a-file and https://picamera.readthedocs.io/en/release-1.13/recipes2.html#web-streaming but I can't figure out how to combine these tutorials (or if its even possible).

I am still very new to python so I might be grabbing more than I can chew!

  • I use motionEyeOS does all that and more, why reinvent the wheel ? – Bra1n Feb 6 '18 at 22:23
  • My only gripe with montioneyeos is that the FPS is so low (around 10 fps) and even worse when you are trying to use motion detect feature. They do have a Fast Network Option which turns off the motion detection and it gets great fps but I lose the ability to save the video to a local share :( – Twistabledeer Feb 6 '18 at 22:28
  • The capture frame rate is adjustable between 2 and 30 fps mine is set to 15fps (rpi3) but that may well reduce when you're streaming as well. Increasing the gpu memory may help and is recommended (default now 256) – Bra1n Feb 7 '18 at 12:01
  • Thanks! I'll try to increase the gpu memory from the default to 256 to see if that helps. I moved the FPS counter all the way to 30 fps so hopefully, increasing the memory will give me a few extra fps. – Twistabledeer Feb 7 '18 at 14:43
  • By all means, use MotionEyeOS (or other such systems) but if you still want a crack at hand-rolling something (if only to learn a bit more), the hint you may be missing is a bit further on in the advanced recipes section: Recording at multiple resolutions introduces the video-splitter and how to use it to manage multiple simultaneous recordings (e.g. to the web and to a file) – Dave Jones Feb 7 '18 at 21:24
0

Try motionEyeOS does all that and more, why reinvent the wheel ?

The capture frame rate is adjustable between 2 and 30 fps mine is set to 15fps (rpi3) but that may well reduce when you're streaming as well. Increasing the gpu memory may help and is recommended (default now 256)

If you run vcgencmd get_mem malloc and vcgencmd get_mem reloc commands, you'll be able to see how much free memory is available to the GPU.

malloc shows free gpu memory in malloc heap reloc shows free gpu memory in relocatable heap Keep polling it and make sure it doesn't go near zero ever. This may help you optimize GPU memory allocation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.