Fix HLS playback of m4a files with mjpeg stream (#10069)

This commit is contained in:
lonebyte 2023-10-10 22:48:52 +02:00 committed by GitHub
parent c45157158e
commit 74f61fbd79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1721,14 +1721,17 @@ public class DynamicHlsController : BaseJellyfinApiController
if (!state.IsOutputVideo)
{
if (EncodingHelper.IsCopyCodec(audioCodec))
{
return "-acodec copy" + bitStreamArgs + strictArgs;
}
var audioTranscodeParams = string.Empty;
audioTranscodeParams += "-acodec " + audioCodec + bitStreamArgs + strictArgs;
// -vn to drop any video streams
audioTranscodeParams += "-vn";
if (EncodingHelper.IsCopyCodec(audioCodec))
{
return audioTranscodeParams + " -acodec copy" + bitStreamArgs + strictArgs;
}
audioTranscodeParams += " -acodec " + audioCodec + bitStreamArgs + strictArgs;
var audioBitrate = state.OutputAudioBitrate;
var audioChannels = state.OutputAudioChannels;
@ -1756,7 +1759,6 @@ public class DynamicHlsController : BaseJellyfinApiController
audioTranscodeParams += " -ar " + state.OutputAudioSampleRate.Value.ToString(CultureInfo.InvariantCulture);
}
audioTranscodeParams += " -vn";
return audioTranscodeParams;
}