Use vulkan encode by default even on NVIDIA
This commit is contained in:
@@ -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.
|
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`
|
### `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
|
Identifier of the encoder, one of
|
||||||
* `x264`: software encoding
|
* `x264`: software encoding
|
||||||
* `nvenc`: Nvidia hardware encoding
|
* `nvenc`: Nvidia hardware encoding
|
||||||
* `vaapi`: AMD/Intel 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`
|
### `codec`
|
||||||
Default value: best supported by both headset and encoder of `av1`, `h264`, `h265`.
|
Default value: best supported by both headset and encoder of `av1`, `h264`, `h265`.
|
||||||
|
|||||||
@@ -223,17 +223,6 @@ public:
|
|||||||
if (config.codec == video_codec::raw or config.name == encoder_raw)
|
if (config.codec == video_codec::raw or config.name == encoder_raw)
|
||||||
return {encoder_raw, video_codec::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 WIVRN_USE_VULKAN_ENCODE
|
||||||
if (config.name.empty() or config.name == encoder_vulkan)
|
if (config.name.empty() or config.name == encoder_vulkan)
|
||||||
{
|
{
|
||||||
@@ -245,6 +234,17 @@ public:
|
|||||||
}
|
}
|
||||||
#endif
|
#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 WIVRN_USE_VAAPI
|
||||||
if (config.name.empty() or config.name == encoder_vaapi)
|
if (config.name.empty() or config.name == encoder_vaapi)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user