Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Audio extraction miss understand



Hello, i think i have missed something in the audio extraction api.

 

I need to extract each audio track in each audio stream of a movie, to place them in a time line for editing

For ex  a movie with two audio stream in it, one with a stereo track, and an other with a stereo track too.

So for my application i need to extract 4 mono tracks.

 

The audio extraction failed (-50) with this configuration (i have changed the asbd, layout properties & set the mixing as discreet)

But if i edit the movie in quicktime 7 (i leave the first stream as it was (left and right), i set the left channel of the second stream as center-left and the right channel of the second stream at center-right)

The result is L CL CR R and there everything is fine

 

So i think i missed something about discreet channel mixing & the channel layout.

 

Here is tha way i set the channel layout :

 

UInt32 size = fieldOffset(AudioChannelLayout, mChannelDescriptions[m_Asbd.mChannelsPerFrame]);

AudioChannelLayout* playout = (QT::AudioChannelLayout*) calloc(1, size);

 

// expand the layout into a full layout using channel descriptions:

size = sizeof(AudioChannelLayout);

playout->mChannelLayoutTag = kAudioChannelLayoutTag_UseChannelDescriptions;

playout->mNumberChannelDescriptions = m_Asbd.mChannelsPerFrame;

 

for (int i = 0; i < m_Asbd.mChannelsPerFrame; i++)

{

            playout->mChannelDescriptions[i].mChannelLabel = kAudioChannelLabel_Unused;

}

 

Error = MovieAudioExtractionSetProperty(m_ExtractionSession, kQTPropertyClass_MovieAudioExtraction_Audio, kQTMovieAudioExtractionAudioPropertyID_AudioChannelLayout, size, &playout);

 

If somone can help me to clarify this point….

Thanks.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.