Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Take action when Media Encoder queue finishes?

Explorer ,
Jul 13, 2021 Jul 13, 2021

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?

TOPICS
Export or render , How to , Tips and tricks
777
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 25, 2022 Apr 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 09, 2023 Feb 09, 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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 09, 2023 Feb 09, 2023

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

if name of processItem starts with "Adobe Media Encoder" then
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 09, 2023 Feb 09, 2023

Clever! Thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 09, 2023 Feb 09, 2023

You could also use ExtendScript scripting to solve this. See here: https://ame-scripting.docsforadobe.dev/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 10, 2023 Feb 10, 2023

My script is not clever enough. After testing I found out that for some reason Applescript slips from the loop although ME queue is still up and running. If anyone has some ame-js-script ready to directly listen the queue event, would be nice to see that. Thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 10, 2023 Feb 10, 2023
LATEST

Please have a look at https://ame-scripting.docsforadobe.dev/ that also contains a lot of code samples for waiting for completion. Do a full text search in https://ame-scripting.docsforadobe.dev/reference/index.html for complete events. You should be able to copypaste the example.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines