-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transcoding instead of muxing #10549
Comments
I'm also seeing URL: Request Body {
"DeviceProfile": {
"MaxStreamingBitrate": 120000000,
"MaxStaticBitrate": 100000000,
"MusicStreamingTranscodingBitrate": 384000,
"DirectPlayProfiles": [
{
"Container": "webm",
"Type": "Video",
"VideoCodec": "vp8,vp9,av1",
"AudioCodec": "vorbis,opus"
},
{
"Container": "mp4,m4v",
"Type": "Video",
"VideoCodec": "h264,hevc,vp9,av1",
"AudioCodec": "aac,mp3,opus,flac,vorbis"
},
{
"Container": "mov",
"Type": "Video",
"VideoCodec": "h264",
"AudioCodec": "aac,mp3,opus,flac,vorbis"
},
{
"Container": "opus",
"Type": "Audio"
},
{
"Container": "webm",
"AudioCodec": "opus",
"Type": "Audio"
},
{
"Container": "mp3",
"Type": "Audio"
},
{
"Container": "aac",
"Type": "Audio"
},
{
"Container": "m4a",
"AudioCodec": "aac",
"Type": "Audio"
},
{
"Container": "m4b",
"AudioCodec": "aac",
"Type": "Audio"
},
{
"Container": "flac",
"Type": "Audio"
},
{
"Container": "webma",
"Type": "Audio"
},
{
"Container": "webm",
"AudioCodec": "webma",
"Type": "Audio"
},
{
"Container": "wav",
"Type": "Audio"
},
{
"Container": "ogg",
"Type": "Audio"
}
],
"TranscodingProfiles": [
{
"Container": "ts",
"Type": "Audio",
"AudioCodec": "aac",
"Context": "Streaming",
"Protocol": "hls",
"MaxAudioChannels": "2",
"MinSegments": "2",
"BreakOnNonKeyFrames": true
},
{
"Container": "aac",
"Type": "Audio",
"AudioCodec": "aac",
"Context": "Streaming",
"Protocol": "http",
"MaxAudioChannels": "2"
},
{
"Container": "mp3",
"Type": "Audio",
"AudioCodec": "mp3",
"Context": "Streaming",
"Protocol": "http",
"MaxAudioChannels": "2"
},
{
"Container": "opus",
"Type": "Audio",
"AudioCodec": "opus",
"Context": "Streaming",
"Protocol": "http",
"MaxAudioChannels": "2"
},
{
"Container": "wav",
"Type": "Audio",
"AudioCodec": "wav",
"Context": "Streaming",
"Protocol": "http",
"MaxAudioChannels": "2"
},
{
"Container": "opus",
"Type": "Audio",
"AudioCodec": "opus",
"Context": "Static",
"Protocol": "http",
"MaxAudioChannels": "2"
},
{
"Container": "mp3",
"Type": "Audio",
"AudioCodec": "mp3",
"Context": "Static",
"Protocol": "http",
"MaxAudioChannels": "2"
},
{
"Container": "aac",
"Type": "Audio",
"AudioCodec": "aac",
"Context": "Static",
"Protocol": "http",
"MaxAudioChannels": "2"
},
{
"Container": "wav",
"Type": "Audio",
"AudioCodec": "wav",
"Context": "Static",
"Protocol": "http",
"MaxAudioChannels": "2"
},
{
"Container": "ts",
"Type": "Video",
"AudioCodec": "aac,mp3",
"VideoCodec": "h264",
"Context": "Streaming",
"Protocol": "hls",
"MaxAudioChannels": "2",
"MinSegments": "2",
"BreakOnNonKeyFrames": true
}
],
"ContainerProfiles": [],
"CodecProfiles": [
{
"Type": "VideoAudio",
"Codec": "aac",
"Conditions": [
{
"Condition": "Equals",
"Property": "IsSecondaryAudio",
"Value": "false",
"IsRequired": false
}
]
},
{
"Type": "VideoAudio",
"Conditions": [
{
"Condition": "Equals",
"Property": "IsSecondaryAudio",
"Value": "false",
"IsRequired": false
}
]
},
{
"Type": "Video",
"Codec": "h264",
"Conditions": [
{
"Condition": "NotEquals",
"Property": "IsAnamorphic",
"Value": "true",
"IsRequired": false
},
{
"Condition": "EqualsAny",
"Property": "VideoProfile",
"Value": "high|main|baseline|constrained baseline|high 10",
"IsRequired": false
},
{
"Condition": "EqualsAny",
"Property": "VideoRangeType",
"Value": "SDR",
"IsRequired": false
},
{
"Condition": "LessThanEqual",
"Property": "VideoLevel",
"Value": "52",
"IsRequired": false
},
{
"Condition": "NotEquals",
"Property": "IsInterlaced",
"Value": "true",
"IsRequired": false
}
]
},
{
"Type": "Video",
"Codec": "hevc",
"Conditions": [
{
"Condition": "NotEquals",
"Property": "IsAnamorphic",
"Value": "true",
"IsRequired": false
},
{
"Condition": "EqualsAny",
"Property": "VideoProfile",
"Value": "main|main 10",
"IsRequired": false
},
{
"Condition": "EqualsAny",
"Property": "VideoRangeType",
"Value": "SDR",
"IsRequired": false
},
{
"Condition": "LessThanEqual",
"Property": "VideoLevel",
"Value": "183",
"IsRequired": false
},
{
"Condition": "NotEquals",
"Property": "IsInterlaced",
"Value": "true",
"IsRequired": false
}
]
},
{
"Type": "Video",
"Codec": "vp9",
"Conditions": [
{
"Condition": "EqualsAny",
"Property": "VideoRangeType",
"Value": "SDR|HDR10|HLG",
"IsRequired": false
}
]
},
{
"Type": "Video",
"Codec": "av1",
"Conditions": [
{
"Condition": "EqualsAny",
"Property": "VideoRangeType",
"Value": "SDR|HDR10|HLG",
"IsRequired": false
}
]
}
],
"SubtitleProfiles": [
{
"Format": "vtt",
"Method": "External"
},
{
"Format": "ass",
"Method": "External"
},
{
"Format": "ssa",
"Method": "External"
}
],
"ResponseProfiles": [
{
"Type": "Video",
"Container": "m4v",
"MimeType": "video/mp4"
}
]
}
} Response Body {
"MediaSources": [
{
"Protocol": "File",
"Id": "b8457277ab7e36ab0a80861e5b0cd021",
"Path": "/media/HD0/torrent-downloads/TV/The Office (2005)/Season 01/Episode 01.mkv",
"Type": "Default",
"Container": "webm",
"Size": 336766496,
"Name": "Episode 01",
"IsRemote": false,
"ETag": "e7670573d27ec67aa37926e83db067f2",
"RunTimeTicks": 13815060480,
"ReadAtNativeFramerate": false,
"IgnoreDts": false,
"IgnoreIndex": false,
"GenPtsInput": false,
"SupportsTranscoding": true,
"SupportsDirectStream": false,
"SupportsDirectPlay": false,
"IsInfiniteStream": false,
"RequiresOpening": false,
"RequiresClosing": false,
"RequiresLooping": false,
"SupportsProbing": true,
"VideoType": "VideoFile",
"MediaStreams": [
{
"Codec": "hevc",
"Language": "eng",
"ColorSpace": "bt709",
"ColorTransfer": "bt709",
"ColorPrimaries": "bt709",
"TimeBase": "1/1000",
"VideoRange": "SDR",
"VideoRangeType": "SDR",
"DisplayTitle": "1080p HEVC SDR",
"IsInterlaced": false,
"BitRate": 1950141,
"BitDepth": 10,
"RefFrames": 1,
"IsDefault": true,
"IsForced": false,
"Height": 1080,
"Width": 1918,
"AverageFrameRate": 23.976025,
"RealFrameRate": 23.976025,
"Profile": "Main 10",
"Type": "Video",
"AspectRatio": "16:9",
"Index": 0,
"IsExternal": false,
"IsTextSubtitleStream": false,
"SupportsExternalStream": false,
"PixelFormat": "yuv420p10le",
"Level": 123
},
{
"Codec": "aac",
"Language": "eng",
"TimeBase": "1/1000",
"DisplayTitle": "English - AAC - Stereo - Default",
"IsInterlaced": false,
"ChannelLayout": "stereo",
"BitRate": 135139,
"Channels": 2,
"SampleRate": 48000,
"IsDefault": true,
"IsForced": false,
"Profile": "LC",
"Type": "Audio",
"Index": 1,
"IsExternal": false,
"IsTextSubtitleStream": false,
"SupportsExternalStream": false,
"Level": 0
},
{
"Codec": "aac",
"Language": "eng",
"TimeBase": "1/1000",
"Title": "Commentary 1",
"DisplayTitle": "Commentary 1 - English - AAC - Stereo",
"IsInterlaced": false,
"ChannelLayout": "stereo",
"BitRate": 128614,
"Channels": 2,
"SampleRate": 48000,
"IsDefault": false,
"IsForced": false,
"Profile": "LC",
"Type": "Audio",
"Index": 2,
"IsExternal": false,
"IsTextSubtitleStream": false,
"SupportsExternalStream": false,
"Level": 0
},
{
"Codec": "aac",
"Language": "eng",
"TimeBase": "1/1000",
"Title": "Commentary 2",
"DisplayTitle": "Commentary 2 - English - AAC - Stereo",
"IsInterlaced": false,
"ChannelLayout": "stereo",
"BitRate": 126863,
"Channels": 2,
"SampleRate": 48000,
"IsDefault": false,
"IsForced": false,
"Profile": "LC",
"Type": "Audio",
"Index": 3,
"IsExternal": false,
"IsTextSubtitleStream": false,
"SupportsExternalStream": false,
"Level": 0
}
],
"MediaAttachments": [],
"Formats": [],
"Bitrate": 2340757,
"RequiredHttpHeaders": {},
"TranscodingUrl": "/videos/b8457277-ab7e-36ab-0a80-861e5b0cd021/master.m3u8?DeviceId=TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTVfNykgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzExNy4wLjAuMCBTYWZhcmkvNTM3LjM2fDE2OTg0Mzc0NDY1NjE1\u0026MediaSourceId=b8457277ab7e36ab0a80861e5b0cd021\u0026VideoCodec=h264\u0026AudioCodec=aac\u0026AudioStreamIndex=1\u0026VideoBitrate=76228497\u0026AudioBitrate=135139\u0026AudioSampleRate=48000\u0026MaxFramerate=23.976025\u0026PlaySessionId=7aa8d829a0334f98bec12bd96db9e69a\u0026api_key=296a30d8a8e043e6a23fb14b41ca9c75\u0026TranscodingMaxAudioChannels=2\u0026RequireAvc=false\u0026Tag=e7670573d27ec67aa37926e83db067f2\u0026SegmentContainer=ts\u0026MinSegments=2\u0026BreakOnNonKeyFrames=True\u0026hevc-level=123\u0026hevc-videobitdepth=10\u0026hevc-profile=main10\u0026hevc-audiochannels=2\u0026aac-profile=lc\u0026TranscodeReasons=VideoCodecNotSupported,%20AudioCodecNotSupported",
"TranscodingSubProtocol": "hls",
"TranscodingContainer": "ts",
"DefaultAudioStreamIndex": 1
}
],
"PlaySessionId": "7aa8d829a0334f98bec12bd96db9e69a"
} |
I'm also seeing {
"Protocol": 0,
"Id": "b8457277ab7e36ab0a80861e5b0cd021",
"Path": "/media/HD0/torrent-downloads/TV/The Office (2005)/Season 01/Episode 01.mkv",
"EncoderPath": null,
"EncoderProtocol": null,
"Type": 0,
"Container": "mkv,webm",
"Size": 336766496,
"Name": "Episode 01",
"IsRemote": false,
"ETag": "e7670573d27ec67aa37926e83db067f2",
"RunTimeTicks": 13815060480,
"ReadAtNativeFramerate": false,
"IgnoreDts": false,
"IgnoreIndex": false,
"GenPtsInput": false,
"SupportsTranscoding": true,
"SupportsDirectStream": true,
"SupportsDirectPlay": true,
"IsInfiniteStream": false,
"RequiresOpening": false,
"OpenToken": null,
"RequiresClosing": false,
"LiveStreamId": null,
"BufferMs": null,
"RequiresLooping": false,
"SupportsProbing": true,
"VideoType": 0,
"IsoType": null,
"Video3DFormat": null,
"MediaStreams": [
{
"Codec": "hevc",
"CodecTag": null,
"Language": "eng",
"ColorRange": null,
"ColorSpace": "bt709",
"ColorTransfer": "bt709",
"ColorPrimaries": "bt709",
"DvVersionMajor": null,
"DvVersionMinor": null,
"DvProfile": null,
"DvLevel": null,
"RpuPresentFlag": null,
"ElPresentFlag": null,
"BlPresentFlag": null,
"DvBlSignalCompatibilityId": null,
"Comment": null,
"TimeBase": "1/1000",
"CodecTimeBase": null,
"Title": null,
"VideoRange": "SDR",
"VideoRangeType": "SDR",
"VideoDoViTitle": null,
"LocalizedUndefined": null,
"LocalizedDefault": null,
"LocalizedForced": null,
"LocalizedExternal": null,
"DisplayTitle": "1080p HEVC SDR",
"NalLengthSize": null,
"IsInterlaced": false,
"IsAVC": null,
"ChannelLayout": null,
"BitRate": 1950141,
"BitDepth": 10,
"RefFrames": 1,
"PacketLength": null,
"Channels": null,
"SampleRate": null,
"IsDefault": true,
"IsForced": false,
"Height": 1080,
"Width": 1918,
"AverageFrameRate": 23.976025,
"RealFrameRate": 23.976025,
"Profile": "Main 10",
"Type": 1,
"AspectRatio": "16:9",
"Index": 0,
"Score": null,
"IsExternal": false,
"DeliveryMethod": null,
"DeliveryUrl": null,
"IsExternalUrl": null,
"IsTextSubtitleStream": false,
"SupportsExternalStream": false,
"Path": null,
"PixelFormat": "yuv420p10le",
"Level": 123,
"IsAnamorphic": null
},
{
"Codec": "aac",
"CodecTag": null,
"Language": "eng",
"ColorRange": null,
"ColorSpace": null,
"ColorTransfer": null,
"ColorPrimaries": null,
"DvVersionMajor": null,
"DvVersionMinor": null,
"DvProfile": null,
"DvLevel": null,
"RpuPresentFlag": null,
"ElPresentFlag": null,
"BlPresentFlag": null,
"DvBlSignalCompatibilityId": null,
"Comment": null,
"TimeBase": "1/1000",
"CodecTimeBase": null,
"Title": null,
"VideoRange": null,
"VideoRangeType": null,
"VideoDoViTitle": null,
"LocalizedUndefined": null,
"LocalizedDefault": null,
"LocalizedForced": null,
"LocalizedExternal": null,
"DisplayTitle": "English - AAC - Stereo - Default",
"NalLengthSize": null,
"IsInterlaced": false,
"IsAVC": null,
"ChannelLayout": "stereo",
"BitRate": 135139,
"BitDepth": null,
"RefFrames": null,
"PacketLength": null,
"Channels": 2,
"SampleRate": 48000,
"IsDefault": true,
"IsForced": false,
"Height": null,
"Width": null,
"AverageFrameRate": null,
"RealFrameRate": null,
"Profile": "LC",
"Type": 0,
"AspectRatio": null,
"Index": 1,
"Score": null,
"IsExternal": false,
"DeliveryMethod": null,
"DeliveryUrl": null,
"IsExternalUrl": null,
"IsTextSubtitleStream": false,
"SupportsExternalStream": false,
"Path": null,
"PixelFormat": null,
"Level": 0,
"IsAnamorphic": null
},
{
"Codec": "aac",
"CodecTag": null,
"Language": "eng",
"ColorRange": null,
"ColorSpace": null,
"ColorTransfer": null,
"ColorPrimaries": null,
"DvVersionMajor": null,
"DvVersionMinor": null,
"DvProfile": null,
"DvLevel": null,
"RpuPresentFlag": null,
"ElPresentFlag": null,
"BlPresentFlag": null,
"DvBlSignalCompatibilityId": null,
"Comment": null,
"TimeBase": "1/1000",
"CodecTimeBase": null,
"Title": "Commentary 1",
"VideoRange": null,
"VideoRangeType": null,
"VideoDoViTitle": null,
"LocalizedUndefined": null,
"LocalizedDefault": null,
"LocalizedForced": null,
"LocalizedExternal": null,
"DisplayTitle": "Commentary 1 - English - AAC - Stereo",
"NalLengthSize": null,
"IsInterlaced": false,
"IsAVC": null,
"ChannelLayout": "stereo",
"BitRate": 128614,
"BitDepth": null,
"RefFrames": null,
"PacketLength": null,
"Channels": 2,
"SampleRate": 48000,
"IsDefault": false,
"IsForced": false,
"Height": null,
"Width": null,
"AverageFrameRate": null,
"RealFrameRate": null,
"Profile": "LC",
"Type": 0,
"AspectRatio": null,
"Index": 2,
"Score": null,
"IsExternal": false,
"DeliveryMethod": null,
"DeliveryUrl": null,
"IsExternalUrl": null,
"IsTextSubtitleStream": false,
"SupportsExternalStream": false,
"Path": null,
"PixelFormat": null,
"Level": 0,
"IsAnamorphic": null
},
{
"Codec": "aac",
"CodecTag": null,
"Language": "eng",
"ColorRange": null,
"ColorSpace": null,
"ColorTransfer": null,
"ColorPrimaries": null,
"DvVersionMajor": null,
"DvVersionMinor": null,
"DvProfile": null,
"DvLevel": null,
"RpuPresentFlag": null,
"ElPresentFlag": null,
"BlPresentFlag": null,
"DvBlSignalCompatibilityId": null,
"Comment": null,
"TimeBase": "1/1000",
"CodecTimeBase": null,
"Title": "Commentary 2",
"VideoRange": null,
"VideoRangeType": null,
"VideoDoViTitle": null,
"LocalizedUndefined": null,
"LocalizedDefault": null,
"LocalizedForced": null,
"LocalizedExternal": null,
"DisplayTitle": "Commentary 2 - English - AAC - Stereo",
"NalLengthSize": null,
"IsInterlaced": false,
"IsAVC": null,
"ChannelLayout": "stereo",
"BitRate": 126863,
"BitDepth": null,
"RefFrames": null,
"PacketLength": null,
"Channels": 2,
"SampleRate": 48000,
"IsDefault": false,
"IsForced": false,
"Height": null,
"Width": null,
"AverageFrameRate": null,
"RealFrameRate": null,
"Profile": "LC",
"Type": 0,
"AspectRatio": null,
"Index": 3,
"Score": null,
"IsExternal": false,
"DeliveryMethod": null,
"DeliveryUrl": null,
"IsExternalUrl": null,
"IsTextSubtitleStream": false,
"SupportsExternalStream": false,
"Path": null,
"PixelFormat": null,
"Level": 0,
"IsAnamorphic": null
}
],
"MediaAttachments": [],
"Formats": [],
"Bitrate": 2340757,
"Timestamp": null,
"RequiredHttpHeaders": {},
"TranscodingUrl": null,
"TranscodingSubProtocol": null,
"TranscodingContainer": null,
"AnalyzeDurationMs": null,
"DefaultAudioStreamIndex": null,
"DefaultSubtitleStreamIndex": null
} |
HEVC remuxing currently/always requires fMP4 to be enabled on the client (Settings / Playback). |
@dmitrylyzo Ok, I can try enabling that setting on Chrome. I'm noticing there's a setting in the iOS app called "prefer fMP4", but it's grayed out--is there any way to support this in iOS? In particular, when I stream to my Samsung TV (I believe DLNA is the protocol it uses?) I still see this issue (is this because my iOS app doesn't support fMP4 or because the TV doesn't support it?). Also, is there documentation somewhere I can update to make this more obvious to newbies like myself? I'm happy to submit a PR. Lastly, in the longer term, shouldn't the server remix regardless of whether the client supports fMP4? As a user, my intuition is that if the client can play HEVC/mp4 then the server should remux it even if the client doesn't support fMP4--would this be a reasonable feature request? |
I toggled the "Prefer fMP4" setting in Chrome, but it still transcodes when I play HEVC/mkv content. |
Turns out fMP4 is only available for Safari, Tizen, and webOS: https://github.com/jellyfin/jellyfin-web/blob/4b6bbcfe2671b21a79e347241eed3c70acaad9e3/src/scripts/browserDeviceProfile.js#L693
It should be available on any web based client: browsers, Android (mobile), iOS (not Swiftfin), Tizen, webOS. Although enabling it doesn't guarantee that it will use fMP4 - this will be tested later when playback starts.
If you are using AirPlay then, I guess, it depends on your source device (iOS).
Probably.
Progressive transcoding (remux to MKV/MP4) was removed for web based clients: jellyfin/jellyfin-web#4385 |
Ah, that makes sense.
Huzzah! 🎊
Forgive my ignorance, but why not just remux the whole file when the stream starts? If episode-01.mp4 plays just fine on a given client, but episode-01.mkv doesn't work, why not just remux |
When you resume watching, it starts from the requested time. Otherwise, it will take some time to remux the file from the beginning. Imagine it needs to remux almost the entire movie (big size) if you start playback almost from the end. IMO, those seeking problems were mostly due to poor implementation of seeking in the absence of timestamps. Timestamps can be fixed with Not sure, maybe there were also problems with audio desync. |
This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to contact us. |
This issue was closed due to inactivity. |
When I play an HEVC/MKV file, the transcoder kicks in even though the same file converted to HEVC/mp4 plays just fine. I would expect it to remux and not transcode.
Media Info of the file
MP4 version
MKV version
Logs
Logs showing playback of mkv and then playback of mp4
FFmpeg Logs
Stats for Nerds Screenshots
Server System (please complete the following information):
Client System (please complete the following information):
The text was updated successfully, but these errors were encountered: