Use vulkan encode by default even on NVIDIA

This commit is contained in:
Patrick Nicolas
2026-09-14 21:19:49 +02:00
parent a5837b47c7
commit 8eff464261
2 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -24,13 +24,13 @@ 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.
### `encoder`
Default value: `nvenc` if Nvidia GPU and compiled with nvenc, `vaapi` for all other GPU when compiled with ffmpeg, else `x264`.
Default value: `vulkan` if supported, `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 encoding
* `nvenc`: Nvidia hardware encoding
* `vaapi`: AMD/Intel hardware encoding
* `vulkan`: experimental, for any GPU that supports vulkan video encode
* `vulkan`: for any GPU that supports vulkan video encode
### `codec`
Default value: best supported by both headset and encoder of `av1`, `h264`, `h265`.
+11 -11
View File
@@ -223,17 +223,6 @@ public:
if (config.codec == video_codec::raw or config.name == encoder_raw)
return {encoder_raw, video_codec::raw};
#if WIVRN_USE_NVENC
if ((nvidia and config.name.empty()) or config.name == encoder_nvenc)
{
for (auto codec: config.codec ? std::vector{*config.codec} : info.supported_codecs)
{
if (check_nvenc(codec))
return {encoder_nvenc, codec};
}
}
#endif
#if WIVRN_USE_VULKAN_ENCODE
if (config.name.empty() or config.name == encoder_vulkan)
{
@@ -245,6 +234,17 @@ public:
}
#endif
#if WIVRN_USE_NVENC
if ((nvidia and config.name.empty()) or config.name == encoder_nvenc)
{
for (auto codec: config.codec ? std::vector{*config.codec} : info.supported_codecs)
{
if (check_nvenc(codec))
return {encoder_nvenc, codec};
}
}
#endif
#if WIVRN_USE_VAAPI
if (config.name.empty() or config.name == encoder_vaapi)
{