Re: Exporting a QTMovie with settings
Re: Exporting a QTMovie with settings
- Subject: Re: Exporting a QTMovie with settings
- From: Brad Ford <email@hidden>
- Date: Thu, 11 Sep 2008 20:49:49 -0700
On Sep 11, 2008, at 7:23 PM, Chad Armstrong wrote:
Hello:
I've been struggling with a problem for awhile. I've asked this
question over on the QuickTime list, but haven't found the answer
I've been looking for. Perhaps I'm looking in the wrong areas, or
perhaps I need to rewrite some of my code and start making use of
Core Audio (which I figure I'll need to start working towards,
anyway).
Here's my problem:
I'm trying to export a QTMovie while preserving settings such as
pitch, rate/speed, and volume.
Chad, the properties you cite are considered transitory playback
state, not persistent movie/track properties, and as such are not
preserved when exporting. This is by design. If you use the
QuickTime.framework high level API's you can copy/paste segments of
tracks from one movie into another. You can also scale them this way
by pasting them to a smaller or larger duration in the target movie.
This new movie will play back faster or slower than the original, and
you can export it this way and the scaled edits will be preserved.
As for volume, export operations will preserve the volume levels of
the media, not the playback volume, but you can open up the exported
movie and apply a global volume level for the movie with:
SetMoviePreferredVolume(
Movie theMovie,
short volume)
from Movies.h.
-Brad Ford
QuickTime Engineering
So far my experiments have come down to being able to export the
file, but the settings are not preserved, which is like modifying an
image in Photoshop, saving the file, but the new file doesn't retain
any of the changes made.
I have been researching QTMovieExportSettings thoroughly, and this
seems to be on the right track, but it seems that all of my research
keeps returning to many of the same sources, but nothing seems to be
giving me the proper solution. This leads me to believe that I am
either still missing something, or I am going in the wrong direction
all together. Perhaps QTKit doesn't provide what I need fully? Do
I need to start looking into using Core Audio? The playback of the
file sounds correct, I just want to be able to save out what I hear
to a new audio or movie file.
I am trying to save out the file (with its current settings) using
QTMovie's writeToFile: withAttributes: method.
NSDictionary *attributes = [NSDictionary
dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], QTMovieExport,
[NSNumber numberWithLong:kQTFileTypeAIFF], QTMovieExportType,
[NSNumber numberWithLong:SoundMediaType],
QTMovieExportManufacturer,
exportSettings, QTMovieExportSettings, nil];
[myFile writeToFile:[savePanel filename] withAttributes: attributes];
Any guidance on where I need to look so I can properly export my
QTMovie (which may be an audio file, QuickTime movie, etc.) and save
it out in another format with the effects applied to it? I've been
giving myself a headache trying to sort everything out, and
QuickTime can quickly become a monster to wrestle against.
Regards,
Chad
_______________________________________________
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
_______________________________________________
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