(Copying this from Stack Overflow, because this might be a better place to ask)

Looking for help (really to do) with a script/automator action for opening a files in QT X and using the export 720p command. I do not want to use the encode feature built into the finder. Using the "export" feature in QT X with the files I'm working does the trick and does not re-encode the files. I tried using automator but there is no "export" action only "encode" which re-encodes the files.

I see the command in the dictionary but can't seem to make it work.

I've started with this but I keep getting a permissions problem. A guy on Stack Overflow has noted the same problem.

tell application "Finder"
set savePath to "Macintosh HD:Users:WBTVPOST:Desktop"
end tell

tell application "QuickTime Player"
tell application "QuickTime Player" to get the name of front window
set vidName to name
export (document 1) in savePath using settings preset "720p"
end tell

I've seen a lot of scripting help but mostly for QT 7 and Pro. Not so much for X

Is this possible?

Thanks in advance for your talent and skill,


  • 1
    Export doesn't re-encode the video? It absolutely does for me. I have to use file → save to avoid a re-encode with QuickTime. I would highly encourage using ffmpeg for this, it will be much less painless overall. Nov 16, 2018 at 17:31
  • Export isn't re-encoding because it's the same codec. It seems to just re-wrap the file. I am currently looking at creating a droplet in ffmpeg for this. Nov 16, 2018 at 19:44
  • Ok. I've moved on to terminal and ffmpeg to create a service but still no joy getting it to work. Any suggestions? for f in "$@" do ffmpeg -i "$f" -vcodec copy -acodec copy /Users/home/Desktop/Conversions/${f%.*}mov done Nov 16, 2018 at 22:14
  • Assuming the input file was passed into the shell script block as a parameter, you'd want something like: "ffmpeg -i $1 -codec copy /Users/home/Desktop/Conversions/$1-remuxed.mov". Experiment in terminal before going into automator for a quicker feedback loop. Nov 17, 2018 at 0:10

1 Answer 1

tell application "QuickTime Player"
    set movieName to the name of the front document
    set savePath to a reference to POSIX file ¬
        ("/Users/WBTVPOST/Desktop/" & movieName & ".mov")
    export the front document in savePath using settings preset "720p"
end tell

System info: AppleScript version: 2.7 System version: 10.13.6

PS. User @wowfunhappy is absolutely correct in saying that the export command does re-encode a file. It has to in order to apply whatever settings are contained within the preset.

  • Yup. It totally worked. If it's re-encoding it's happening so fast I can't tell. However, now I've got a problem with some malformed videos that need to be re-wrapped in ffmpeg. I can do it in the terminal straight up, but I can't seem to automate it. 'ffmpeg -i /Users/wbtvpost/Desktop/Trial\ and\ Error/201/Dailies/Day\ 01/TAE_201_B1_DAY01_20180319_R02.mov -vcodec copy -acodec copy /Users/wbtvpost/Desktop/Conversions/test9.mov' Nov 16, 2018 at 23:33
  • Yup. I think I've done it. I'll ask the new question. Thx. Nov 16, 2018 at 23:41
  • Minor nitpick, there's a lot that can be done without re-encoding, it depends on what is in the preset. I quite dislike how QuickTime always seems to re-encode exported videos even when it shouldn't be necessary. (I also dislike how much Apple's encoder sucks compared to x264, but that's neither here nor there...) Nov 17, 2018 at 0:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .