diff options
| author | gnattu <gnattu@users.noreply.github.com> | 2024-05-25 11:46:25 -0400 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2024-05-25 11:46:25 -0400 |
| commit | 654dd2b7041bef596397567a3a934726a0cbc8ac (patch) | |
| tree | 7375cce7b4c36ec3fe1aa6cefd2b8fb538f4cddd /Jellyfin.Api/Helpers/MediaInfoHelper.cs | |
| parent | 2faa8c141fd9b7d1980b8a468f0a8f01b46cbf2d (diff) | |
Backport pull request #11801 from jellyfin/release-10.9.z
Force more compatible transcoding profile for LiveTV
Original-merge: e7b1162cb30601297f987a6409a7d76b40aa74a6
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'Jellyfin.Api/Helpers/MediaInfoHelper.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/MediaInfoHelper.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Jellyfin.Api/Helpers/MediaInfoHelper.cs b/Jellyfin.Api/Helpers/MediaInfoHelper.cs index 212d678a8..5faa7bc59 100644 --- a/Jellyfin.Api/Helpers/MediaInfoHelper.cs +++ b/Jellyfin.Api/Helpers/MediaInfoHelper.cs @@ -385,6 +385,19 @@ public class MediaInfoHelper /// <returns>A <see cref="Task"/> containing the <see cref="LiveStreamResponse"/>.</returns> public async Task<LiveStreamResponse> OpenMediaSource(HttpContext httpContext, LiveStreamRequest request) { + // Enforce more restrictive transcoding profile for LiveTV due to compatability reasons + // Cap the MaxStreamingBitrate to 20Mbps, because we are unable to reliably probe source bitrate, + // which will cause the client to request extremely high bitrate that may fail the player/encoder + request.MaxStreamingBitrate = request.MaxStreamingBitrate > 20000000 ? 20000000 : request.MaxStreamingBitrate; + + if (request.DeviceProfile is not null) + { + // Remove all fmp4 transcoding profiles, because it causes playback error and/or A/V sync issues + // Notably: Some channels won't play on FireFox and LG webOs + // Some channels from HDHomerun will experience A/V sync issues + request.DeviceProfile.TranscodingProfiles = request.DeviceProfile.TranscodingProfiles.Where(p => !string.Equals(p.Container, "mp4", StringComparison.OrdinalIgnoreCase)).ToArray(); + } + var result = await _mediaSourceManager.OpenLiveStream(request, CancellationToken.None).ConfigureAwait(false); var profile = request.DeviceProfile; |
