Compare commits

...

6 commits

Author SHA1 Message Date
knackebrot 36f46dd79b
Merge 1b65c01928 into e2a22cec0e 2024-05-04 13:06:58 -04:00
Nyanmisaka e2a22cec0e Translated using Weblate (Chinese (Simplified))
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hans/
2024-05-04 13:06:46 -04:00
queeup 067962ae2a Translated using Weblate (Turkish)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/tr/
2024-05-04 13:06:46 -04:00
Szilágyi Kristóf 8a65d239b7 Translated using Weblate (Hungarian)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/hu/
2024-05-04 13:06:46 -04:00
HiPotionQ8 518404cd1d Translated using Weblate (Arabic)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ar/
2024-05-04 13:06:46 -04:00
knackebrot 1b65c01928 Add advanced options for Intel QSV encoders 2023-04-04 19:30:18 +02:00
6 changed files with 181 additions and 21 deletions

View file

@ -128,5 +128,7 @@
"TaskRefreshTrickplayImages": "توليد صور Trickplay",
"TaskRefreshTrickplayImagesDescription": "يُنشئ معاينات Trickplay لمقاطع الفيديو في المكتبات المُمكّنة.",
"TaskCleanCollectionsAndPlaylists": "حذف المجموعات وقوائم التشغيل",
"TaskCleanCollectionsAndPlaylistsDescription": "حذف عناصر من المجموعات وقوائم التشغيل التي لم تعد موجودة."
"TaskCleanCollectionsAndPlaylistsDescription": "حذف عناصر من المجموعات وقوائم التشغيل التي لم تعد موجودة.",
"TaskAudioNormalization": "تطبيع الصوت",
"TaskAudioNormalizationDescription": "مسح الملفات لتطبيع بيانات الصوت."
}

View file

@ -1,13 +1,13 @@
{
"Albums": "Albumok",
"AppDeviceValues": "Program: {0}, eszköz: {1}",
"AppDeviceValues": "Program: {0}, Eszköz: {1}",
"Application": "Alkalmazás",
"Artists": "Előadók",
"AuthenticationSucceededWithUserName": "{0} sikeresen hitelesítve",
"Books": "Könyvek",
"CameraImageUploadedFrom": "Új kamerakép feltöltve innen: {0}",
"CameraImageUploadedFrom": "Új kamerakép lett feltöltve innen: {0}",
"Channels": "Csatornák",
"ChapterNameValue": "{0}. jelenet",
"ChapterNameValue": "Jelenet {0}",
"Collections": "Gyűjtemények",
"DeviceOfflineWithName": "{0} kijelentkezett",
"DeviceOnlineWithName": "{0} belépett",
@ -15,27 +15,27 @@
"Favorites": "Kedvencek",
"Folders": "Könyvtárak",
"Genres": "Műfajok",
"HeaderAlbumArtists": "Albumelőadók",
"HeaderAlbumArtists": "Album előadók",
"HeaderContinueWatching": "Megtekintés folytatása",
"HeaderFavoriteAlbums": "Kedvenc albumok",
"HeaderFavoriteAlbums": "Kedvenc Albumok",
"HeaderFavoriteArtists": "Kedvenc előadók",
"HeaderFavoriteEpisodes": "Kedvenc epizódok",
"HeaderFavoriteShows": "Kedvenc sorozatok",
"HeaderFavoriteSongs": "Kedvenc számok",
"HeaderFavoriteSongs": "Kedvenc dalok",
"HeaderLiveTV": "Élő TV",
"HeaderNextUp": "Következik",
"HeaderRecordingGroups": "Felvételi csoportok",
"HomeVideos": "Házi videók",
"HomeVideos": "Otthoni videók",
"Inherit": "Örökölt",
"ItemAddedWithName": "{0} hozzáadva a könyvtárhoz",
"ItemRemovedWithName": "{0} eltávolítva a könyvtárból",
"LabelIpAddressValue": "IP-cím: {0}",
"LabelRunningTimeValue": "Lejátszási idő: {0}",
"Latest": "Legújabb",
"MessageApplicationUpdated": "A Jellyfin kiszolgáló frissítve",
"MessageApplicationUpdated": "A Jellyfin kiszolgáló frissítve lett",
"MessageApplicationUpdatedTo": "A Jellyfin kiszolgáló frissítve lett a következőre: {0}",
"MessageNamedServerConfigurationUpdatedWithValue": "A kiszolgálókonfigurációs rész frissítve: {0}",
"MessageServerConfigurationUpdated": "Kiszolgálókonfiguráció frissítve",
"MessageNamedServerConfigurationUpdatedWithValue": "A kiszolgálókonfigurációs rész frissítve lett: {0}",
"MessageServerConfigurationUpdated": "Kiszolgálókonfiguráció frissítve lett",
"MixedContent": "Vegyes tartalom",
"Movies": "Filmek",
"Music": "Zenék",
@ -46,7 +46,7 @@
"NewVersionIsAvailable": "Letölthető a Jellyfin kiszolgáló új verziója.",
"NotificationOptionApplicationUpdateAvailable": "Frissítés érhető el az alkalmazáshoz",
"NotificationOptionApplicationUpdateInstalled": "Alkalmazásfrissítés telepítve",
"NotificationOptionAudioPlayback": "Hanglejátszás elkezdve",
"NotificationOptionAudioPlayback": "Hanglejátszás elkezdődött",
"NotificationOptionAudioPlaybackStopped": "Hanglejátszás leállítva",
"NotificationOptionCameraImageUploaded": "Kamerakép feltöltve",
"NotificationOptionInstallationFailed": "Telepítési hiba",
@ -126,5 +126,9 @@
"External": "Külső",
"HearingImpaired": "Hallássérült",
"TaskRefreshTrickplayImages": "Trickplay képek generálása",
"TaskRefreshTrickplayImagesDescription": "Trickplay előnézetet készít az engedélyezett könyvtárakban lévő videókhoz."
"TaskRefreshTrickplayImagesDescription": "Trickplay előnézetet készít az engedélyezett könyvtárakban lévő videókhoz.",
"TaskAudioNormalization": "Hangerő Normalizáció",
"TaskCleanCollectionsAndPlaylistsDescription": "Nem létező elemek törlése a gyűjteményekből és lejátszási listákról.",
"TaskAudioNormalizationDescription": "Hangerő normalizációs adatok keresése.",
"TaskCleanCollectionsAndPlaylists": "Gyűjtemények és lejátszási listák optimalizálása"
}

View file

@ -128,5 +128,7 @@
"TaskRefreshTrickplayImages": "Trickplay Görselleri Oluştur",
"TaskRefreshTrickplayImagesDescription": "Etkin kütüphanelerdeki videolar için trickplay önizlemeleri oluşturur.",
"TaskCleanCollectionsAndPlaylistsDescription": "Artık var olmayan koleksiyon ve çalma listelerindeki ögeleri kaldırır.",
"TaskCleanCollectionsAndPlaylists": "Koleksiyonları ve çalma listelerini temizleyin"
"TaskCleanCollectionsAndPlaylists": "Koleksiyonları ve çalma listelerini temizleyin",
"TaskAudioNormalizationDescription": "Ses normalleştirme verileri için dosyaları tarar.",
"TaskAudioNormalization": "Ses Normalleştirme"
}

View file

@ -128,5 +128,7 @@
"TaskRefreshTrickplayImages": "生成时间轴缩略图",
"TaskRefreshTrickplayImagesDescription": "为启用的媒体库中的视频生成时间轴缩略图。",
"TaskCleanCollectionsAndPlaylists": "清理合集和播放列表",
"TaskCleanCollectionsAndPlaylistsDescription": "清理合集和播放列表中已不存在的项目。"
"TaskCleanCollectionsAndPlaylistsDescription": "清理合集和播放列表中已不存在的项目。",
"TaskAudioNormalization": "音频标准化",
"TaskAudioNormalizationDescription": "扫描文件以寻找音频标准化数据。"
}

View file

@ -1053,6 +1053,16 @@ namespace MediaBrowser.Controller.MediaEncoding
}
args.Append(GetQsvDeviceArgs(QsvAlias));
if (string.Equals(vidEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase) && options.EnableIntelLookAheadH264)
{
args.Append(" -extra_hw_frames=" + options.IntelLookAheadDepthH264);
}
else if (string.Equals(vidEncoder, "hevc_qsv", StringComparison.OrdinalIgnoreCase) && options.EnableIntelLookAheadHevc)
{
args.Append(" -extra_hw_frames=" + options.IntelLookAheadDepthHevc);
}
var filterDevArgs = GetFilterHwDeviceArgs(QsvAlias);
// child device used by qsv.
if (_mediaEncoder.SupportsHwaccel("vaapi") || _mediaEncoder.SupportsHwaccel("d3d11va"))
@ -1799,7 +1809,61 @@ namespace MediaBrowser.Controller.MediaEncoding
// Only h264_qsv has look_ahead option
if (string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase))
{
param += " -look_ahead 0";
if (encodingOptions.EnableIntelLookAheadH264)
{
param += $" -look_ahead 1 -look_ahead_depth {encodingOptions.IntelLookAheadDepthH264}";
}
else
{
param += " -look_ahead 0";
}
if (encodingOptions.EnableIntelExtBrcH264)
{
param += " -extbrc 1";
}
if (encodingOptions.EnableIntelBPyramidH264)
{
param += " -b_strategy 1";
}
if (encodingOptions.EnableIntelAdaptiveIBFramesH264)
{
param += " -adaptive_i 1 -adaptive_b 1";
}
if (encodingOptions.EnableIntelTrellisH264)
{
param += " -trellis 1";
}
}
else if (string.Equals(videoEncoder, "hevc_qsv", StringComparison.OrdinalIgnoreCase))
{
if (encodingOptions.EnableIntelLookAheadHevc)
{
param += $" -look_ahead_depth {encodingOptions.IntelLookAheadDepthHevc}";
}
if (encodingOptions.EnableIntelExtBrcHevc)
{
param += " -extbrc 1";
}
if (encodingOptions.EnableIntelBPyramidHevc)
{
param += " -b_strategy 1";
}
if (encodingOptions.EnableIntelAdaptiveIBFramesHevc)
{
param += " -adaptive_i 1 -adaptive_b 1";
}
if (encodingOptions.EnableIntelTrellisHevc)
{
param += " -trellis 1";
}
}
}
else if (string.Equals(videoEncoder, "h264_nvenc", StringComparison.OrdinalIgnoreCase) // h264 (h264_nvenc)
@ -4164,7 +4228,7 @@ namespace MediaBrowser.Controller.MediaEncoding
// qsv requires a fixed pool size.
// default to 64 otherwise it will fail on certain iGPU.
subFilters.Add("hwupload=derive_device=qsv:extra_hw_frames=64");
subFilters.Add($"hwupload=derive_device=qsv:extra_hw_frames={GetIntelExtraHwFrames(vidEncoder, options, 64)}");
var (overlayW, overlayH) = GetFixedOutputSize(inW, inH, reqW, reqH, reqMaxW, reqMaxH);
var overlaySize = (overlayW.HasValue && overlayH.HasValue)
@ -4271,7 +4335,7 @@ namespace MediaBrowser.Controller.MediaEncoding
// allocate extra pool sizes for vaapi vpp
if (!string.IsNullOrEmpty(hwScaleFilter) && isVaapiDecoder)
{
hwScaleFilter += ":extra_hw_frames=24";
hwScaleFilter += $":extra_hw_frames={GetIntelExtraHwFrames(vidEncoder, options, 24)}";
}
// hw scale
@ -4347,7 +4411,7 @@ namespace MediaBrowser.Controller.MediaEncoding
// OUTPUT qsv(nv12) surface(vram)
// reverse-mapping via qsv(vaapi)-opencl interop.
// add extra pool size to avoid the 'cannot allocate memory' error on hevc_qsv.
mainFilters.Add("hwmap=derive_device=qsv:reverse=1:extra_hw_frames=16");
mainFilters.Add($"hwmap=derive_device=qsv:reverse=1:extra_hw_frames={GetIntelExtraHwFrames(vidEncoder, options, 16)}");
mainFilters.Add("format=qsv");
}
else if (isVaapiDecoder)
@ -4385,7 +4449,7 @@ namespace MediaBrowser.Controller.MediaEncoding
// qsv requires a fixed pool size.
// default to 64 otherwise it will fail on certain iGPU.
subFilters.Add("hwupload=derive_device=qsv:extra_hw_frames=64");
subFilters.Add($"hwupload=derive_device=qsv:extra_hw_frames={GetIntelExtraHwFrames(vidEncoder, options, 64)}");
var (overlayW, overlayH) = GetFixedOutputSize(inW, inH, reqW, reqH, reqMaxW, reqMaxH);
var overlaySize = (overlayW.HasValue && overlayH.HasValue)
@ -4557,7 +4621,7 @@ namespace MediaBrowser.Controller.MediaEncoding
// allocate extra pool sizes for vaapi vpp
if (!string.IsNullOrEmpty(hwScaleFilter))
{
hwScaleFilter += ":extra_hw_frames=24";
hwScaleFilter += $":extra_hw_frames={GetIntelExtraHwFrames(vidEncoder, options, 24)}";
}
// hw scale
@ -7052,5 +7116,19 @@ namespace MediaBrowser.Controller.MediaEncoding
{
return string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase);
}
public int GetIntelExtraHwFrames(string vidEncoder, EncodingOptions options, int initialExtraHwFrames)
{
if (string.Equals(vidEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase) && options.EnableIntelLookAheadH264)
{
initialExtraHwFrames += options.IntelLookAheadDepthH264;
}
else if (string.Equals(vidEncoder, "hevc_qsv", StringComparison.OrdinalIgnoreCase) && options.EnableIntelLookAheadHevc)
{
initialExtraHwFrames += options.IntelLookAheadDepthHevc;
}
return initialExtraHwFrames;
}
}
}

View file

@ -47,7 +47,19 @@ public class EncodingOptions
EnableEnhancedNvdecDecoder = true;
PreferSystemNativeHwDecoder = true;
EnableIntelLowPowerH264HwEncoder = false;
EnableIntelLookAheadH264 = false;
IntelLookAheadDepthH264 = 60;
EnableIntelExtBrcH264 = false;
EnableIntelBPyramidH264 = false;
EnableIntelAdaptiveIBFramesH264 = false;
EnableIntelTrellisH264 = false;
EnableIntelLowPowerHevcHwEncoder = false;
EnableIntelLookAheadHevc = false;
IntelLookAheadDepthHevc = 60;
EnableIntelExtBrcHevc = false;
EnableIntelBPyramidHevc = false;
EnableIntelAdaptiveIBFramesHevc = false;
EnableIntelTrellisHevc = false;
EnableHardwareEncoding = true;
AllowHevcEncoding = false;
AllowAv1Encoding = false;
@ -241,11 +253,71 @@ public class EncodingOptions
/// </summary>
public bool EnableIntelLowPowerH264HwEncoder { get; set; }
/// <summary>
/// Gets or sets a value indicating whether LookAhead should be used for Intel H264 encoder.
/// </summary>
public bool EnableIntelLookAheadH264 { get; set; }
/// <summary>
/// Gets or sets a value indicating the number of frames that should be used for LookAhead with Intel H264 encoder.
/// </summary>
public int IntelLookAheadDepthH264 { get; set; }
/// <summary>
/// Gets or sets a value indicating whether ExtBrc should be used for Intel H264 encoder.
/// </summary>
public bool EnableIntelExtBrcH264 { get; set; }
/// <summary>
/// Gets or sets a value indicating whether B-Pyramid should be used for Intel H264 encoder.
/// </summary>
public bool EnableIntelBPyramidH264 { get; set; }
/// <summary>
/// Gets or sets a value indicating whether Adaptive I/B frames should be used for Intel H264 encoder.
/// </summary>
public bool EnableIntelAdaptiveIBFramesH264 { get; set; }
/// <summary>
/// Gets or sets a value indicating whether Trellis quantization should be used for Intel H264 encoder.
/// </summary>
public bool EnableIntelTrellisH264 { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the Intel HEVC low-power hardware encoder should be used.
/// </summary>
public bool EnableIntelLowPowerHevcHwEncoder { get; set; }
/// <summary>
/// Gets or sets a value indicating whether LookAhead should be used for Intel HEVC encoder.
/// </summary>
public bool EnableIntelLookAheadHevc { get; set; }
/// <summary>
/// Gets or sets a value indicating the number of frames that should be used for LookAhead with Intel HEVC encoder.
/// </summary>
public int IntelLookAheadDepthHevc { get; set; }
/// <summary>
/// Gets or sets a value indicating whether ExtBrc should be used for Intel HEVC encoder.
/// </summary>
public bool EnableIntelExtBrcHevc { get; set; }
/// <summary>
/// Gets or sets a value indicating whether B-Pyramid should be used for Intel HEVC encoder.
/// </summary>
public bool EnableIntelBPyramidHevc { get; set; }
/// <summary>
/// Gets or sets a value indicating whether Adaptive I/B frames should be used for Intel HEVC encoder.
/// </summary>
public bool EnableIntelAdaptiveIBFramesHevc { get; set; }
/// <summary>
/// Gets or sets a value indicating whether Trellis quantization should be used for Intel HEVC encoder.
/// </summary>
public bool EnableIntelTrellisHevc { get; set; }
/// <summary>
/// Gets or sets a value indicating whether hardware encoding is enabled.
/// </summary>