[Issue]: Transcoding is forced on video files with no default audio stream set. Reason - SecondaryAudioNotSupported #4057

Closed
opened 2026-02-07 00:20:52 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @gaudat on GitHub (Jul 23, 2022).

Please describe your bug

Steps to reproduce:

  • Create an AVI file with the following FFMPEG command.
ffmpeg -re -f lavfi -i "smptehdbars=rate=30:size=1920x1080" -f lavfi -i "sine=frequency=1000:sample_rate=48000" -to 10 -c:v h264 -profile:v baseline -pix_fmt yuv420p -preset ultrafast -tune zerolatency -crf 28 -c:a mp3 testvid.avi
  • Add the created "testvid.avi" to a Jellyfin library.
  • Try to play the file on web UI.
  • Observe transcoding is always on and there is no direct playback option.
  • Transcode reason is listed as SecondaryAudioNotSupported even there is only one audio stream in the file.

Expected behavior:

File is played directly with no transcoding as H264 and MP3 are supported by the browser.

Root cause:

JSON output of ffprobe has streams[*].disposition.default == 0 for all streams.

Proposed solution:

Add check and modification of parse result in ProbeResultNormalizer.

Jellyfin Version

Other

if other:

10.8.1

Environment

- OS: Raspbian 2022-01-28 on Raspberry 3B+
- Virtualization: None
- Clients: Stock web client
- Browser: Latest Edge/FF/Chrome desktop/mobile
- FFmpeg Version: 5.0.1-Jellyfin (/usr/lib/jellyfin-ffmpeg/ffmpeg)
- Playback Method: Video file on local drive
- Hardware Acceleration: None
- Plugins: None
- Reverse Proxy: None
- Base URL: http://<IPv4 address>:8096
- Networking: LAN
- Storage: External hard drive

Jellyfin logs

On playback:

Jul 24 03:21:19 raspberrypi jellyfin[14513]: [03:21:19] [DBG] GetPostedPlaybackInfo profile: {"Name": null, "Id": null, "Identification": null, "FriendlyName": null, "Manufacturer": null, "ManufacturerUrl": null, "ModelName": null, "ModelDescription": null, "ModelNumber": null, "ModelUrl": null, "SerialNumber": null, "EnableAlbumArtInDidl": false, "EnableSingleAlbumArtLimit": false, "EnableSingleSubtitleLimit": false, "SupportedMediaTypes": "Audio,Photo,Video", "UserId": null, "AlbumArtPn": null, "MaxAlbumArtWidth": null, "MaxAlbumArtHeight": null, "MaxIconWidth": null, "MaxIconHeight": null, "MaxStreamingBitrate": 120000000, "MaxStaticBitrate": 100000000, "MusicStreamingTranscodingBitrate": 384000, "MaxStaticMusicBitrate": 8000000, "SonyAggregationFlags": null, "ProtocolInfo": null, "TimelineOffsetSeconds": 0, "RequiresPlainVideoItems": false, "RequiresPlainFolders": false, "EnableMSMediaReceiverRegistrar": false, "IgnoreTranscodeByteRangeRequests": false, "XmlRootAttributes": [], "DirectPlayProfiles": [{"Container": "webm", "AudioCodec": "vorbis,opus", "VideoCodec": "vp8,vp9,av1", "Type": "Video", "$type": "DirectPlayProfile"}, {"Container": "mp4,m4v", "AudioCodec": "aac,mp3,opus,flac,vorbis", "VideoCodec": "h264,vp8,vp9,av1", "Type": "Video", "$type": "DirectPlayProfile"}, {"Container": "opus", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webm", "AudioCodec": "opus", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "mp3", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "aac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "m4a", "AudioCodec": "aac", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "m4b", "AudioCodec": "aac", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "flac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webma", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webm", "AudioCodec": "webma", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "wav", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "ogg", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}], "TranscodingProfiles": [{"Container": "ts", "Type": "Audio", "VideoCodec": "", "AudioCodec": "aac", "Protocol": "hls", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 1, "SegmentLength": 0, "BreakOnNonKeyFrames": true, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "aac", "Type": "Audio", "VideoCodec": "", "AudioCodec": "aac", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "mp3", "Type": "Audio", "VideoCodec": "", "AudioCodec": "mp3", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "opus", "Type": "Audio", "VideoCodec": "", "AudioCodec": "opus", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "wav", "Type": "Audio", "VideoCodec": "", "AudioCodec": "wav", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "opus", "Type": "Audio", "VideoCodec": "", "AudioCodec": "opus", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Static", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "mp3", "Type": "Audio", "VideoCodec": "", "AudioCodec": "mp3", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Static", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "aac", "Type": "Audio", "VideoCodec": "", "AudioCodec": "aac", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Static", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "wav", "Type": "Audio", "VideoCodec": "", "AudioCodec": "wav", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Static", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "ts", "Type": "Video", "VideoCodec": "h264", "AudioCodec": "aac,mp3", "Protocol": "hls", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 1, "SegmentLength": 0, "BreakOnNonKeyFrames": true, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "webm", "Type": "Video", "VideoCodec": "vp8,vp9,av1,vpx", "AudioCodec": "vorbis,opus", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "mp4", "Type": "Video", "VideoCodec": "h264", "AudioCodec": "aac,mp3,opus,flac,vorbis", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Static", "EnableSubtitlesInManifest": false, "MaxAudioChannels": null, "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}], "ContainerProfiles": [], "CodecProfiles": [{"Type": "VideoAudio", "Conditions": [{"Condition": "Equals", "Property": "IsSecondaryAudio", "Value": "false", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": "aac", "Container": null, "$type": "CodecProfile"}, {"Type": "VideoAudio", "Conditions": [{"Condition": "Equals", "Property": "IsSecondaryAudio", "Value": "false", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": null, "Container": null, "$type": "CodecProfile"}, {"Type": "Video", "Conditions": [{"Condition": "NotEquals", "Property": "IsAnamorphic", "Value": "true", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "EqualsAny", "Property": "VideoProfile", "Value": "high|main|baseline|constrained baseline", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "EqualsAny", "Property": "VideoRangeType", "Value": "SDR", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "LessThanEqual", "Property": "VideoLevel", "Value": "52", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "NotEquals", "Property": "IsInterlaced", "Value": "true", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": "h264", "Container": null, "$type": "CodecProfile"}, {"Type": "Video", "Conditions": [{"Condition": "NotEquals", "Property": "IsAnamorphic", "Value": "true", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "EqualsAny", "Property": "VideoProfile", "Value": "main", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "EqualsAny", "Property": "VideoRangeType", "Value": "SDR", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "LessThanEqual", "Property": "VideoLevel", "Value": "120", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "NotEquals", "Property": "IsInterlaced", "Value": "true", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": "hevc", "Container": null, "$type": "CodecProfile"}, {"Type": "Video", "Conditions": [{"Condition": "EqualsAny", "Property": "VideoRangeType", "Value": "SDR|HDR10|HLG", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": "vp9", "Container": null, "$type": "CodecProfile"}, {"Type": "Video", "Conditions": [{"Condition": "EqualsAny", "Property": "VideoRangeType", "Value": "SDR|HDR10|HLG", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": "av1", "Container": null, "$type": "CodecProfile"}], "ResponseProfiles": [{"Container": "m4v", "AudioCodec": null, "VideoCodec": null, "Type": "Video", "OrgPn": null, "MimeType": "video/mp4", "Conditions": [], "$type": "ResponseProfile"}], "SubtitleProfiles": [{"Format": "vtt", "Method": "External", "DidlMode": null, "Language": null, "Container": null, "$type": "SubtitleProfile"}, {"Format": "ass", "Method": "External", "DidlMode": null, "Language": null, "Container": null, "$type": "SubtitleProfile"}, {"Format": "ssa", "Method": "External", "DidlMode": null, "Language": null, "Container": null, "$type": "SubtitleProfile"}], "$type": "DeviceProfile"}
Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [INF] User policy for [REDACTED]. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [DBG] Profile: Unknown Profile, Path: [REDACTED], isEligibleForDirectPlay: True, isEligibleForDirectStream: False
Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [DBG] Profile: VideoAudioCodecProfile, DirectPlay=false. Reason=Unknown Profile.IsSecondaryAudio Condition: Equals. ConditionValue: false. IsRequired: False. Path: [REDACTED]
Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [DBG] DirectPlay Result for Profile: Anonymous Profile, Path: [REDACTED], PlayMethod: null, AudioStreamIndex: 1, SubtitleStreamIndex: -1, Reasons: SecondaryAudioNotSupported
Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [DBG] Transcode Result for Profile: Anonymous Profile, Path: [REDACTED], PlayMethod: Transcode, AudioStreamIndex: 1, SubtitleStreamIndex: -1, Reasons: SecondaryAudioNotSupported
Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [INF] StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=[REDACTED], AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=SecondaryAudioNotSupported ) media:/videos/de91dce8-abbe-9c68-93fa-e46f0ff8415e/master.m3u8?MediaSourceId=de91dce8abbe9c6893fae46f0ff8415e&VideoCodec=h264,h264&AudioCodec=mp3&AudioStreamIndex=1&VideoBitrate=139936000&AudioBitrate=64000&AudioSampleRate=48000&MaxFramerate=30&api_key=<token>&SubtitleMethod=Encode&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=21f31e38e6113e678863bbfafa6f78b5&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&h264-level=40&h264-videobitdepth=8&h264-profile=constrainedbaseline&h264-audiochannels=1&h264-rangetype=SDR&h264-deinterlace=true&TranscodeReasons=SecondaryAudioNotSupported

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @gaudat on GitHub (Jul 23, 2022). ### Please describe your bug ### Steps to reproduce: * Create an AVI file with the following FFMPEG command. ```sh ffmpeg -re -f lavfi -i "smptehdbars=rate=30:size=1920x1080" -f lavfi -i "sine=frequency=1000:sample_rate=48000" -to 10 -c:v h264 -profile:v baseline -pix_fmt yuv420p -preset ultrafast -tune zerolatency -crf 28 -c:a mp3 testvid.avi ``` * Add the created "testvid.avi" to a Jellyfin library. * Try to play the file on web UI. * Observe transcoding is always on and there is no direct playback option. * Transcode reason is listed as SecondaryAudioNotSupported even there is only one audio stream in the file. ### Expected behavior: File is played directly with no transcoding as H264 and MP3 are supported by the browser. ### Root cause: JSON output of ffprobe has `streams[*].disposition.default` == 0 for all streams. ### Proposed solution: Add check and modification of parse result in `ProbeResultNormalizer`. ### Jellyfin Version Other ### if other: 10.8.1 ### Environment ```markdown - OS: Raspbian 2022-01-28 on Raspberry 3B+ - Virtualization: None - Clients: Stock web client - Browser: Latest Edge/FF/Chrome desktop/mobile - FFmpeg Version: 5.0.1-Jellyfin (/usr/lib/jellyfin-ffmpeg/ffmpeg) - Playback Method: Video file on local drive - Hardware Acceleration: None - Plugins: None - Reverse Proxy: None - Base URL: http://<IPv4 address>:8096 - Networking: LAN - Storage: External hard drive ``` ### Jellyfin logs On playback: ``` Jul 24 03:21:19 raspberrypi jellyfin[14513]: [03:21:19] [DBG] GetPostedPlaybackInfo profile: {"Name": null, "Id": null, "Identification": null, "FriendlyName": null, "Manufacturer": null, "ManufacturerUrl": null, "ModelName": null, "ModelDescription": null, "ModelNumber": null, "ModelUrl": null, "SerialNumber": null, "EnableAlbumArtInDidl": false, "EnableSingleAlbumArtLimit": false, "EnableSingleSubtitleLimit": false, "SupportedMediaTypes": "Audio,Photo,Video", "UserId": null, "AlbumArtPn": null, "MaxAlbumArtWidth": null, "MaxAlbumArtHeight": null, "MaxIconWidth": null, "MaxIconHeight": null, "MaxStreamingBitrate": 120000000, "MaxStaticBitrate": 100000000, "MusicStreamingTranscodingBitrate": 384000, "MaxStaticMusicBitrate": 8000000, "SonyAggregationFlags": null, "ProtocolInfo": null, "TimelineOffsetSeconds": 0, "RequiresPlainVideoItems": false, "RequiresPlainFolders": false, "EnableMSMediaReceiverRegistrar": false, "IgnoreTranscodeByteRangeRequests": false, "XmlRootAttributes": [], "DirectPlayProfiles": [{"Container": "webm", "AudioCodec": "vorbis,opus", "VideoCodec": "vp8,vp9,av1", "Type": "Video", "$type": "DirectPlayProfile"}, {"Container": "mp4,m4v", "AudioCodec": "aac,mp3,opus,flac,vorbis", "VideoCodec": "h264,vp8,vp9,av1", "Type": "Video", "$type": "DirectPlayProfile"}, {"Container": "opus", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webm", "AudioCodec": "opus", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "mp3", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "aac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "m4a", "AudioCodec": "aac", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "m4b", "AudioCodec": "aac", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "flac", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webma", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "webm", "AudioCodec": "webma", "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "wav", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}, {"Container": "ogg", "AudioCodec": null, "VideoCodec": null, "Type": "Audio", "$type": "DirectPlayProfile"}], "TranscodingProfiles": [{"Container": "ts", "Type": "Audio", "VideoCodec": "", "AudioCodec": "aac", "Protocol": "hls", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 1, "SegmentLength": 0, "BreakOnNonKeyFrames": true, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "aac", "Type": "Audio", "VideoCodec": "", "AudioCodec": "aac", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "mp3", "Type": "Audio", "VideoCodec": "", "AudioCodec": "mp3", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "opus", "Type": "Audio", "VideoCodec": "", "AudioCodec": "opus", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "wav", "Type": "Audio", "VideoCodec": "", "AudioCodec": "wav", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "opus", "Type": "Audio", "VideoCodec": "", "AudioCodec": "opus", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Static", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "mp3", "Type": "Audio", "VideoCodec": "", "AudioCodec": "mp3", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Static", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "aac", "Type": "Audio", "VideoCodec": "", "AudioCodec": "aac", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Static", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "wav", "Type": "Audio", "VideoCodec": "", "AudioCodec": "wav", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Static", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "ts", "Type": "Video", "VideoCodec": "h264", "AudioCodec": "aac,mp3", "Protocol": "hls", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 1, "SegmentLength": 0, "BreakOnNonKeyFrames": true, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "webm", "Type": "Video", "VideoCodec": "vp8,vp9,av1,vpx", "AudioCodec": "vorbis,opus", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Streaming", "EnableSubtitlesInManifest": false, "MaxAudioChannels": "2", "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}, {"Container": "mp4", "Type": "Video", "VideoCodec": "h264", "AudioCodec": "aac,mp3,opus,flac,vorbis", "Protocol": "http", "EstimateContentLength": false, "EnableMpegtsM2TsMode": false, "TranscodeSeekInfo": "Auto", "CopyTimestamps": false, "Context": "Static", "EnableSubtitlesInManifest": false, "MaxAudioChannels": null, "MinSegments": 0, "SegmentLength": 0, "BreakOnNonKeyFrames": false, "Conditions": [], "$type": "TranscodingProfile"}], "ContainerProfiles": [], "CodecProfiles": [{"Type": "VideoAudio", "Conditions": [{"Condition": "Equals", "Property": "IsSecondaryAudio", "Value": "false", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": "aac", "Container": null, "$type": "CodecProfile"}, {"Type": "VideoAudio", "Conditions": [{"Condition": "Equals", "Property": "IsSecondaryAudio", "Value": "false", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": null, "Container": null, "$type": "CodecProfile"}, {"Type": "Video", "Conditions": [{"Condition": "NotEquals", "Property": "IsAnamorphic", "Value": "true", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "EqualsAny", "Property": "VideoProfile", "Value": "high|main|baseline|constrained baseline", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "EqualsAny", "Property": "VideoRangeType", "Value": "SDR", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "LessThanEqual", "Property": "VideoLevel", "Value": "52", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "NotEquals", "Property": "IsInterlaced", "Value": "true", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": "h264", "Container": null, "$type": "CodecProfile"}, {"Type": "Video", "Conditions": [{"Condition": "NotEquals", "Property": "IsAnamorphic", "Value": "true", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "EqualsAny", "Property": "VideoProfile", "Value": "main", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "EqualsAny", "Property": "VideoRangeType", "Value": "SDR", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "LessThanEqual", "Property": "VideoLevel", "Value": "120", "IsRequired": false, "$type": "ProfileCondition"}, {"Condition": "NotEquals", "Property": "IsInterlaced", "Value": "true", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": "hevc", "Container": null, "$type": "CodecProfile"}, {"Type": "Video", "Conditions": [{"Condition": "EqualsAny", "Property": "VideoRangeType", "Value": "SDR|HDR10|HLG", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": "vp9", "Container": null, "$type": "CodecProfile"}, {"Type": "Video", "Conditions": [{"Condition": "EqualsAny", "Property": "VideoRangeType", "Value": "SDR|HDR10|HLG", "IsRequired": false, "$type": "ProfileCondition"}], "ApplyConditions": [], "Codec": "av1", "Container": null, "$type": "CodecProfile"}], "ResponseProfiles": [{"Container": "m4v", "AudioCodec": null, "VideoCodec": null, "Type": "Video", "OrgPn": null, "MimeType": "video/mp4", "Conditions": [], "$type": "ResponseProfile"}], "SubtitleProfiles": [{"Format": "vtt", "Method": "External", "DidlMode": null, "Language": null, "Container": null, "$type": "SubtitleProfile"}, {"Format": "ass", "Method": "External", "DidlMode": null, "Language": null, "Container": null, "$type": "SubtitleProfile"}, {"Format": "ssa", "Method": "External", "DidlMode": null, "Language": null, "Container": null, "$type": "SubtitleProfile"}], "$type": "DeviceProfile"} Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [INF] User policy for [REDACTED]. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [DBG] Profile: Unknown Profile, Path: [REDACTED], isEligibleForDirectPlay: True, isEligibleForDirectStream: False Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [DBG] Profile: VideoAudioCodecProfile, DirectPlay=false. Reason=Unknown Profile.IsSecondaryAudio Condition: Equals. ConditionValue: false. IsRequired: False. Path: [REDACTED] Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [DBG] DirectPlay Result for Profile: Anonymous Profile, Path: [REDACTED], PlayMethod: null, AudioStreamIndex: 1, SubtitleStreamIndex: -1, Reasons: SecondaryAudioNotSupported Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [DBG] Transcode Result for Profile: Anonymous Profile, Path: [REDACTED], PlayMethod: Transcode, AudioStreamIndex: 1, SubtitleStreamIndex: -1, Reasons: SecondaryAudioNotSupported Jul 24 03:21:20 raspberrypi jellyfin[14513]: [03:21:20] [INF] StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=[REDACTED], AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=SecondaryAudioNotSupported ) media:/videos/de91dce8-abbe-9c68-93fa-e46f0ff8415e/master.m3u8?MediaSourceId=de91dce8abbe9c6893fae46f0ff8415e&VideoCodec=h264,h264&AudioCodec=mp3&AudioStreamIndex=1&VideoBitrate=139936000&AudioBitrate=64000&AudioSampleRate=48000&MaxFramerate=30&api_key=<token>&SubtitleMethod=Encode&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=21f31e38e6113e678863bbfafa6f78b5&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&h264-level=40&h264-videobitdepth=8&h264-profile=constrainedbaseline&h264-audiochannels=1&h264-rangetype=SDR&h264-deinterlace=true&TranscodeReasons=SecondaryAudioNotSupported ``` ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bug label 2026-02-07 00:20:52 +03:00
Author
Owner

@gaudat commented on GitHub (Jul 23, 2022):

ffprobe output for reference.

{
    "streams": [
        {
            "index": 0,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "Constrained Baseline",
            "codec_type": "video",
            "codec_tag_string": "H264",
            "codec_tag": "0x34363248",
            "width": 1920,
            "height": 1080,
            "coded_width": 1920,
            "coded_height": 1080,
            "closed_captions": 0,
            "film_grain": 0,
            "has_b_frames": 0,
            "sample_aspect_ratio": "1:1",
            "display_aspect_ratio": "16:9",
            "pix_fmt": "yuv420p",
            "level": 40,
            "chroma_location": "left",
            "field_order": "progressive",
            "refs": 1,
            "is_avc": "false",
            "nal_length_size": "0",
            "r_frame_rate": "30/1",
            "avg_frame_rate": "30/1",
            "time_base": "1/30",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 301,
            "duration": "10.033333",
            "bits_per_raw_sample": "8",
            "nb_frames": "301",
            "extradata_size": 36,
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            }
        },
        {
            "index": 1,
            "codec_name": "mp3",
            "codec_long_name": "MP3 (MPEG audio layer 3)",
            "codec_type": "audio",
            "codec_tag_string": "U[0][0][0]",
            "codec_tag": "0x0055",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 1,
            "channel_layout": "mono",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "3/125",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 418,
            "duration": "10.032000",
            "bit_rate": "64000",
            "nb_frames": "418",
            "extradata_size": 12,
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            }
        }
    ],
    "format": {
        "filename": "testvid.avi",
        "nb_streams": 2,
        "nb_programs": 0,
        "format_name": "avi",
        "format_long_name": "AVI (Audio Video Interleaved)",
        "start_time": "0.000000",
        "duration": "10.033333",
        "size": "144556",
        "bit_rate": "115260",
        "probe_score": 100,
        "tags": {
            "software": "Lavf59.16.100"
        }
    }
}
@gaudat commented on GitHub (Jul 23, 2022): ffprobe output for reference. ``` { "streams": [ { "index": 0, "codec_name": "h264", "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10", "profile": "Constrained Baseline", "codec_type": "video", "codec_tag_string": "H264", "codec_tag": "0x34363248", "width": 1920, "height": 1080, "coded_width": 1920, "coded_height": 1080, "closed_captions": 0, "film_grain": 0, "has_b_frames": 0, "sample_aspect_ratio": "1:1", "display_aspect_ratio": "16:9", "pix_fmt": "yuv420p", "level": 40, "chroma_location": "left", "field_order": "progressive", "refs": 1, "is_avc": "false", "nal_length_size": "0", "r_frame_rate": "30/1", "avg_frame_rate": "30/1", "time_base": "1/30", "start_pts": 0, "start_time": "0.000000", "duration_ts": 301, "duration": "10.033333", "bits_per_raw_sample": "8", "nb_frames": "301", "extradata_size": 36, "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0, "captions": 0, "descriptions": 0, "metadata": 0, "dependent": 0, "still_image": 0 } }, { "index": 1, "codec_name": "mp3", "codec_long_name": "MP3 (MPEG audio layer 3)", "codec_type": "audio", "codec_tag_string": "U[0][0][0]", "codec_tag": "0x0055", "sample_fmt": "fltp", "sample_rate": "48000", "channels": 1, "channel_layout": "mono", "bits_per_sample": 0, "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "3/125", "start_pts": 0, "start_time": "0.000000", "duration_ts": 418, "duration": "10.032000", "bit_rate": "64000", "nb_frames": "418", "extradata_size": 12, "disposition": { "default": 0, "dub": 0, "original": 0, "comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired": 0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0, "timed_thumbnails": 0, "captions": 0, "descriptions": 0, "metadata": 0, "dependent": 0, "still_image": 0 } } ], "format": { "filename": "testvid.avi", "nb_streams": 2, "nb_programs": 0, "format_name": "avi", "format_long_name": "AVI (Audio Video Interleaved)", "start_time": "0.000000", "duration": "10.033333", "size": "144556", "bit_rate": "115260", "probe_score": 100, "tags": { "software": "Lavf59.16.100" } } } ```
Author
Owner

@gaudat commented on GitHub (Jul 24, 2022):

Looks like this happens whenever there is no audio stream marked as default in the video file. This hits the IsSecondaryAudio case in GetTranscodeReasonForFailedCondition even though this has nothing to do with video streams.

@gaudat commented on GitHub (Jul 24, 2022): Looks like this happens whenever there is no audio stream marked as default in the video file. This hits the `IsSecondaryAudio` case in `GetTranscodeReasonForFailedCondition` even though this has nothing to do with video streams.
Author
Owner

@gaudat commented on GitHub (Jul 28, 2022):

I tested more video formats today on 10.9.0 with my ffprobe hack.

H264 AAC MP4 container = Direct play
H264 AAC MKV container = Remux, reason ContainerNotSupported
H264 AAC AVI container = h264 transcode to h264, AAC direct, reason ContainerNotSupported

H264 MP3 MP4 container = Direct play
H264 MP3 AVI container = h264 transcode to h264, MP3 direct, reason ContainerNotSupported

I expect the AVI files to remux instead of doing a full transcode. Not sure if there is something special with AVI container that prevents it from doing so.

@gaudat commented on GitHub (Jul 28, 2022): I tested more video formats today on 10.9.0 with my ffprobe hack. H264 AAC MP4 container = Direct play H264 AAC MKV container = Remux, reason ContainerNotSupported H264 AAC AVI container = h264 transcode to h264, AAC direct, reason ContainerNotSupported H264 MP3 MP4 container = Direct play H264 MP3 AVI container = h264 transcode to h264, MP3 direct, reason ContainerNotSupported I expect the AVI files to remux instead of doing a full transcode. Not sure if there is something special with AVI container that prevents it from doing so.
Author
Owner

@gaudat commented on GitHub (Jul 28, 2022):

Leaving notes here. Maybe it is bad sorting of transcoding profiles in "GetVideoTranscodeProfile".

@gaudat commented on GitHub (Jul 28, 2022): Leaving notes here. Maybe it is bad sorting of transcoding profiles in "GetVideoTranscodeProfile".
Author
Owner

@cvium commented on GitHub (Jul 28, 2022):

AVI is not a suitable container for H264. Its main codec is Xvid. I'm not even sure if ffmpeg can do a stream copy to mkv/mp4.

@cvium commented on GitHub (Jul 28, 2022): AVI is not a suitable container for H264. Its main codec is Xvid. I'm not even sure if ffmpeg can do a stream copy to mkv/mp4.
Author
Owner

@gaudat commented on GitHub (Aug 6, 2022):

Okay. These files are like about 0.5% of my library only. Worst case I could just repack them to MP4.

Stream copy of the H264 stream from AVI to MP4 works fine with the ffmpeg program bundled with Jellyfin. Not sure there are any complications when transcoding to a live streaming format.

I think it's better to open a new issue for this.

@gaudat commented on GitHub (Aug 6, 2022): Okay. These files are like about 0.5% of my library only. Worst case I could just repack them to MP4. Stream copy of the H264 stream from AVI to MP4 works fine with the ffmpeg program bundled with Jellyfin. Not sure there are any complications when transcoding to a live streaming format. I think it's better to open a new issue for this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#4057