PDA

View Full Version : separate audio from video



polin
10th January 2013, 16:23
Hi guys, I'm new of the forum and new for the qt programming, I'm doing a QT GUIApplication and I have a problem, do you know how I can separated audio (.wav) from a .mov or .avi video?

I have seen that exist ffmpg, do you have some idea?

ChrisW67
11th January 2013, 00:37
Qt Multimedia contains facilities for playing and recording media and limited ability to intercept decoded media in-memory. Anything else requires you use a library that understands media container formats, how to manipulate them, and how to re-encode an audio stream that it might extract. FFmpeg is one such library. It has a C interface so it should be quite usable from a Qt program.

polin
11th January 2013, 17:22
Hi Chris, do you know how I can separate the stream audio and the stream video from an .mov or .avi, for put the different stream in two different buffer, in this way I cant obtain the parallelism.

wysota
11th January 2013, 20:26
With Qt5 you can do it by using QAudioProbe and QVideoProbe. Note, you'll be getting data frames and not encoded streams, if you want to save them in a particular format, you need to do the encoding yourself. You might also be missing some frames. There is also QAudioDecoder available.

polin
13th January 2013, 10:20
Thanks wysota, do you know where I can find any example of this?

wysota
13th January 2013, 11:30
I don't think there is any example of what you want to do available. You need to do some experimenting on your own.