• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AudioTrack to movie.......
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioTrack to movie.......


  • Subject: Re: AudioTrack to movie.......
  • From: Mark Munte <email@hidden>
  • Date: Tue, 3 Apr 2007 18:59:26 +0200

Hi, just a few observations....
This is the first time i am dealing with the tracks of a movie.
I am trying to change the application QTExtractandConverttoMovieFile to make it add the
converted audio to an existing video which has no audio track.


and i tried like this in moviewriter.m and called along with createOutputFile

-(void)AddAudioToThisFile
{
...
// create the audio track
Track audiotrack = NewMovieTrack(mOutputMovie, myWidth, myHeight, kFullVolume);
For an audio track, width and height should be 0.
Media soundMedia = NewTrackMedia(audiotrack, SoundMediaType, myTimeScale, NULL,
0);
The audio media timescale should match the audio sample rate.
So setting it to the timescale of the video tracks media could be a problem...
In the convert audio to file function i added this code

err = AddMediaSample2(soundMedia , mOutputBufferList- >mBuffers[0].mData,
mOutputBufferList->mBuffers [0].mDataByteSize, 1, 0,
(SampleDescriptionHandle)mSoundDescription,numSamples, 0, NULL);


and at last ended with

-(void)AddAudioTracktoMovieFinished
{
EndMediaEdits(soundMedia);
InsertMediaIntoTrack(audiotrack, 0, 0, GetMediaDuration (soundMedia), fixed1);
}



i am getting error at Addmedia sample. and also no audio track is added with the destination movie.
And the error code is ??? This info might help...

Even if AddMediaSample fails, the movie should have an empty audio track, if it does not, there's something else wrong.... are you saving the changes to the QTMovie ?


Mark _______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >AudioTrack to movie....... (From: "sandeep chandran" <email@hidden>)

  • Prev by Date: AudioTrack to movie.......
  • Next by Date: AAC/m4a with AudioConverterFillComplexBuffer
  • Previous by thread: AudioTrack to movie.......
  • Next by thread: AAC/m4a with AudioConverterFillComplexBuffer
  • Index(es):
    • Date
    • Thread