• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
QT mov vs mp4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: QT mov vs mp4
      • From: Alan Fairlie <email@hidden>
  • Prev by Date: Re: Is this legit? [POSIX]
  • Next by Date: Word 2004 Performance Problems
  • Previous by thread: Script Editor crashing
  • Next by thread: Re: QT mov vs mp4
  • Index(es):
    • Date
    • Thread