I'm looking to write a C/C++ program to record a webcam video stream in a compressed video file.
I'm using Ubuntu 14.04 LTS.
Ideally, I want to use the available operating system codec to record the webcam images to my video file.
What is the standard way to use the installed codec of the OS ?
Is there a common V4L2 API to record video which is independent of the codec ? (ex: h264, mjpeg, divx, etc.)
Otherwise, how should I use the installed video codec in Ubuntu ? Is it a case by case situation ?