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

Need help with "batch saving workflow" quicktime / automator

Hi, my goal:

I have a lot of folders with (windows) DV-avi files I need to change container to apple mov.

The best way - I found out - to just change the container from avi to mov - without touching the video and audio stream or metadata - is:


open the file in quicktime pro 7

save as self contained movie (same filename, same location).

wait til finished.

open next file...


As far as I understand, the script should open and handle many files automatic, file by file - always waiting til process is finished, before starting with next file.


A probably similar thing I found is a script for batch encode..... but I need batch save 😟, because I don't want to "touch" the source media 🙂


######


on
run
{
inputFiles
}

 
if
inputFiles
is equal to
{
}
then

   
set
inputFiles
to
(
choose
file
with prompt
"Select the file(s) to convert:"
with
multiple selections allowed
without
invisibles
)

 
end if

 
open
inputFiles

end
run


on
open
droppedItems

 
tell
application
"Finder"
to
set
inputFolder
to
(
container
of
first
item
of
droppedItems
)
as
Unicode text

 
set
outputFolder
to
(
choose folder
with prompt
"Select output folder:"
default location
(
inputFolder
as
alias
)
)
as
Unicode text


 
set
exportPreset
to
(
choose from list
{
"Movie"
,
"iPhone"
,
"iPod"
,
"HD 480p"
,
"HD 720p"
}
with prompt
"Choose QuickTime Export Preset:"
)
as
Unicode text

 
if
exportPreset
is equal to
"false"
then

   
return

 
end if


 
repeat with
currentItem
in
droppedItems

   
repeat until
getProcessPercentCPU
(
"CoreMediaAuthoringSessionHelper"
)
is equal to
""

     
delay
30

   
end repeat


   
tell
application
"Finder"
to
set
fileName
to
name
of
currentItem
as
Unicode text

   
convertFile
(
currentItem
,
outputFolder
&
fileName
&
".mov"
,
exportPreset
)

   
delay
30

 
end repeat

end
open


on
convertFile
(
inputFile
,
outputFile
,
exportPreset
)

 
tell
application
"QuickTime Player"

   
set
thisMovie
to
open
inputFile

   
export thisMovie
in
(
outputFile
)
using
settings preset exportPreset

   
close
thisMovie

 
end tell

end
convertFile


on
getProcessPercentCPU
(
processName
)

 
do shell script
"/bin/ps -xco %cpu,command | /usr/bin/awk '/"
&
processName
&
"$/ {print $1}'"

end
getProcessPercentCPU


######


As I can’t get it to work myself, I ask for help…….


Appreciate your answer

all the best from austria

Final Cut Pro 7, OS X Mavericks (10.9)

Posted on Oct 12, 2014 8:01 AM

Reply

There are no replies.

Need help with "batch saving workflow" quicktime / automator

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