@ -60,8 +60,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
@@ -60,8 +60,11 @@ 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
- Change how fallback filler works
- Items will no longer loop; instead, a sequence of random items will be selected from the collection
- Items may still be cut as needed
- Hardware acceleration will now be used
- Items can "work ahead" (transcode faster than realtime) when less than 3 minutes in duration
@ -46,6 +46,7 @@ public class GetConcatProcessByChannelNumberHandler : FFmpegProcessHandler<GetCo
@@ -46,6 +46,7 @@ public class GetConcatProcessByChannelNumberHandler : FFmpegProcessHandler<GetCo
@ -284,9 +284,20 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@@ -284,9 +284,20 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
boolisComplete=true;
booleffectiveRealtime=request.HlsRealtime;
// only work ahead on fallback filler up to 3 minutes in duration
// since we always transcode a full fallback filler item
// if we are working ahead, limit to 44s (multiple of segment size)
limit=TimeSpan.FromSeconds(44);
@ -319,7 +330,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@@ -319,7 +330,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
now,
duration,
$"DEBUG_NO_SYNC:\n{Mapper.GetDisplayTitle(playoutItemWithPath.PlayoutItem.MediaItem, Option<string>.None)}\nFrom: {start} To: {finish}",
request.HlsRealtime,
effectiveRealtime,
request.PtsOffset,
channel.FFmpegProfile.VaapiDisplay,
channel.FFmpegProfile.VaapiDriver,
@ -334,7 +345,8 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@@ -334,7 +345,8 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@ -443,7 +455,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@@ -443,7 +455,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@ -465,7 +477,8 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@@ -465,7 +477,8 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@ -529,7 +542,8 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@@ -529,7 +542,8 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@ -552,7 +566,8 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@@ -552,7 +566,8 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@ -575,7 +590,8 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@@ -575,7 +590,8 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
true,
now.ToUnixTimeSeconds(),
Option<int>.None,
Optional(channel.PlayoutOffset));
Optional(channel.PlayoutOffset),
!request.HlsRealtime);
}
}
@ -724,7 +740,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@@ -724,7 +740,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
break;
}
// TODO: shuffle? does it really matter since we loop anyway
@ -747,15 +763,14 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@@ -747,15 +763,14 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
.Filter(ms=>ms.MediaVersionId==version.Id)
.ToListAsync(cancellationToken);
DateTimeOffsetfinish=maybeDuration.Match(
// next playout item exists
// loop until it starts
now.Add,
// no next playout item exists
// loop for 5 minutes if less than 30s, otherwise play full item
()=>version.Duration<TimeSpan.FromSeconds(30)
?now.AddMinutes(5)
:now.Add(version.Duration));
// always play min(duration to next item, version.Duration)
@ -765,7 +780,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@@ -765,7 +780,7 @@ public class GetPlayoutItemProcessByChannelNumberHandler : FFmpegProcessHandler<
@ -48,6 +48,7 @@ public class GetWrappedProcessByChannelNumberHandler : FFmpegProcessHandler<GetW
@@ -48,6 +48,7 @@ public class GetWrappedProcessByChannelNumberHandler : FFmpegProcessHandler<GetW
@ -404,13 +404,12 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@@ -404,13 +404,12 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@ -500,7 +499,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@@ -500,7 +499,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
vardesiredState=newFrameState(
playbackSettings.RealtimeOutput,
fillerKind==FillerKind.Fallback,
InfiniteLoop:false,
videoFormat,
maybeVideoProfile,
maybeVideoPreset,
@ -549,10 +548,10 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@@ -549,10 +548,10 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@ -577,16 +576,16 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@@ -577,16 +576,16 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
_logger.LogDebug("FFmpeg desired state {FrameState}",desiredState);
@ -701,7 +700,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@@ -701,7 +700,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@ -790,7 +789,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@@ -790,7 +789,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@ -1188,12 +1187,10 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
@@ -1188,12 +1187,10 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService