Record audio and video in one container
-
Hi
I am building an application that records video from a USB capture stick, the program works great while using openCV with imwrire to create the file.
I want to record audio along with this video file, i have looked at the QT examples and have built a program that records audio without a problem.
The next stage is to combine these 2 streams together and write into one file within QT, does anyone know how this can be done? Would it require using LIbav or something similar?
Steve
-
Hi and welcome to devnet,
Is your USB capture stick device seen as a camera ? If so you can try using QtMultimedia to record that input.
Hope it helps
-
Hi
Thanks for your response, yes the catputure stick is being seen as a camera, i am able to make a video file using openCV and x264vfw to create a video file which works perfectly. I have also used the QT example to create an audio recorder which works without a problem. These 2 sepparate programs will create individual video and audio files.
I can't find an example where i can mux both these files together within QT, i have used ffmpegwrapper for QT but this however only handles video.
Do you know of a QtMulitmedia example that will record both audio and video.
Thanks for the help
Steve
-
Take a look at the QCamera + QRecorder classes they might be enough
-
I had a look at QMediaRecorder class but this class will only accept QMedia objects (QAudioDecoder, QCamera, QMediaPlayer, and QRadioTuner). My application takes a video from the camera using openCV, performs video processing and produces a series of QImage frames which i write to a file.
Is it possible to stream these processed QImage frames to QMediaPlayer which can then be used as an object for QMediaRecorder?
I cant seems to find QRecorder, will that be more suitable than QMediaRoecorder?
Steve
-
Isn't your camera detected by QtMultimedia i.e. listed by QCameraInfo ?
-
The camera is being detected but that is not what i want to record, i need to record the video stream that has been processed by openCV, can this be done?
-
Then a project like QtAV might be what you need.