Skip to main content
Nathan Lovell_52
Inspiring
August 14, 2021
Answered

After Effects/Premiere Plugin Renders Black in Media Encoder

  • August 14, 2021
  • 1 reply
  • 947 views

I have a custom LUT plugin that uses Smart FX to render in AE, and normal Render() in PR. When rendering directly out of AE and PR, it works great! But as soon as I send it to Media Encoder, it only renders out black, with the audio. Any ideas of why this might be happening? 

 

Here are my Global Out Flags:

out_data->out_flags =  PF_OutFlag_DEEP_COLOR_AWARE |
		PF_OutFlag_WIDE_TIME_INPUT;

out_data->out_flags2 = PF_OutFlag2_FLOAT_COLOR_AWARE |
		PF_OutFlag2_SUPPORTS_SMART_RENDER;

 

Any other information, I'm happy to provide!

This topic has been closed for replies.
Correct answer James Whiffin

That actually might be on the right path! I have noticed if the plugin caches some frames from me scrubbing through the time, those get rendered ok, the rest are black. 

 

I'm not sure if I am caching the resources. How can I do that? Additionally, is caching the frames myself possible to solve this issue?


Caching would be storing the resources in sequence or global data once (or as few times as needed) and then accessing them from there. 

 

I imagine AE's utility->Apply Color Lut plugin would read the lut from disk once when the user first applies the plugin, and would then cache it inside sequence data so it does not need to be read from disk each time. Sequence data is saved inside the ae project so it doesn't matter if the composition is loaded on another machine. That's just my speculation.

1 reply

James Whiffin
Legend
August 17, 2021

I haven't encountered this specific issue before so I'm just thinking of any/all possible causes. Do you have any external file dependencies such as the lut itself? 

 

A way to debug further could be as soon as you enter the render function, copy the input to the output buffer and return. If that is still black, then you've narrowed down where the problem occurs. 

Nathan Lovell_52
Inspiring
August 18, 2021

@James Whiffin I'm fairly certain it has to do with the LUT process! And yes, actually I do use some additional files as part of the lut file reading and math process! Specifically: 

#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
#include <sstream>
using namespace std;

Additionally, in my Visual Studio setup, I changed Configuration Properties -> C/C++ -> Code Generation -> Runtime Library. It was set at "Multi-threaded DLL (/MD)", and I changed it "Multi-threaded (/MT)", which resolved other issues these dependencies were causing.

 

Perhaps there's another setting in the build settings that can help with this?

James Whiffin
Legend
August 19, 2021

Do you cache the resources? If so I would try loading them per render request, just to see if the caching is the cause. I'm not too cluey on whether or not those render settings could cause the issue, hopefully someone more knowledgeable can give you an answer.