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/). @@ -60,6 +60,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
- No longer round framerate to nearest integer when normalizing framerate
- 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
### Added

21
ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs

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

Loading…
Cancel
Save