Running an instance of Unreal Engine from the command line enables just the render window to open remotely without any instance of the editor being opened, this saves on the resources used when opening Unreal Editor and can help to gain some much needed (V)RAM when rendering very high resolutions.
Use a command such as this in windows powershell to execute a Render Job saved from the Movie Render Queue:
"C:\Program Files\Epic Games\UE_5.6\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" D:\UEProjects\MRQCommandLine\MRQCommandLine.uproject
Minimal_Default1 -game -MoviePipelineConfig="/Game/Cinematics/myRenderQueue" -windowed -Log -StdOut -allowStdOutLogVerbosity -Unattended
Here is a breakdown of what each part of this command means and how to customize it for a render:
"path\to\your\UE5.0installation\Engine\Binaries\Win64\UnrealEditor-Cmd.exe": The first entry in the command line defines where the installation of the Unreal Engine is on the rendering computer.
Note: The reason this is in quotes (") is that Windows does not handle the space in the Program Files path elegantly. Any path with a space will need to be encapsulated in quotes so Windows does not interpret it as a parameter we are passing in.
\path\to\your\project\project.uproject: Next, we pass the path to the uproject to work with so it knows what to load. Notice the backslashes ("\") as I am working with Windows. Other operating systems may need a forward slash ("/").
Map_To_Load: defines the Map to load when loading the project.
Here is a list of the parameters:
-windowed: Sets the game to run in windowed mode. The alternative to this would be fullscreen. Usually, on the render machine, we do not want to take over the entire display.
-game: Launches the editor using uncooked content, allowing us to generate the render with the Editor's content
-log: When used as a switch (-log), opens a separate window to display the contents of the log in real-time. When used as a setting (LOG=filename.log), tells the engine to use the log filename of the string that immediately follows. If working in an environment where capturing the log to a file path, this is where that is defined.
-StdOut: Giving the parameter following Log tells the command to output the log details to StdOut, a buffer that many rendering systems consume and capture details of the job. This helps customize job validation in the render manager of your choice.
-allowStdOutLogVerbosity: this parameter enables the StdOut log to be verbose and give more details.
-Unattended: informs Unreal Engine that it is being run from the command line and there is no active user. It is possible to hook into this mode with your blueprints using the isUnattended node.
-MoviePipelineConfig="/Game/path/to/the/myRenderQueue": The MoviePipelineConfig parameter informs the rendering system to operate on the specific Movie Pipeline Queue, saved from the Movie Render Queue. This path points to the name of the Movie Render Queue; in the example below, it is /Game/Cinematics/myRenderQueue.
Now that there is a Movie Pipeline Queue asset, we can test render our job. Since we are using the default render settings in Movie Render Queue, the output location is simply in the Saved directory in the project.
After running the command in the Windows command shell, a new instance of Unreal Engine will open, and barring any typos in naming things, the render queue will be executed.