Command-line parameters

A command-line parameter is a value handed to your Unreal application at the moment it starts. Your application decides what any of them mean, so what you can do with them is up to your own code:

The simplest way to send them is the one below, and for most applications it is the only one needed.

The two places a parameter can come from

One is fixed per configuration. The other changes per visitor.

Parameters To Pass To App. In the Control Panel, open the configuration attached to your stream link and go to the Developer tab. The field named Parameters To Pass To App holds a command line that every visitor to that link receives. Use it for anything that is true of the application always.

The Developer tab of the CmdLineDemo configuration, with Parameters To Pass To App holding -boothno=12 -green and Append Parameters To URL switched on
The Developer tab of the CmdLineDemo configuration. Parameters To Pass To App holds -boothno=12 -green, and Append Parameters To URL — the switch that decides append or replace — is on.

That is the whole of it. Every visitor to that link starts the application with those parameters, and nothing else has to be set up.

The stream link. The other place is the link itself: add ?exeLaunchArgs= to the end of the stream link, and the parameters after it apply to that visit only. That is covered on parameters in a link. ?commandLineArgs= is the same thing under a second name. Links made with the older name appParameters keep working.

▶ Watch this part in the video (0:59)

Useful parameters Unreal understands by itself

No code needed. Each one checked in the Unreal Engine 5.7 source.

Most parameters mean whatever your own code decides. The ones below are different: Unreal Engine reads them itself, so they work in any application without a line of code. Put them in Launch options (Parameters To Pass To App on older panels) on the configuration's Developer tab, separated by spaces, and the next session starts with them.

ParameterWhat it doesUse it whenSide effect
-handleensurepercent=0 Unreal stops reporting failed ensure checks A Development build freezes at start and no picture ever arrives Failed ensures are no longer reported
-RenderOffScreen The app renders without a window Viewers with large screens should get more than 1920×1080 Code of yours that depends on the window may behave differently
-dx11 Starts with DirectX 11 The app crashes or shows black with DirectX 12 No Nanite, no hardware ray tracing
-dx12 Starts with DirectX 12 The project defaults to DirectX 11 but needs DirectX 12 features Needs DirectX 12 shaders in the package
-PixelStreamingWebRTCFps=30 Streams 30 frames per second instead of 60 Viewers are on slow or mobile connections Movement looks less smooth
-PixelStreamingWebRTCDisableTransmitAudio No sound is sent to viewers Viewers should not hear the app Viewers hear nothing at all

-handleensurepercent=0 — Development builds that freeze at start

In a Development build, when an ensure check fails, Unreal pauses the app to write a crash report with a memory dump. Usually that takes half a second. Now and then the dump never finishes, and the app hangs before the stream starts: the process is alive, the viewer gets no picture. -handleensurepercent=0 tells Unreal to handle 0 percent of failed ensures, so no report and no dump is made, and nothing can hang.

-RenderOffScreen — larger than 1920×1080

Normally the app draws into a window, and a window cannot be larger than the machine's desktop, so the stream stops at 1920×1080 however large the viewer's screen is. With -RenderOffScreen there is no window: the app draws into memory, and the picture can be the size the viewer's browser asks for. Measured on Eagle 3D Streaming machines: 2560×1440, 3840×2160 and a phone's 1170×2532 were all delivered at full size; without the parameter every one stopped at 1920×1080.

-dx11 — start with DirectX 11

Unreal Engine 5 apps start with DirectX 12 unless the project says otherwise. -dx11 starts the app with DirectX 11 instead (-d3d11 is the same switch).

-dx12 — start with DirectX 12

The opposite switch (-d3d12 is the same). It matters only for a project whose default graphics API is DirectX 11 — older and Unreal Engine 4 projects, mostly.

-PixelStreamingWebRTCFps=30 — stream 30 frames a second

Pixel Streaming sends 60 frames per second unless told otherwise. -PixelStreamingWebRTCFps=30 sends 30. Any whole number works; 30 is the common choice. Works with both Pixel Streaming plugins.

-PixelStreamingWebRTCDisableTransmitAudio — no sound to viewers

The app's sound is not sent to the browser. The app still plays it on the streaming machine, where nobody hears it.

Parameters Eagle 3D Streaming already sets

These are added to every launch, after yours. Adding them again changes nothing, or fights a setting in the Control Panel — use the setting.

ParameterSet byTo change it
-AudioMixer, -AllowPixelStreamingCommands, -Windowed, -ForceRes, -log, -Unattended, -PixelStreamingURL= Eagle 3D Streaming, every launchNot needed
-ResX=, -ResY= The Resolution settingChange Resolution on the configuration
-PixelStreamingEncoderCodec= The Codec settingChange Codec on the Developer tab
-PixelStreamingWebRTCMaxBitrate= The Maximum Bitrate settingChange Maximum Bitrate on the Developer tab
-PixelStreamingEncoderMinQP=, -PixelStreamingEncoderMaxQP= The Video Quality settingChange Video Quality

Well-known flags that are not on this page, and why

Watch it in 1:19

Command-line parameters - the two places a value can come fromVideo · 1:19

Related

Last updated