apple script quicktime player export permission error

I am trying to trim a movie and then save it.


tell application "QuickTime Player"
	activate
	set theMovie to open file "Users:me:Documents:myFolder:example.mp4"
	trim theMovie from 0 to (1 * 60 + 10.75)
	export front document in "Users:me:Documents:myFolder:output.mov" using settings preset "1080p"
end tell


But in Quicktime player in the export progress I get an error:

The file couldn’t be saved because you don’t have permission. You don’t have permission.


The folder and everything in it has read and write access for every user "chmod -R 777 myFolder".

Even if I run the script with "sudo osascript myScript.scpt" I get the same permission error.


Why do I get this error and how can I export the trimmed clip? Simple save can also only save it as ".qtpxcomposition" file extension. Other file extensions also give errors.

MacBook Pro 13", macOS 10.14

Posted on Mar 1, 2019 6:05 AM

Reply

Similar questions

2 replies

Mar 1, 2019 7:02 AM in response to Hadus

export front document in "Users:me:Documents:myFolder:output.m4a" using settings preset "Audio Only"

works but any other preset fails with error.


I also tried:

export front document in file "Users:me:Documents:myFolder:output.mov" using settings preset "1080p"

and then got a different error:

The operation could not be completed An unknown error occurred (-12780)

Mar 1, 2019 8:41 AM in response to Hadus

tell application "QuickTime Player"
	activate
	set inFile to "Users:me:Documents:myFolder:input.mp4"
	set outFile to "Users:me:Documents:myFolder:output.mp4"

	try
		set theOpenedFile to open for access file outFile with write permission
		set eof of theOpenedFile to 0
	end try

	open file inFile
	trim front document from 0 to (0 * 60 + 2)
	export front document in outFile using settings preset "1080p"

	try
		close access theOpenedFile
	end try

	close every document saving no
end tell


Is working :)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

apple script quicktime player export permission error

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