Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Remove duplicate iMovie files Apps
I've found that iMovie is too non-destructive for an editing program. When dragging clip segments from one project to another, a copy of the entire original clip (not the segment) is made, making your project unnecessarily huge with copies of the same clips.

You can manually get rid of these files, including duplicate audio extractions, so you don't have to waste enormous amounts of space on your HD. Here's how:

Control-click to your iMovie project file and select "Show package contents"; you'll see the project file and a 'Media' folder, as well as other folders.

Open the Media folder and you'll see the duplicate files, such as Rachel_1, Rachel_2, and so forth; these are all copies of the same video clip (which, in this case, would be called Rachel). You can confirm this by selecting files, then using the Get Info command to compare sizes.

Take note of these clip names, as you will need to know them later (usually Clip_#). You can go ahead and delete all but one of these clips so iMovie has something to work with.

Now open the project file, after saving a back-up copy, in a a text editor such as Text Edit. It's really just an XML file containing references to each audio/video clip within each element, such as Extracted Audio 01.aiff. Don't be scared; all you have to do is replace each reference to the duplicate clips with the name of the one clip you kept.

Open the Find window and 'find' your clip, such as Rachel_3.mp4 and 'replace' with the clip you left over, Rachel_1.mp4. Repeat the find and replace operation until all your duplicate files are replaced with the files you kept.

Relaunch iMovie and open the project, it will open slowly, but just wait; nothing should be lost. If iMovie tells you a clip is missing, quit without saving and fix the XML by redoing your find and replace operation. If all appears well after watching your movie, save it and go on about your life.

Caution: If you edit the project file incorrectly and open it up again in iMovie, your errors will just render the clip missing and your timeline will get messed up. Just close the project without saving and fix it, or replace it with your back-up project file. Just make sure you don't save over anything important.

[kirkmc adds: I haven't tested this. I don't use iMovie.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[15,516 views]  

Remove duplicate iMovie files | 2 comments | Create New Account
Click here to return to the 'Remove duplicate iMovie files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Remove duplicate iMovie files
Authored by: ret on Nov 06, '06 05:33:52PM
I don't have an iMovie project at hand to test this with, but rather than futzing around with the project file, would linking (either soft or hard) the original file with the redundant file names achieve the same thing?
ie:
cd ~/Movies/MyGreatiMovie.imovieproject/Media
for dup in `ls -1 *_[1-9]`
do
  src=`echo $dup | sed 's/_[0-9]$//'`
  if [ -r "$src" ]
  then
     # file and file_N exist. move _N file and replace with link
     mv $dup ~/Movies
     ln -s $src $dup
     echo "Replaced $dup with link to $src"
   else
     echo "Can't find $src for $dup, skipping"
   fi
done
Note: Safari is a less-than-ideal syntax checker. Code above is not tested, just an example. It assumes the movie files don't have an extension suffix, which I thought they did (*.dv IIRC). I'm just working off the original hint. The script relocates the duplicated files into the "Movies" folder, so you can restore them easily if you find your iMovie borks on opening.
The line that creates the link could be changed from a soft-link to a hard-link by removing the "-s" argument. I guess if you know what "ln" does, you know that too...

cheers
RET

---
perl -e \'require Signature.pm; srand; printf STDOUT \"%s\\n\", $Signature[rand @Signature];\'

[ Reply to This | # ]

Remove duplicate iMovie files
Authored by: trommater on Nov 29, '06 09:27:05PM

Well, I'm no wiz at this, but I just followed the above hint and it seemed to work great!

Thanks a lot for the disk space.



[ Reply to This | # ]