Skip to main content
Known Participant
June 13, 2023
Question

Media Encoder not calculating values from After Effects media

  • June 13, 2023
  • 1 reply
  • 189 views

I'm pretty sure this is a bug, but posting as a discussion to see if maybe I'm just missing something.

Here's my setup.  I have a bunch of my girls' softball games recorded and wanted to add some graphics (scoreboard, scorebug, match graphics, etc.).  I worked up some compositions in AE that draw game data from JSX files.  I have two JSX files - one with functions I use to format the data for AE, and the other with the game data itself.  Each game gets its own gameData.jsx file, but all games share a scoreboardMethods.jsx file.

 

It all looks at works great in AE and in Premiere when I import it, and if I export it directly in Premiere, the export looks perfect.  When I send it over to Media Encoder, however, the AE layers that get values from scoreboardMethods.jsx revert to their default values.  This ONLY happens in Media Encoder, and I don't get it.

 

Here's an example.  I have a matchup composition that I insert at the beginning of the game.  This is how it shows in AE:

There are 5 calculated layers on this screen - date, visitor, home, tournament, and location.  All but the date layer pull values directly from gameData.jsx.  Here's the expression javascript for the home team layer, as an example:

var gameDataName = "gameData.jsx"; //Keeps AE from renaming when replacing placeholder
var methods = footage("scoreboardMethods.jsx").sourceData;
var data = footage(gameDataName).sourceData;

data.homeTeam.name;

The date field has to go through some additional formatting, so I run it through a function in scoreboardMethods.jsx, first:

var gameDataName = "gameData.jsx"; //Keeps AE from renaming when replacing placeholder
var methods = footage("scoreboardMethods.jsx").sourceData;
var data = footage(gameDataName).sourceData;

var dt = new Date(data.dateTime);
methods.date_TitleFormat(dt);

And everything works!  It looks fine.  It continues to look fine when I pull it into Premiere:

And if I export it within Premiere, the export turns out great.  However, if I send it to Media Encoder, all the AE layers that pull values from scoreboardMethods.jsx (but NOT those that pull data directly from gameData.jsx) revert to their default values - basically ignoring the expression.  See the difference in the date field here:

I've verified that it's the layers pulling values from scoreboardMethods.jsx by creating a dummy method that just appends some random text and setting some of the other layers to use that function.  Same result - the function fails and the layer falls back to it's default value.

 

This is really annoying.  I know its related to scoreboardMethods.jsx, but everything (INCLUDING exporting) works fine in AE and Premiere Pro - so I don't think it's a problem with my code.  Not being able to send these through Media Encoder would be a real pain because each game is probably 3-ish hours of encoding.

 

Any thoughts?

This topic has been closed for replies.

1 reply

Known Participant
June 14, 2023

So I ended up purchasing a plugin to bake in the expressions in my compositions.  Not free, but seems to work well: Easy Bake (I am not affiliated with them in any way).

 

Bit miffed having to pay to keep Media Encoder from screwing up my project, but it is what it is.  Since my composition has literally hundreds of expressions (unavoidable with my goal of keeping all game data in an external jsx file), manually converting all to keyframes for each game would be a nightmare.

 

Not really a solution, but allows me to continue to use Media Encoder in my workflow.