QT mov vs mp4
QT mov vs mp4
- Subject: QT mov vs mp4
- From: Gary Franks <email@hidden>
- Date: Thu, 24 Jul 2008 10:30:36 -0500
With the help of this list I was able to succeed in changing the
duration of a batch of Quicktime mov files.
The following script works beautifully for mov files, but I can't get
it to work with mp4 files.
The script runs, opens all mp4s, and saves to the destination; but
when opening one of the new mp4s I get error message:
"The movie could not be opened." An invalid sample description was
found in the movie."
The "save self contained" must be the issue, as that defaults to mov
rather than mp4 and I still have an .mp4 suffix.
My efforts to fix have only screwed things up more. I think I need to
"export" rather than "save self contained", or
change the suffix to mov on "save self contained", but am currently
failing at both. Need help as I'm guessing.
A new mp4 would be preferable, but I don't care if its mov or mp4.
tell application "Finder"
set moviePath to (((path to desktop folder) as string) &
"temp_movies:") as alias
set outputPath to ((path to desktop folder) as string) & "output:"
set movieList to name of files in moviePath
end tell
repeat with thisMovie in movieList
tell application "QuickTime Player"
open file ((moviePath as string) & thisMovie)
select all thisMovie
set new_duration to 5
set the selection end of document thisMovie to (new_duration * (time
scale of document thisMovie))
trim document thisMovie
rewind document thisMovie
save self contained document thisMovie in file (outputPath &
thisMovie)
close document thisMovie
end tell
end repeat
Thanks
Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden