3 Replies Latest reply on Nov 20, 2017 11:38 AM by Tim Kurkoski

    Does Media Encoder support the rendition of compositions that read data from JSON-files?

    jeroens59616373 Level 1

      Testing the AE CC 2018 release. So I added some text to the stage and loaded a JSON file into my project. After I created an expression that would read a value from the JSON datasource, AE correctly showed that value in the text placeholder. So far so good, but if I render the project in AME (2018 of course) it just shows 'Text' and not the value from the JSON file. Rendering in AE itself did work as expected. Am I missing something here?

        • 1. Re: Does Media Encoder support the rendition of compositions that read data from JSON-files?
          jeroens59616373 Level 1

          OK, solved it myself. You have to add the JSON file as a layer (and then hide it). Now rendering works in both AE and AME

          2 people found this helpful
          • 2. Re: Does Media Encoder support the rendition of compositions that read data from JSON-files?
            adamc82922445

            Thanks for posting your solution. I was experiencing basically the same issue when trying to use aerender.exe from the command line. Adding the JSON file to the comp then hiding it solved the issue in my case as well!!

            • 3. Re: Does Media Encoder support the rendition of compositions that read data from JSON-files?
              Tim Kurkoski Adobe Employee

              Yes, for certain situations (see list below) you need to add the JSON file to the composition. You don't need to hide it (turn off the layer visibility eyeball), as it doesn't have video or audio properties, and won't affect the render. But neither would it hurt anything to do that if you want.

               

              The affected commands include: Add to Adobe Media Encoder Queue, Export Motion Graphics Template, Reduce Project, Remove Unused Footage, Collect Files with "Collect source files" set to anything but "All"

               

              Here's what's going on behind the scenes:

               

              The expression methods that reference JSON files, sourceData and sourceText, are footage attributes (ex, footage("sample.json").sourceData). They refer to the footage object in the project file, and therefore rely on the JSON file being imported into the project. The JSON file isn't required to be in the comp for the expressions to work, as it's not referenced there, only in the project.

               

              The problem comes in when you use the commands listed above: After Effects walks the dependency list for the given composition to find all dependent files in the project, but it doesn't yet know how to inspect for dependencies in expressions. It therefore misses the dependency of the sourceData and sourceText attributes.

               

              This problem isn't limited to the sourceData and sourceText attributes, either. Any expression that refers to attributes of footage that aren't added to the composition could have the same issue when you use the above commands.

               

              The difficulty here is that inspecting expressions for dependencies can be very slow. After Effects would have to check every property in a comp for expressions, and then check every line of any expression for footage references. What is needed is a better way of scanning expressions for file dependencies that is fast; we hope to work on that in the future.

               

              Until we can provide an automated solution, the workaround is to add the JSON file to the composition.