This is a small helper that uses ffmpeg to record h264 video from openFrameworks.
It starts ffmpeg in a subprocess, so ffmpeg should be available on your system. Tested on Linux but probably works on macOS too.
- Add the videxport.h file to your project and include it.
VidRecorder::start
to start ffmpeg and configure output filename and framerate.VidRecorder::recordViewport
adds a frame to the video file.VidRecorder::finish
stops ffmpeg.- Watch the console output for errors and messages from the ffmpeg process.
- All functions return false if something goes wrong (see the example file draw function).