Tzarls
Authorised Reseller
Authorised Reseller
Posts: 225
Joined: Tue Feb 26, 2013 6:59 am

Camera: Looking for a C++ library that includes encoders

Tue Jan 23, 2018 8:46 pm

Hello to all. I need to use the Raspberry Camera (V2) from C++. Not wanting to reinvent the wheel, I searched for some existing library with some kind of interface for controlling the camera and found these 2 examples:

https://github.com/cedricve/raspicam

http://robotblogging.blogspot.pe/2013/1 ... i-for.html

I´ve been using the second one for capturing stills and processing them later. Since I need the images to be jpg and the stills can be captured as jpg everything is great, but the stilsl port is a bit slow. So I thought of using the video port and grabbing frames from there using MJPG encoding, but neither of the mentioned libraries implement the usage of encoders. So, before attempting to dive into someone else's code to implement the missing parts, does anybody know (or have) a working C++ API for the camera that includes encoder support?

Thank you in advance.

EDIT: I'm not totally sure this topic belongs here. If the moderators think it belongs to some other category feel free to move it.

drich
Posts: 23
Joined: Tue Jul 28, 2015 7:36 pm

Re: Camera: Looking for a C++ library that includes encoders

Mon Jan 29, 2018 1:32 pm

https://github.com/dridri/OpenMaxIL-cpp

You can take a look at camera_encode.cpp example, changing AVC encoding to MJPEG should be enough to produce MJPEG video.
If you need any additional feature just open an issue and I'll work on it asap

Tzarls
Authorised Reseller
Authorised Reseller
Posts: 225
Joined: Tue Feb 26, 2013 6:59 am

Re: Camera: Looking for a C++ library that includes encoders

Mon Jan 29, 2018 6:54 pm

Thanks, I'll have a look at the code you mention.

Return to “Camera board”