TarjeiB wrote:Lori wrote:
oh ofc *facepalm*
You could take a look at tasanakorn's code:
http://www.raspberrypi.org/phpBB3/viewt ... 2&p=356842
He used RaspiVid instead of RaspiStill (I think that one has a less heavy encoder so it's faster, and video needs lesser adjusting for lighting and such(?)). But his code is kind of messy.. -though the functionality is similar to yours, only your code is better readable

But that will require CPU reencoding to JPG, since the raspivid provides h264. For mjpg-streaming with no CPU usage it's just raspistill that will do (for now)

Yup you're right.. (i tried it out

) ..runs at 100% cpu with not-so-high fps
The interesting thing about working with vid is that it does not require the worker thread to do something, so you can put OpenCV detection there, for example. (Without interrupting the streaming fps)
I guess I'll try another aproach
btw, I found a little mistake in the input_init function: You might want to assign the plugin_number with:
Not sure if that helps much with the black frames, but the other plugins have this line too.