mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 06:17:14 -04:00
Fixes for nvenc support marked as experimental, since more testing should be done on options
This commit is contained in:
parent
3f5277e67e
commit
ffd3101ac6
@ -292,9 +292,9 @@ namespace MediaBrowser.Api.Playback
|
|||||||
return "h264_qsv";
|
return "h264_qsv";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(ApiEntryPoint.Instance.GetEncodingOptions().HardwareAccelerationType, "libnvenc", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(ApiEntryPoint.Instance.GetEncodingOptions().HardwareAccelerationType, "nvenc", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return "libnvenc";
|
return "h264_nvenc";
|
||||||
}
|
}
|
||||||
if (string.Equals(ApiEntryPoint.Instance.GetEncodingOptions().HardwareAccelerationType, "h264_omx", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(ApiEntryPoint.Instance.GetEncodingOptions().HardwareAccelerationType, "h264_omx", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
@ -338,8 +338,8 @@ namespace MediaBrowser.Api.Playback
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// h264 (libnvenc)
|
// h264 (h264_nvenc)
|
||||||
else if (string.Equals(videoCodec, "libnvenc", StringComparison.OrdinalIgnoreCase))
|
else if (string.Equals(videoCodec, "h264_nvenc", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
param = "-preset high-performance";
|
param = "-preset high-performance";
|
||||||
}
|
}
|
||||||
@ -412,9 +412,9 @@ namespace MediaBrowser.Api.Playback
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(state.VideoRequest.Level))
|
if (!string.IsNullOrEmpty(state.VideoRequest.Level))
|
||||||
{
|
{
|
||||||
// h264_qsv and libnvenc expect levels to be expressed as a decimal. libx264 supports decimal and non-decimal format
|
// h264_qsv and h264_nvenc expect levels to be expressed as a decimal. libx264 supports decimal and non-decimal format
|
||||||
if (string.Equals(videoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase) ||
|
if (string.Equals(videoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase) ||
|
||||||
string.Equals(videoCodec, "libnvenc", StringComparison.OrdinalIgnoreCase))
|
string.Equals(videoCodec, "h264_nvenc", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
switch (state.VideoRequest.Level)
|
switch (state.VideoRequest.Level)
|
||||||
{
|
{
|
||||||
@ -458,7 +458,7 @@ namespace MediaBrowser.Api.Playback
|
|||||||
|
|
||||||
if (!string.Equals(videoCodec, "h264_omx", StringComparison.OrdinalIgnoreCase) &&
|
if (!string.Equals(videoCodec, "h264_omx", StringComparison.OrdinalIgnoreCase) &&
|
||||||
!string.Equals(videoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase) &&
|
!string.Equals(videoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase) &&
|
||||||
!string.Equals(videoCodec, "libnvenc", StringComparison.OrdinalIgnoreCase))
|
!string.Equals(videoCodec, "h264_nvenc", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
param = "-pix_fmt yuv420p " + param;
|
param = "-pix_fmt yuv420p " + param;
|
||||||
}
|
}
|
||||||
|
@ -607,10 +607,10 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// h264 (libnvenc)
|
// h264 (h264_nvenc)
|
||||||
else if (string.Equals(videoCodec, "libnvenc", StringComparison.OrdinalIgnoreCase))
|
else if (string.Equals(videoCodec, "h264_nvenc", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
param = "-preset high-performance";
|
param = "-preset llhq";
|
||||||
}
|
}
|
||||||
|
|
||||||
// webm
|
// webm
|
||||||
@ -683,9 +683,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(levelString))
|
if (!string.IsNullOrEmpty(levelString))
|
||||||
{
|
{
|
||||||
// h264_qsv and libnvenc expect levels to be expressed as a decimal. libx264 supports decimal and non-decimal format
|
// h264_qsv and h264_nvenc expect levels to be expressed as a decimal. libx264 supports decimal and non-decimal format
|
||||||
if (string.Equals(videoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase) ||
|
if (string.Equals(videoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase) ||
|
||||||
string.Equals(videoCodec, "libnvenc", StringComparison.OrdinalIgnoreCase))
|
string.Equals(videoCodec, "h264_nvenc", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
switch (levelString)
|
switch (levelString)
|
||||||
{
|
{
|
||||||
@ -729,7 +729,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
|
|
||||||
if (!string.Equals(videoCodec, "h264_omx", StringComparison.OrdinalIgnoreCase) &&
|
if (!string.Equals(videoCodec, "h264_omx", StringComparison.OrdinalIgnoreCase) &&
|
||||||
!string.Equals(videoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase) &&
|
!string.Equals(videoCodec, "h264_qsv", StringComparison.OrdinalIgnoreCase) &&
|
||||||
!string.Equals(videoCodec, "libnvenc", StringComparison.OrdinalIgnoreCase))
|
!string.Equals(videoCodec, "h264_nvenc", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
param = "-pix_fmt yuv420p " + param;
|
param = "-pix_fmt yuv420p " + param;
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
"libopus",
|
"libopus",
|
||||||
//"libvorbis",
|
//"libvorbis",
|
||||||
"srt",
|
"srt",
|
||||||
"libnvenc",
|
"h264_nvenc",
|
||||||
"h264_qsv"
|
"h264_qsv"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -562,9 +562,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
return "h264_qsv";
|
return "h264_qsv";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(options.HardwareAccelerationType, "libnvenc", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(options.HardwareAccelerationType, "nvenc", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return "libnvenc";
|
return "h264_nvenc";
|
||||||
}
|
}
|
||||||
if (string.Equals(options.HardwareAccelerationType, "h264_omx", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(options.HardwareAccelerationType, "h264_omx", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user