Run QuickTime from command line to export video

2

0

I have a bunch of avi's I am converting to m4v, and I can do this in QuickTime by opening the video and then go 'Save As', select a folder, select the type (iPhone, Movie, etc), blah blah blah. But I have around 100 videos I want to do this with. Command line options? Or batch processing options in the GUI? Enlighten me, please.

This is QuickTime X on Snow Leopard.

Daniel Huckstep

Posted 2009-11-22T18:51:31.627

Reputation: 990

Answers

1

For a GUI, I suggest checking out MPEG Streamclip which does have the ability to do batch processing.

Alternatively, there are (now deprecated) command line tools available in /usr/libexec/podcastproducer and the replacement at /usr/bin/pcastaction. Specifically;

pcastaction encode --input=INFILE --output=OUTFILE --encoder=iphone

You can find more by running pcastaction help encode

So a sample script to do this would be as follows:

#! /bin/sh

for FILE in /PATH/TO/FOLDER/OF/MOVIES/*; do
    /usr/bin/pcastaction encode --basedir="/PATH/TO/FOLDER/OF/MOVIES" --input="$FILE" --output="$FILE".m4v --encoder=iphone
done

Chealion

Posted 2009-11-22T18:51:31.627

Reputation: 22 932

This doesn't seem to work well with paths that have spaces, but good stuff. – Daniel Huckstep – 2009-11-23T06:11:14.833

@Daniel Huckstep: Odd, the reason I put the quotes for the input and output was to handle files with spaces (and it tested fine with files with spaces). – Chealion – 2009-11-23T06:15:22.440

0

You might find qt_tools useful for batch conversion. I have used it under Tiger (I had to recompile it). I am not sure how it will work on Show Leopard.

Chris Johnsen

Posted 2009-11-22T18:51:31.627

Reputation: 31 786

0

This could probably be done with Quartz Composer, but it's been a while since I looked at the API.

Hasaan Chop

Posted 2009-11-22T18:51:31.627

Reputation: 4 224