Audio track of quicktime movie?


#1

Hi everybody,

does anybody know, if and how I can access the audio track of an quicktime movie file? At the moment I display the movie in a QuickTimeMovieComponent and the sound seems to be rendered directly to CoreAudio.

I want to send the audio data through my processing queue and mix it by hand in a MixerAudioSource. How can this be done?

I don't see that QuickTimeMovieComponent inherits an AudioSource, which would be too good to be true. Also the QTCompBase class leads me into platform specific code, I hope I don't have to dig that route.

As a workaround I found the QuickTimeAudioFormat (by an old posting in the forum, it's not visible in the Api docs). I register the format in the AudioFormatManager, but there I get a linker error. I searched the Introjucer for some defines to activate the QuickTimeAudioFormat, but no luck.

JUCE_QUICKTIME is defined and I already use the QuickTimeMovieComponent, so this seems not to be the problem.

Any hints? Thanks, daniel


#2

Hi,

Yes, well... The whole QuickTime.framework is deprecated by Apple and is even emitting a compiler warning (the only OSX compiler warning we have at the moment ;-) ). So please do not use it for new projects, we will replace it by Apple's AV Foundation very soon.


#3

Hi Timur,

thanks for your reply. At least I know now, that it's no use to read further that direction. I would hapilly follow your recommendation not to use Quicktime, but I'm lacking other options (I guess it's no use to ask you when "soon" will be ;-) ).

Btw. did you consider to use a frontend like ffmpeg or something similar? These open source projects are often more versatile and especially they will never become deprecated out of political reasons. But I guess the answer, uncertain IP issues...

If you have any other idea or even a hint, when the AV foundation is planned for, let me know.

Thanks, daniel


#4

Hi,

Using ffmpeg is not an option for us for the foreseeable future. However probably this is what *you* should use if you need a solution right now. With the currently available JUCE code, unfortunately it's not possible to pull out an audio stream from a video.

About when we will add support for AV Foundation: unfortunately I can't tell you a precise date here, but it will be soon... possibly quite soon...  likely very soon-ish... can't tell you more, sorry ;-)


#5

Ok, I will reschedule the video feature and focus on different tasks. You helped me a lot, thanks!


#6

...one more thing: will the AV Foundation wrapper have the possibility to act as AudioSource? I mean by inheritance or aggregation?


#7

No, it's very unlikely that it will do that.


#8

That's a pity, but thanks for the info.


#9

Search for AVAssetAudioReader on Google.

The guys from dRowAudio have made an AVFoundation based Juce::AudioFormat.
https://github.com/drowaudio/drowaudio

You just need to buid your own AVFoundation video player but there are plenty of examples for this online and it's actually quite simple.


#10

Hi Rebbur, thanks for the tip, I will have a look at it. Seems like a good resource.