Solution for capture from webcam with several options

423 views Asked by At

I'm developing a project using C++ and the QT library. On it I need to capture video and audio from one (or two) webcams and record it to a file upon user request. The program needs a number of options and that is the reason I've been struggling with this:

  • The display of video has to be separate from the record, that is, I need to be able to start a video and then, when the user wants, press the record button and start recording from that moment.
  • I need to be able to delay the video, that is, show the video with (for example) 5 seconds of delay.
  • I need to get a callback on every frame of the video, or every time change. That is because the user draws on top of the video and I need to save at what point that was made.
  • When playing the video, I need to be able to seek to any time and play it backwards as well.

The Qt QCamera is not working (for record) on the windows version. I was first using openCV but, besides not recording audio, I can not easily seek and play the video backwards. I tried using QTMEL but unfortunately it is not stable enough and the creator abandoned the project because of that. Last library I was trying was Vlc-Qt but the record is not working like I want it to. Besides the framerate of the result file being off, I have to start recording when the webcam starts and I can't find a way to do it "on the go".

One solution I thought about was to use openCV for webcam capture and record and then use vlc to play the video. The problem with this is that openCV does not record audio and I'd need another library that could join the captured frames from openCV with the recorded audio into a video file.

Anyone can help me come up with a solution?

Thanks for your time reading my question.

Kind regards.

0

There are 0 answers