When rendering with MRQ with the Command Line Encoder active, we occasionally encounter issues where MRQ does not finish so the editor just sits there with the MRQ preview window open. The video is encoded successfully and plays fine. It seems as if UE doesn’t receive a signal that the encoding is done so it just waits forever. This is especially hurting us as we set up remote rendering where we launch the render through the editor with ExecutePythonScript. The video will encode successfully, but the editor will just stay waiting for something, so we have to go in and kill the job.
The last lines we see in the log before aborting the job are:
[2025.05.16-17.49.27:014][332]LogAudioMixer: Error: Command Queue 1 has grown to 1041kb, containing 6915 cmds, last complete pump was 79.68076 seconds ago.
[2025.05.16-17.49.27:014][332]LogAudioMixer: Warning: Stall in AudioRenderThread Phase: ‘Finished’
I believe the AudioMix log is a red herring. Would you be able to share the full log of the render?
Yesterday you also raised a question and then solution by using bKeepPythonScriptAlive, If you were to launch your render via command line, but not by python do you still run into the issue?
I have attached the log. The line on 5346 is where we killed the job.
Unfortunately, we cannot use the CLI render because we need the Editor. We have a custom executor based off the PIEExecutor that modifies and loads datalayers before the render. But we also experience this issue interactively in the editor when a user renders manually. It doesn’t happen all the time. It seems to happen more often with longer sequences after the encode.
The call to bKeepPythonScriptAlive is set to False in the function added to
executor.on_executor_finished_delegateSo that delegate is not getting called.
But since it happens interactively in the editor, I don’t think it’s related to the Python setup.
Yeah, the log doesn’t have much inside of it that is much help. We have had issues in the past that have been addressed by upgrading the FFmpeg encoder: https://www.ffmpeg.org/download.html. I’d like to try that. I am discussing your case with the dev team, but we likely won’t have more potential answers until Monday.
Okay, so setting that to false later does help it quit. We did a write-up on setting up a render farm for MRQ; there might be a nugget in there that helps out. I would be curious to know what the differences between this and your approach are.
-execcmds="py CustomRenderBootstrap.py" while I launch with
-ExecutePythonScript=Both add a callable to the on_executor_finished_delegate
custom_executor.on_executor_finished_delegate.add_callable_unique(on_custom_executor_finished)In his executor finished callback, he calls
unreal.SystemLibrary.quit_editor()while I call
unreal.EditorPythonScripting.set_keep_python_script_alive(False)However, it doesn’t look like he runs an encode at the end with ffmpeg. Although it’s impossible to tell with the information provided on that page.
You can you try dropping a breakpoint into UMoviePipelineCommandLineEncoder::HasFinishedExportingImpl. This might help understand why active jobs isn’t being set to 0.