Simple Raspberry Pi MMAL project. Based on tasanakorn's work. The main difference lays in the fact this is for raspbian lite (no monitor) and independent from userland. Another modification is the opencv_demo has been updated to work with opencv4.
Most of the files here do not require another library, but one, that is inside the opencv_demo folder.
By typing the fallowing on terminal it'll create the executables for each demo
make
- buffer_demo Captures Video port output in a buffer
- main Connects camera component and preview component to watch the video (no tested, but compiles without errors)
- video_record the camera video port output is caught and sent to h264-built-in harwared encoder, the enconder output can be save in a file like this
./video_record > my_video.h264
Remember, h264 is an codec not a container. In order to play the video use VLC, and you can use ffmpeg for wrapping it into a MP4 container.
Install the kernel headers in case it's not
sudo apt-get install raspberrypi-kernel-headers
for OpenCV, enter to the folder for more details
- Multi-Media Abstraction Layer (MMAL). Draft Version 0.1.
- Picamera, Camera Harware
- OpenCV4 docs, OpenCV modules