5.0 KiB
Configurable items
Configuration is done on server side. Files are read from
/usr/share/wivrn/config.json(where/usris selected at configure time withCMAKE_INSTALL_PREFIX)/etc/wivrn/config.json$XDG_CONFIG_HOME/wivrn/config.jsonor if$XDG_CONFIG_HOMEis not set,$HOME/.config/wivrn/config.json.
Files later in the list replace top-level values from previous ones.
If you installed WiVRn from a flatpack, the config is in $HOME/.var/app/io.github.wivrn.wivrn/config/wivrn/config.json.
All elements are optional and have default values.
bit-depth
Default value: 8 (bits)
Bit depth of the video. 8-bit is supported by all encoders. 10-bit is supported by vaapi and nvenc encoders using h265 or av1.
encoder
The encoder to use, either a single string or object applied to all streams, or a list of string or objects with values for left, right and alpha.
When a string it is used, it is equivalent to the encoder item of the object.
WiVRn encodes each eye separately, and the alpha channel as one for both eyes. Each stream is processed independently, this may use resources more effectively and reduce latency. All the provided encoders are put into groups, groups are executed concurrently and items within a group are processed sequentially.
encoder
Default value: nvenc if Nvidia GPU and compiled with nvenc, vaapi for all other GPU when compiled with ffmpeg, else x264.
Identifier of the encoder, one of
x264: software encodingnvenc: Nvidia hardware encodingvaapi: AMD/Intel hardware encodingvulkan: experimental, for any GPU that supports vulkan video encode
codec
Default value: best supported by both headset and encoder of av1, h264, h265.
One of h264, h265, av1, raw.
Not all encoders support every codec:
x264encoder only supportsh264codecvulkanencoder supportsh264andh265codecsrawencoder only supportsrawcodecnvencandvaapisupport all codecs, exceptraw
If nvenc encoder is in use, you can refer to nvidia website to make sure that your GPU supports encoding with the desired codec.
group (advanced)
Default value: One value for each encoder type (nvenc, vaapi, vulkan, x264).
Identifier (number) of the encoder group. Encoders with the same identifier are executed sequentially, in the order they are defined in the configuration. Encoders with different identifiers are executed concurrently. Default setting will have all encoders of a given type execute sequentially, and different types in parallel.
Examples
- Simple configuration
{
"encoder": {
"encoder": "vaapi",
"codec": "h265"
}
}
Use vaapi hardware encoding, h265 video codec (HEVC).
- Hardware + software encoder
{
"encoder": [
{
"encoder": "vaapi",
"codec": "h265",
},
{
"encoder": "x264",
"codec": "h264",
},
{
"encoder": "vaapi",
"codec": "h265",
},
]
}
Creates a hardware encoder for left eye and transparency, and a software encoder for right eye.
device, only for vaapi
Default value: unset
Manually specify the device for encoding, can be used to offload encode to an iGPU. Device shall be in the form "/dev/dri/renderD128".
options (very advanced), only for vaapi
Default value: unset
Json object of additional options to pass directly to ffmpeg avcodec_open2's option parameter.
application
Default value: unset
An application to start when connection with the headset is established, can be a string or an array of strings if parameters need to be provided.
Example
{
"application": ["steam", "steam://launch/275850/VR"]
}
Launch No Man's Sky in VR mode on Steam when connection with headset is established.
tcp-only
Default value: false
Only use TCP for communications with the client, this may have increased latency.
If false or unset, WiVRn will use both TCP and UDP.
Example
{
"tcp-only": true
}
publish-service
Default value: avahi
How to publish the service over the network, avahi or null.
If set to null, service will not be published and address has to be entered manually on the headset.
openvr-compat-path
Default value: unset
Provides the path to the directory of an OpenVR compatibility tool (such as OpenComposite).
If unset, WiVRn will autodetect the path of such a tool as usual (see the SteamVR guide).
If set to an null, WiVRn will not manage the OpenVR configuration.
hid-forwarding
Default value: false
Only available when the uinput kernel module is loaded and the user has write access.
Enables the forwarding of keyboard and mouse input from the client to the server.
debug-gui
Default value: false
Only available when built with WIVRN_FEATURE_DEBUG_GUI.
Enables the Monado debug gui.
use-steamvr-lh
Default value: false
Only available when built with WIVRN_FEATURE_STEAMVR_LIGHTHOUSE
Enables the driver to load SteamVR Lighthouse devices.