Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Exporting a large number of iMovie clips. Automator?

Hello,

I have 116 DV clips in iMovie HD from 29 large source DV files. Each of the clips is about 5 minutes long. Editing them has been a joy so far, but I've hit a snag exporting them.

The goal is to export them individually as MP4 files keeping the clip name as the new filename. I don't want one large file like what iMovie assumes you want to "share".

I have been fruitlessly scouring the web for a way to automate this process. Any way to do it? Or am I stuck babysitting it every 10 minutes for the next few days? Thanks.

PowerMac G5 Dual 2.0 Mac OS X (10.4.9)

PowerMac G5 Dual 2.0 Mac OS X (10.4.9)

Posted on Apr 25, 2007 2:47 AM

Reply
7 replies

Apr 25, 2007 9:54 AM in response to Eric Arnold

Your goal is to export each of the 116 clips in the iMovie project, not their source files, right? (A source file may include two or more clips, and include material not included in the Timeline.)

There is no easy way to export a series of clips. iMovie is not AppleScriptable, so there's no good way to automate it using AppleScript/Automator. You can't tell iMovie to select clip 3, for example, and export it to a new movie.

The best you can do is create a script for QuickTime Player that exports a portion of the movie "Timeline Movie.mov" — which iMovie stores in the Cache folder of the iMovie project — to a new movie the format you want. QuickTime Player is entirely AppleScriptable, so it can do that.

Theoretically, most of what you want to do is possible, for there's is a subtle but reliable connection between the iMovie project and the Timeline Movie.mov. When the Timeline Movie.mov is opened in QuickTime Player, the movie selects the contents of the clip selected in iMovie when the project was last Saved. Each time we save the iMovie project, iMovie sets the selected frames of the Timeline Movie.mov to match the clip selected in iMovie. So if we select Clip 3 of the iMovie project, Save, and open the Timeline Movie.mov in QuickTime Player, the frames for Clip 3 are pre-selected in the movie.

So theoretically an AppleScript could open the Timeline Movie.mov, Copy the current selection to a new movie and export it to a movie with the format you want.

Here's the problem: There's no way to tell iMovie to select a particular clip in the Timeline and Save the project, the two steps required for the Timeline Movie.mov to select the proper frames. These steps must be done manually. You have to manually select the clip in iMovie, Save, then run a script that opens the Timeline Movie.mov in QuickTime Player, exports the selection, then closes the movie so the next time iMovie Saves it can properly update the Timeline movie.

There's also no way to apply the name of the selected clip to the exported movie without AppleScript sniffing around in the iMovie project file, which it doesn't know how to do.

So some of what you want can be done, sort of, but not the way you want. What is needed is a utility that understands how to read the iMovie project file, figures out where the clips are, and exports each clip.

Karl

Apr 25, 2007 7:28 PM in response to Karl Petersen

Thank you Matti, F Shippey, and Karl for your helpful comments.

While MPEG Streamclip and VisualHub are great appliations, they don't directly solve the issue I've run into.

Karl has it right that the 116 clips are from larger source files that contain portions that I don't want. Therefore batch processing of files in the Media folder doesn't get me much.

I've just recently become aware of the function of the Timeline Movie.mov. This sounds like the most fruitful avenue to explore. I regret that I'm not skilled in AppleScript to give it a shot. Sounds like a lot of work for even a skilled scripter.


How about another plan of attack: Would any application be able to create new files based on iMovie chapter markers within an MP4 containing all 116 clips?

Mac OS X (10.4.9)

Apr 25, 2007 9:24 PM in response to Eric Arnold

How about another plan of attack: Would any
application be able to create new files based on
iMovie chapter markers within an MP4 containing all
116 clips?


Very interesting idea! As a matter of fact, a QuickTime Player AppleScript knows quite a lot about chapters. It's possible to create a script that can select each chapter in turn. Which makes it possible to export each chapter to its own movie.

The export function isn't included in this script, but the script shows how to select each chapter one at a time.

Copy this to a new script in Script Editor, open the Timeline Movie.mov that's in the iMovie project's Shared Folder for iDVD in QuickTime Player, then press the Run button in Script Editor.

Note: this is a very primitive script, without niceties like error checking. It's a starting place.

Karl

Start Copying at next line:

-- This script figures out the chapter locations in the Timeline Movie.mov,
-- the movie that iMovie stores in the Shared Movies/iDVD folder inside the project.
-- Unlike the other Timeline Movie.mov (in the Cache folder), the iDVD movie contains chapters.

-- First open the movie in QuickTime Player. It must be the frontmost movie in QT Player

tell application "QuickTime Player"
tell movie 1
set tResult to {} -- initilize

repeat with x from 1 to count of the chapters
-- select this chapter
set the selection start to the time of chapter x
set the selection end to the (time of chapter x) + the (duration of chapter x)

-- append to report
set thisChapterInfo to {the selection start & the selection end}
set tResult to tResult & thisChapterInfo -- {the selection start & the selection end}

-- Copy the selection here
-- Create a new movie here
-- Paste into the new movie here
-- Export new movie to the desired folder, with the desired movie name, in the desired format here
-- The movie could use the name of the chapter, but watch out for duplicate chapter names.

end repeat
return tResult
end tell
end tell

Apr 27, 2007 11:11 PM in response to Karl Petersen

Hi Karl,

I gave your script a try and had a few degrees of success. It ran and navigated the Timeline Movie.mov but always selected the last chapter. For some odd reason the Timeline Movie.mov was also sometimes double length even though there was only one instance of each clip in the timeline.

Ultimately it was easier to export the clips as DV streams from within iMovie (trimming unwanted material), followed by a batch conversion in VisualHub.

Thanks for offering help!

Apr 28, 2007 9:24 AM in response to Eric Arnold

Hi Karl,

I gave your script a try and had a few degrees of
success. It ran and navigated the Timeline Movie.mov
but always selected the last chapter. For some odd
reason the Timeline Movie.mov was also sometimes
double length even though there was only one instance
of each clip in the timeline.


That sounds like script failure, not a few degrees of success. 🙂

Some things to check:

1. Make sure to open the Timeline movie that's in the Shared Folder, not the Timeline movie loose in Cache folder.

2. Before running the script, save the iMovie project if you've changed anything.

Karl

Exporting a large number of iMovie clips. Automator?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.