aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonebyte <61915324+lonebyte@users.noreply.github.com>2023-10-10 22:48:52 +0200
committerGitHub <noreply@github.com>2023-10-10 22:48:52 +0200
commit74f61fbd79ef2e2ad4a986f5f886581b2827de07 (patch)
treec6e19a728fa106a5ef9b9655cba818cbf9891948
parentc45157158ee3e6566e5747998a8dc78c278dee6d (diff)
Fix HLS playback of m4a files with mjpeg stream (#10069)
-rw-r--r--Jellyfin.Api/Controllers/DynamicHlsController.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs
index 7bf366e5d..42c94c29d 100644
--- a/Jellyfin.Api/Controllers/DynamicHlsController.cs
+++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs
@@ -1721,14 +1721,17 @@ public class DynamicHlsController : BaseJellyfinApiController
if (!state.IsOutputVideo)
{
+ var audioTranscodeParams = string.Empty;
+
+ // -vn to drop any video streams
+ audioTranscodeParams += "-vn";
+
if (EncodingHelper.IsCopyCodec(audioCodec))
{
- return "-acodec copy" + bitStreamArgs + strictArgs;
+ return audioTranscodeParams + " -acodec copy" + bitStreamArgs + strictArgs;
}
- var audioTranscodeParams = string.Empty;
-
- audioTranscodeParams += "-acodec " + audioCodec + 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;
}