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);
}