@ -1651,7 +1651,7 @@ public class DynamicHlsController : BaseJellyfinApiController
_encodingHelper . GetInputArgument ( state , _encodingOptions , segmentContainer ) ,
threads ,
mapArgs ,
GetVideoArguments ( state , startNumber , isEventPlaylist ),
GetVideoArguments ( state , startNumber , isEventPlaylist , segmentContainer ),
GetAudioArguments ( state ) ,
maxMuxingQueueSize ,
state . SegmentLength . ToString ( CultureInfo . InvariantCulture ) ,
@ -1814,8 +1814,9 @@ public class DynamicHlsController : BaseJellyfinApiController
/// <param name="state">The <see cref="StreamState"/>.</param>
/// <param name="startNumber">The first number in the hls sequence.</param>
/// <param name="isEventPlaylist">Whether the playlist is EVENT or VOD.</param>
/// <param name="segmentContainer">The segment container.</param>
/// <returns>The command line arguments for video transcoding.</returns>
private string GetVideoArguments ( StreamState state , int startNumber , bool isEventPlaylist )
private string GetVideoArguments ( StreamState state , int startNumber , bool isEventPlaylist , string segmentContainer )
{
if ( state . VideoStream is null )
{
@ -1907,7 +1908,7 @@ public class DynamicHlsController : BaseJellyfinApiController
}
// TODO why was this not enabled for VOD?
if ( isEventPlaylist )
if ( isEventPlaylist & & string . Equals ( segmentContainer , "ts" , StringComparison . OrdinalIgnoreCase ) )
{
args + = " -flags -global_header" ;
}