From 92be991cf76b97141ca4a8e9c77bfa0177758981 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Tue, 3 Dec 2024 11:59:13 +0100 Subject: [PATCH] fix: subtitles burn in for chromecast --- utils/profiles/chromecast.ts | 100 +++++++++-------------------------- 1 file changed, 25 insertions(+), 75 deletions(-) diff --git a/utils/profiles/chromecast.ts b/utils/profiles/chromecast.ts index b686be31..9c13dcaa 100644 --- a/utils/profiles/chromecast.ts +++ b/utils/profiles/chromecast.ts @@ -1,18 +1,25 @@ -import { - DeviceProfile -} from "@jellyfin/sdk/lib/generated-client/models"; +import { DeviceProfile } from "@jellyfin/sdk/lib/generated-client/models"; export const chromecastProfile: DeviceProfile = { Name: "Chromecast Video Profile", - Id: "chromecast-001", - MaxStreamingBitrate: 4000000, // 4 Mbps - MaxStaticBitrate: 4000000, // 4 Mbps + MaxStreamingBitrate: 8000000, // 8 Mbps + MaxStaticBitrate: 8000000, // 8 Mbps MusicStreamingTranscodingBitrate: 384000, // 384 kbps + CodecProfiles: [ + { + Type: "Video", + Codec: "h264", + }, + { + Type: "Audio", + Codec: "aac,mp3,flac,opus,vorbis", + }, + ], DirectPlayProfiles: [ { - Container: "mp4,webm", + Container: "mp4", Type: "Video", - VideoCodec: "h264,vp8,vp9", + VideoCodec: "h264", AudioCodec: "aac,mp3,opus,vorbis", }, { @@ -34,89 +41,32 @@ export const chromecastProfile: DeviceProfile = { ], TranscodingProfiles: [ { - Container: "ts", Type: "Video", - VideoCodec: "h264", - AudioCodec: "aac,mp3", + Context: "Streaming", Protocol: "hls", - Context: "Streaming", - MaxAudioChannels: "2", - MinSegments: 2, - BreakOnNonKeyFrames: true, + Container: "ts", + VideoCodec: "h264, hevc", + AudioCodec: "aac,mp3,ac3", + CopyTimestamps: false, + EnableSubtitlesInManifest: true, }, { - Container: "mp4", - Type: "Video", - VideoCodec: "h264", - AudioCodec: "aac", + Type: "Audio", + Context: "Streaming", Protocol: "http", - Context: "Streaming", - MaxAudioChannels: "2", - }, - { Container: "mp3", - Type: "Audio", AudioCodec: "mp3", - Protocol: "http", - Context: "Streaming", MaxAudioChannels: "2", }, - { - Container: "aac", - Type: "Audio", - AudioCodec: "aac", - Protocol: "http", - Context: "Streaming", - MaxAudioChannels: "2", - }, - ], - ContainerProfiles: [ - { - Type: "Video", - Container: "mp4", - }, - { - Type: "Video", - Container: "webm", - }, - ], - CodecProfiles: [ - { - Type: "Video", - Codec: "h264", - Conditions: [ - { - Condition: "LessThanEqual", - Property: "VideoBitDepth", - Value: "8", - }, - { - Condition: "LessThanEqual", - Property: "VideoLevel", - Value: "41", - }, - ], - }, - { - Type: "Video", - Codec: "vp9", - Conditions: [ - { - Condition: "LessThanEqual", - Property: "VideoBitDepth", - Value: "10", - }, - ], - }, ], SubtitleProfiles: [ { Format: "vtt", - Method: "Hls", + Method: "Encode", }, { Format: "vtt", - Method: "External", + Method: "Encode", }, ], };