Who has nailed it? I have iMovie on my machine but not sure what the best things are.
The files are saved as xml, so you can try to generate the file automatically, and let the program later handle all the nasty details of video encodings.
(I edited the xml files for very simple changes that are not possible in the UI, like changing the order of the tracks.)