Browse Source

use hardware encoding for fallback filler

pull/2719/head
Jason Dove 8 months ago
parent
commit
38c1ef1ead
No known key found for this signature in database
  1. 2
      CHANGELOG.md
  2. 21
      ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs

2
CHANGELOG.md

@ -60,6 +60,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed ### Changed
- No longer round framerate to nearest integer when normalizing framerate - No longer round framerate to nearest integer when normalizing framerate
- Allow playlists to have no items included in EPG - Allow playlists to have no items included in EPG
- Use hardware encoding for fallback filler
- Fallback filler will continue to use software decoding to avoid issues looping
## [25.9.0] - 2025-11-29 ## [25.9.0] - 2025-11-29
### Added ### Added

21
ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs

@ -404,12 +404,13 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
graphicsElementContexts.AddRange(watermarks.Map(wm => new WatermarkElementContext(wm))); graphicsElementContexts.AddRange(watermarks.Map(wm => new WatermarkElementContext(wm)));
} }
HardwareAccelerationMode hwAccel = GetHardwareAccelerationMode(playbackSettings, fillerKind); HardwareAccelerationMode decodeHwAccel = GetHardwareAccelerationMode(playbackSettings, fillerKind);
HardwareAccelerationMode encodeHwAccel = GetHardwareAccelerationMode(playbackSettings, FillerKind.None);
string videoFormat = GetVideoFormat(playbackSettings); string videoFormat = GetVideoFormat(playbackSettings);
Option<string> maybeVideoProfile = GetVideoProfile(videoFormat, channel.FFmpegProfile.VideoProfile); Option<string> maybeVideoProfile = GetVideoProfile(videoFormat, channel.FFmpegProfile.VideoProfile);
Option<string> maybeVideoPreset = GetVideoPreset( Option<string> maybeVideoPreset = GetVideoPreset(
hwAccel, encodeHwAccel,
videoFormat, videoFormat,
channel.FFmpegProfile.VideoPreset, channel.FFmpegProfile.VideoPreset,
FFmpegLibraryHelper.MapBitDepth(channel.FFmpegProfile.BitDepth)); FFmpegLibraryHelper.MapBitDepth(channel.FFmpegProfile.BitDepth));
@ -548,10 +549,10 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
var ffmpegState = new FFmpegState( var ffmpegState = new FFmpegState(
saveReports, saveReports,
hwAccel, decodeHwAccel,
hwAccel, encodeHwAccel,
VaapiDriverName(hwAccel, vaapiDriver), VaapiDriverName(encodeHwAccel, vaapiDriver),
VaapiDeviceName(hwAccel, vaapiDevice), VaapiDeviceName(encodeHwAccel, vaapiDevice),
playbackSettings.StreamSeek, playbackSettings.StreamSeek,
finish - now, finish - now,
channel.StreamingMode != StreamingMode.HttpLiveStreamingDirect, channel.StreamingMode != StreamingMode.HttpLiveStreamingDirect,
@ -576,16 +577,16 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
_logger.LogDebug("FFmpeg desired state {FrameState}", desiredState); _logger.LogDebug("FFmpeg desired state {FrameState}", desiredState);
IPipelineBuilder pipelineBuilder = await _pipelineBuilderFactory.GetBuilder( IPipelineBuilder pipelineBuilder = await _pipelineBuilderFactory.GetBuilder(
hwAccel, encodeHwAccel,
videoInputFile, videoInputFile,
audioInputFile, audioInputFile,
watermarkInputFile, watermarkInputFile,
subtitleInputFile, subtitleInputFile,
Option<ConcatInputFile>.None, Option<ConcatInputFile>.None,
graphicsEngineInput, graphicsEngineInput,
VaapiDisplayName(hwAccel, vaapiDisplay), VaapiDisplayName(encodeHwAccel, vaapiDisplay),
VaapiDriverName(hwAccel, vaapiDriver), VaapiDriverName(encodeHwAccel, vaapiDriver),
VaapiDeviceName(hwAccel, vaapiDevice), VaapiDeviceName(encodeHwAccel, vaapiDevice),
await customReportsFolder.IfNoneAsync(FileSystemLayout.FFmpegReportsFolder), await customReportsFolder.IfNoneAsync(FileSystemLayout.FFmpegReportsFolder),
FileSystemLayout.FontsCacheFolder, FileSystemLayout.FontsCacheFolder,
ffmpegPath); ffmpegPath);

Loading…
Cancel
Save