Skip to main content
Known Participant
July 13, 2021
Question

Take action when Media Encoder queue finishes?

  • July 13, 2021
  • 2 replies
  • 1048 views

Right now, if I queue up long-running tasks in Media Encoder, I have to pretty much check out the window periodically to see if the jobs are done. I'd like to be able to run an AppleScript or something so I can get a notification that encoding is complete. Is there any way to do something like that?

This topic has been closed for replies.

2 replies

Inspiring
February 9, 2023

This Applescript code checks ME's menu item File > Stop Queue and finishes when the menu item is no longer enabled. This script can be connected to e.g. Folder Action to monitor output folder and activate ME and display dialog etc.

Cheers!

Funtom

set stopQueueEnabled to true
tell application "System Events"
	repeat with processItem in processes
		if name of processItem is "Adobe Media Encoder 2023" then
			set processContents to entire contents of processItem
			exit repeat
		end if
	end repeat
	repeat while stopQueueEnabled is true
		delay 10 -- seconds
		set stopQueueEnabled to enabled of item 10 of menu items of item 1 of menus of item 3 of menu bar items of item 3 of processContents
	end repeat
end tell

 

Inspiring
February 9, 2023

Of course omitting the year makes the code accept any version of ME.

if name of processItem starts with "Adobe Media Encoder" then
XofpAuthor
Known Participant
April 25, 2022

I'm replying to my own post here in case someone stumbles across it. I ended up:

 

  1. Writing a little Python scrip that polls the output files until they have stopped growing. It waits for five minutes after the last change, and then exits.
  2. Using ffprobe to make sure that the files that Media Encoder produced are readble.

 

Slightly hacky, but it seems to work.