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

Low Frame rate on Pi Zero W #1021

Closed
adrian0 opened this issue Jul 6, 2017 · 17 comments
Closed

Low Frame rate on Pi Zero W #1021

adrian0 opened this issue Jul 6, 2017 · 17 comments

Comments

@adrian0
Copy link

adrian0 commented Jul 6, 2017

Hi,
Even when configured for 30fps (Movies and streaming), I am unable to get better than about 0.2fps
This is running a resolution of 1280x1024 and overclocking to 1000Mhz.

Anyone know what I can do to get a more reasonable frame rate?

Will a full blown Pi3 provide better frame rate than a Pi Zero W?

Thanks,
Rock hard, Rock often.
-Adrian

@jasaw
Copy link
Collaborator

jasaw commented Jul 6, 2017

@adrian0 The reason you're getting low frame rate is because motion software by default does not use hardware acceleration when encoding movies.
Work has been done to enable hardware acceleration but not yet merged into master. Refer to issue #365 and pull request 998 for more information.
I'm running Pi Zero W with hardware acceleration, gettting 25fps, 3.5Mbps at 800 x 600 resolution. If you want to try out the binary that I've built, go to my fork, but bewarned that it's highly experimental, that's why it's not merged into master yet. Use at your own risk.

@adrian0
Copy link
Author

adrian0 commented Jul 7, 2017

Thanks, jasaw,
Awesome information and help.
I will test out your fork over the weekend.

Ball park (I know how these things are), at what point do you feel this will be merged into the main branch?

Thanks,
Rock hard, Rock often.
-Adrian

@jasaw
Copy link
Collaborator

jasaw commented Jul 7, 2017

@adrian0 Sorry, that question is for @ccrisan to answer. He's the project owner. I'm just another motioneyeos user. :-)

@adrian0
Copy link
Author

adrian0 commented Jul 7, 2017

"..just another motioneyeos user" :-)
Understatement!

Thanks for making the motioneyos world a better place for us less technical people.
(And thanks to @ccrisan for the project)

@ccrisan
Copy link
Collaborator

ccrisan commented Jul 7, 2017

@adrian0 we're actually waiting for the next motion release, which is already being discussed and which comes with many ffmpeg-related fixes. I believe this makes sense since @jasaw's work is related to ffmpeg.

@dchang0
Copy link

dchang0 commented Jul 8, 2017

I notice that my Raspberry Pi Zero W in Fast Network Camera mode also produces very low framerates. Is it true that streamEye in Fast Network Camera mode also uses ffmpeg, or could this be some other problem?

@ccrisan
Copy link
Collaborator

ccrisan commented Jul 8, 2017

@dchang0 , Fast Network Camera does not use ffmpeg. It should stream as high as possible, given the streaming format (MJPEG) and the network bandwidth. What are your settings (resolution, framerate and quality) and what is the approximate actual framerate that you get?

@dchang0
Copy link

dchang0 commented Jul 8, 2017

Thanks for the quick reply. I won't dirty up/split this thread with my issue. Now that I know it's not ffmpeg, I'll look for other causes and start a separate thread once I've gathered enough diagnostic info.

@dchang0
Copy link

dchang0 commented Jul 9, 2017

I'll ask this question here in this thread because it is pertinent to both my issue and this one: is there a utility that can measure actual framerate of a received IP camera stream and optionally graph it over time?
The reason I ask is that my current surveillance software says my actual framerate is a lowly 1fps, and I want to double-check this value (it certainly seems to be correct from viewing the video).

Reducing the resolution does visibly improve framerate, so I guess the goal is to measure the maximum that the RPi Zero W can currently do and then work from there to get it on par with the other RPi models that are supposed to have similar hardware capabilities.

@jasaw
Copy link
Collaborator

jasaw commented Oct 12, 2017

My hardware accelerated video encoding work is in pre-release 20171008.
It should address the low framerate issue for those recording video locally.
If you're getting low framerate with fast network camera mode, then it's most likely wifi signal issue.

@jeffehobbs
Copy link

Checking into this thread in 2019, I've installed motionEyeOS on a Raspberry Pi Zero W, followed this (excellent!) walkthrough for setup, but I too am getting low 1-2fps frame rates from captured video. Is there some setting or config pref that needs to be set OOTB to get better performance from the Pi Zero?

@jasaw
Copy link
Collaborator

jasaw commented Jan 21, 2019

@jeffehobbs Did you follow the motionEye on Raspbian installation wiki or did you install motionEyeOS? If you are running motionEyeOS, you have to select the OMX encoder under Movies section to get higher frame rate.
If you are running Raspbian, you'll need to do more things to enable OMX. See motioneye-project/motioneye#930

@jeffehobbs
Copy link

Thanks, @jasaw. I've installed motionEyeOS, most of the settings are OOTB defaults, and I've got movie encoding set to "H.264/OMX" in that dropdown, but I am still seeing very rough frame rates. Screenshot below:

movies_motioneyeos

To be clear, I need motion detection in my project so "Fast Network Camera" mode is not an option for me. But I am interested in getting higher frame rates from the the Pi Zero W.

@jasaw
Copy link
Collaborator

jasaw commented Jan 21, 2019

@jeffehobbs What's your resolution and frame rate? Pi Zero W hardware is pretty weak compared to the big brother RPi 3B+.
From memory, I think Pi Zero W is only capable of doing something like this:

  • 800x600 @ 25 fps.
  • 1024x768 @ 20 fps.
  • 1280x720 @ 15 fps.

You'll also need to close your web browser to stop the live video stream. Live video stream puts heavy load on CPU.

@Snipercaine
Copy link

I'm also getting ~2 fps, on my PiZeroW with MotionEyeOs installed. I'm using H.264/OMX (.mp4), and 1280x720 15fps. But the stream is showing 2 fps.
Do we have a clear solution for this?

@jeffehobbs
Copy link

I found that changing rotation and actually rotating the physical camera helped a bit, but I echo @Snipercaine's comments above -- frame rates on the Pi Zero W are still very low.

@jasaw
Copy link
Collaborator

jasaw commented Feb 17, 2019

@Snipercaine Live streaming will give you very low frame rate because it uses the CPU to encode the mjpeg stream. The 15 fps can only be achieved when recording video using h264/omx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants