Reputation: 4664
I need to add webcam video capture to a legacy MFC C++ application. The video needs to be saved as MP4. Did a bit of googling but didn't come across anything that looked promising. Any suggestions on the best approach?
EDIT: Windows platform.
EDIT: Must be compatible with XP
Upvotes: 0
Views: 3052
Reputation: 69632
There are a few popular options to choose from:
FFmpeg
and libavcodec
/libavformat
are definitely relevant, however H.264 encoder is only available under GPL license, not sure about video capture part right there, and you might have hard time looking for documentation and samples.Upvotes: 1
Reputation: 11754
I'd say look at OpenCV as a library, hook into their video capture for that aspect, it can write out to mp4 but you'll need a couple of other libs for handling the output stream (on Linux I'd say ffmpeg and x264), that should get the buffer into the container with a reasonable amount of hassle.
Upvotes: 1