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

.mov to mpeg4

I am trying to code a script to take my .mov's to mpeg 4 do any of you have anycode for this
this is what i have and it wont work for anything its un nerving me!
-------------------------------------------------------------------
property exportFolder : (path to documents folder as Unicode text) & "Your Folder:"

on run
choose folder with prompt "Change video files from these folders:" with multiple selections allowed
open (result)
end run

on open droppedItems
tell application "QuickTime Player"
activate
close every window
end tell

repeat with thisItem in droppedItems
if (folder of (info for thisItem without size)) is true then
list folder thisItem without invisibles

repeat with thisFile in (result)
tell application "QuickTime Player"
open ((thisItem as Unicode text) & thisFile)

if (can export (front movie) as MPEG4) is true then
try
export front movie to (exportFolder & thisFile & ".mpeg4") as MPEG4
on error errorMsg number errorNum
display dialog "Error (" & errorNum & "):" & return & return & errorMsg buttons "OK" default button 1 with icon caution
end try
else
display dialog "QuickTime Player can't export “" & (thisFile as Unicode text) & "” as mpeg4." buttons "OK" default button 1 with icon caution
end if

close front movie
end tell
end repeat

try
tell application "Finder" to delete thisItem
on error errorMsg number errorNum
display dialog "Error (" & errorNum & "):" & return & return & errorMsg buttons "OK" default button 1 with icon caution
end try
end if
end repeat

quit application "QuickTime Player"
end open

17 inch imac G5, Mac OS X (10.4.1)

Posted on May 25, 2006 1:39 PM

Reply
2 replies

May 26, 2006 6:51 PM in response to Dyana Coney

Hi
Try manually opening a movie and exporting it with the settings you require then run this script.

set settingsFile to choose file name
tell application "QuickTime Player"
save export settings movie 1 for MPEG4 to settingsFile
end tell


This will create a setting file you can use in other scripts

This can then be used like this

set movieToExport to choose file with prompt "Choose the MOV file you want to export"
set settingsFile to choose file with prompt "Choose the export settings"
set exportedMoviename to choose file name with prompt "Give a name for the new movie"
tell application "QuickTime Player"
activate
open movieToExport
export movie 1 to exportedMoviename as MPEG4 using settings settingsFile
end tell



A modification of this line
export movie 1 to exportedMoviename as MPEG4 using settings settingsFile
could be used in your script.

Hugh


iMac 800Mhz Mac OS X (10.4.5)

.mov to mpeg4

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