I think in the below mentioned thread you should find your answers: http://lists.apple.com/archives/QuickTime-java/2005/May/msg00024.html
the bottomline:
you HAVE to use call doUserDialog on the MovieExporter in order to
configure the settings and retreive them as an AtomContainer.
Movie.converToFile(yadda,yadda,yadda,yadda); will NOT do.
HTH
Cheers, Thomas
----------------------------
Thomas Martin
Moersbergerstrasse 7
CH 4057 Basel
Switzerland
M +41 76 558 67 90
email@hidden
http://www.thomas-martin.ch
----------------------------
On Jul 18, 2005, at 20:52, Michael Bøcker-Larsen wrote:
Hi,
I'm writing and application in which a part is to export a batch of
music files into a different bitrate and lenght.
I have learned that QTJ 6.3 should have support for setting the
export settings programmatically, but that no one really knows how
to do it. A work around is to make a GUI application chose a file
to export set the settings you want, and then save these settings
into a binary file. This file can then be loaded in later so that
you don't have to select the export settings again.
This approach has not worked for me. I've have written of files for
different settings but if you open them up (using a hex editor)
they are identical.
Have anyone successfully saved the export preferences from the
MovieExporter and later retrieved them? Even better have anyone
figured out set the preferences programmatically?
Bellow are some snippets from my code. These first method is where
the AtomContainer is extracted from the MovieExporter, saved as a
binary, and later retrieve again.
private AtomContainer loadSettings(String path) throws
FileNotFoundException, IOException, QTException {
File settingsFile = new File(path);
byte[] settingsBytes = new byte[(int)settingsFile.length()];
FileInputStream istream = new FileInputStream(settingsFile);
istream.read(settingsBytes);
QTHandle settingsHandle = new QTHandle(settingsBytes);
return AtomContainer.fromQTHandle(settingsHandle);
}
--- The part where I export using the saved settings
// Load settings
exporter.setExportSettingsFromAtomContainer(loadSettings
("/Users/mblarsen/Desktop/Atoms/192.atom"));
// Export with atom
movie.convertToFile (null,
saveFile,
StdQTConstants.kQTFileTypeMovie,
StdQTConstants.kMoviePlayer,
IOConstants.smSystemScript,
StdQTConstants.movieToFileOnlyExport |
StdQTConstants.movieFileSpecValid,
exporter);
Best regards
Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40obinary.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden