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

script: add to adobe media encoder

New Here ,
Oct 15, 2014 Oct 15, 2014

Hello guys!

First of all congrats about the new features, and the badass look of After Effects. I really enjoy it!

But I'm really disappointed to see that the h264 render function is gone. That really destroyed my workflow   boom!

Because I have a lot of jobs for an event hall, where I'm doing very often 360 degrees projection mappings, and the global resolution there is around 26 000 px width. What we usually do, because we're using watchout as playback system and handling all the projectors, is splitting h264 movies to theirs maximum width resolution. The things is that for example for an event we have around 20 - 30 animations, and 1 animation is split in 6 movies.. What we usually did -  we wrote a small script which splits automatically the movie into 6, pre-compose them all, align them all  and renders all the videos with predefined h264 settings. So .... my question now is.. how can I modify my script and set it to send all the pre-composed, resized, aligned, new comps to Adobe Media Encoder and use a predefined h264 render setting? I couldn't find anywhere more info about the scripting bridge between AE and Media Encoder.

Cheers,

Marin

PS: I know that we can use Final Cut Pro or Motion to get more resolution from the h264.. but it's kind of workflow that I used to work.. everything happens in one application.. and no annoying hundred times save as, render as etc

TOPICS
Scripting
9.0K
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

correct answers 1 Correct answer

Enthusiast , Oct 15, 2014 Oct 15, 2014

Hi Marin,

It's true that it's a pain to handle the encoding of h.264 outside of AE.  You can write a script that calls the app.executeCommand() function and passes in the code that invokes the "Add to Adobe Media Encoder Queue..." found under AE's Composition menu.  The correct, numerical, code for that command is 3800.  So you would just iterate through the comps you wanted and then open them in the main viewer using the .openInView() method which brings them into focus so-to-speak.  Once it's o

...
Translate
Enthusiast ,
Oct 15, 2014 Oct 15, 2014

Hi Marin,

It's true that it's a pain to handle the encoding of h.264 outside of AE.  You can write a script that calls the app.executeCommand() function and passes in the code that invokes the "Add to Adobe Media Encoder Queue..." found under AE's Composition menu.  The correct, numerical, code for that command is 3800.  So you would just iterate through the comps you wanted and then open them in the main viewer using the .openInView() method which brings them into focus so-to-speak.  Once it's open you can then send the comp to AME with app.executeCommand(3800).  On the AME side, you would have to make a default template for the render output settings you would want.  When your script adds a comp to the AME queue it will take those settings. 

Now, you could do all that, but have you seen AEmpeg that aescripts posted yesterday?  It allows you to render to 100s of codecs using ffmpeg right from AE.  While it costs some money, at least it will open up the door to a streamlined workflow and a variety of codecs that you might need.

--Arie

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
New Here ,
Oct 15, 2014 Oct 15, 2014

Hey Arie!

Thanks for the info! I don't why but I couldn't find before the app.executeCommand calling AME in the scripting guide (probably bad searching methods). I'm gonna test it tonight!

Btw I just bought the AEmpeg script and it looks very promising.

Thank you once again for taking the time to write and explain all the stuff!

Cheers,

Marin

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
New Here ,
Feb 02, 2015 Feb 02, 2015

Hi Marin !
i would like to know how you did it. I really need exactly same thing.. rendering to MP4 using after effects script
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
New Here ,
Jan 11, 2017 Jan 11, 2017

You don't happen to have a sample of the script you are using, not an expert at AE scripting however do understand programming very well.

I just got an assignment from a customer that renders AE projects via scripting but in AE 2015, upgrading to AE CC 2017 and there is no MP4 support which they need.

However what I can see they run a PowerShell script that in summary does the following:

-------------------------------------------------------------------------------------------------------------------------------------------------------

# Paths to executables

$fxexec = 'C:\Program Files\Adobe\Adobe After Effects CC 2017\Support Files\afterfx'

$aerexec = 'C:\Program Files\Adobe\Adobe After Effects CC 2017\Support Files\aerender'

# Other great paths

$scriptPath = Join-Path $jobBasePath "jobassetsreplacementscript.jsx"

$jobFilePath =  Join-Path $jobBasePath "job.aep"

$outputPath = Join-Path $jobBasePath "renders\$jobType"

$logFilePath = Join-Path $jobBasePath "log.txt"

&$fxexec -noui -r $scriptPath

&$aerexec -project $jobFilePath -output $outputPath -comp Template -OMtemplate preview -log $logFilePath -mp

This code works in AE CC 2017 but the Output Module Template does not support H.264 (MP4) output.

How or where does this has to be changed to us AME to render the output in MP4, or can I use the AEmpeg script suggested above to render MP4 and can I do it as above through scripting?

Would really appreciate any help to make this 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
Contributor ,
Jan 11, 2017 Jan 11, 2017

we use ES to save our AEP file to a Media Encoder watch folder, which automatically kicks off the render.

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
New Here ,
Jan 12, 2017 Jan 12, 2017

What is ES?

However found a workaround, we render with Quicktime output with H.264 codec and then just rename the extension. It works but still interested if this can be done so other codecs can be used in the future with AME.

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
Contributor ,
Jan 12, 2017 Jan 12, 2017

ES = ExtendScript.

app.project.save(new File(outputFileNameInMediaEncoderWatchFolder));

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
Community Expert ,
Jan 13, 2017 Jan 13, 2017
LATEST

With the new CC 2017, you can also use scripting to queue your render queue items from Ae in Adobe Media Encoder:

After Effects CC 2017 (14.0) New Scripting Functionality

However, this always uses the last used encoding present and you cannot choose any other presets with from within the script.

As far as I know, the most recent version of Adobe Media Encoder also supports CEP panels now. Maybe your Ae scripts could talk to such a panel and then the panel sets the desired encoding preset and starts the render. But I haven't tried this, yet, and don't know whether it is really feasible.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
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