Request mp4 container when transcoding HLS video

Shaka player 4.8 and up always remuxes TS to MP4, while the Jellyfin Cast
client always requests a TS container. This means any transcoded MP4 stream
will be remuxed to TS on the server then remuxed again on the device.

As Cast clients (particularly older ones) are low-powered devices, it's
important to reduce load on the device when possible. It also avoids
unnecessary remuxing on the server in some scenarios.

In local testing the Shaka player version is 4.3.4 but this will be updated
automatically to 4.9.2 in future. This change is still useful for earlier
Shaka player versions since TS remuxing was identified as a problem area
anyway, so using MP4 should improve streaming reliablity to Cast devices
regardless of the Shaka version.
This commit is contained in:
Matthew Haughton 2024-11-02 18:01:30 +11:00
parent aa8e7b1ceb
commit 46a94fa525

View File

@ -333,7 +333,7 @@ function getTranscodingProfiles(): TranscodingProfile[] {
TranscodingProfiles.push({ TranscodingProfiles.push({
AudioCodec: hlsAudioCodecs.join(','), AudioCodec: hlsAudioCodecs.join(','),
BreakOnNonKeyFrames: false, BreakOnNonKeyFrames: false,
Container: 'ts', Container: 'mp4',
Context: EncodingContext.Streaming, Context: EncodingContext.Streaming,
MaxAudioChannels: audioChannels.toString(), MaxAudioChannels: audioChannels.toString(),
MinSegments: 1, MinSegments: 1,