0

I have a Pi Zero running Raspbian Jessie (up to date) and Motion with a Logitech C120 camera.

The camera supports 320x240 and 640x480

When I configure Motion to record 640x480 the output is jittery and frames are lost.

320x240 is much better.

Where is the bottleneck?

Is it the camera or the Pi?

1

why don't you just use the RPi cam and stream the data across the network for evaluation on another machine?

A resolution of 1920 x 1440 at 3 frames per second is no problem for this construction. I run this currently over wifi on my RPi Zero W. Dependent on your desired workload (on client) and network traffic you can simply increase the frame rate.

on server:

/usr/local/bin/mjpg_streamer -o output_http.so -w ./www -i input_raspicam.so -x 1920 -y 1440 -fps 3

on client:

/etc/motion/motion.conf:
[...]
netcam_url http://<rpi-ip-address>:8080/?action=stream
0
  • disclaimer: I dont have Pi-Zero with me, so I can only suggest a general approach

  • One simple way to test it to hook the camera to a desktop / laptop and see if the same jitter / drop in frame rate happens. If it does, then device is probably to blame

  • You can follow the instructions here on how use VLC media player to capture the video silently without showing on the screen (which would add more load on the PI/GPU) though writing to disk may become a bottleneck in this case. If VLC is able to deliver the FPS you expect, it is possible the application you are using is unable to handle the video stream effectively.

0

Bottlenecks could be the connection between the camera and the Pi, the volume of stuff the Pi had to process or the read/write speed of the SD card. It is unlikely to be the camera as it will have been tested at great length to confirm it's standards.

  • it saves directly to an SMB share over gigabit ethernet – Shevek Oct 10 '17 at 10:54
  • So the Pi captures from the camera, processes the video and saves that to SMB? What class SD card? – Andy Anderson Oct 10 '17 at 16:16
  • Class 10 I think – Shevek Oct 10 '17 at 19:51
  • It's all pointing to the Pi being unable to process the higher resolution images. The camera specs state 1GHz CPU and 256MB RAM - which the Zero meets just. Single core is probably what's causing it. – Andy Anderson Oct 10 '17 at 20:18
  • Get a newer Pi 3. – Andy Anderson Oct 10 '17 at 20:19

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.