4

I'm writing a simple software to capture and record webcam images to a compressed video file. I'm using OpenCV "VideoCapture read(frame)" and "VideoWriter write(frame)" in a C++ software.

I'm on Ubuntu 14.04 LTS operating system.

I would like to know which library OpenCV is using under the hood. Is it ffmpeg or gstreamer or V4L2 or its own low level source code ? It seems to be changing depending of the OpenCV version I'm using. (Ex 2.4.1, 2.4.11, 3.x)

Can somebody give me a overview of what OpenCV is doing to decode/encode video ?

What is the typical path of the video data coming from the webcam up to my program in user space ? What is the typical path of the video data coming from program up to the file system ?

Right now, this is confusing for me.

ssinfod
  • 975
  • 2
  • 15
  • 31
  • I was also tempted to close as "off topic because it asks to recommend a software" based on the initial title. I modified the title to better reflect the body. I think it's an on topic question. – bolov Mar 18 '16 at 15:08
  • @dasblinkenlight et al., I think the question should be reopened. While the writing of the question could be improved, the reason given for closing does not apply; the question clearly does **not** ask for a recommendation. – Ulrich Stern Mar 24 '16 at 10:45

1 Answers1

2

OpenCV uses ffmpeg

I don't know exactly where or how. I know it is used for reading and writing video files. I think it isn't used when getting images from a cam. I think it reads raw cam data, because it can set webcam properties.

Also, the "video" from the web cam isn't video, it is an image at the time the frame is capture. Capturing multiple images in order can be written to a video.

Getting video from a file, OpenCV grabes a frame at a time out of the stream.

J. A. Streich
  • 1,683
  • 10
  • 13
  • It seems OpenCV is also using gstreamer but which one has priority ? (I think the choice occurs at compile time. What is the default ?) – ssinfod Mar 18 '16 at 20:52