Should Remux H264+AAC but Direct Streams if MKV

Hello,

and thanks for taking time having a lookie at this.

I have an issue where Jellyfin chooses to Direct Stream* H264+AAC rather than Remux* if Container is MKV, while it will Direct Play* the very same H264+AAC encode if Container is MP4.

As seen in the CMD output pasted below, it first says “isEligibleForDirectPlay: True” on both MP4 and MKV but then goes on to say “TranscodeReasons=VideoCodecNotSupported” when container is MKV. In the browser while playing the MKV it says H264 is direct, but that audio is being transcoded into MP3. When this exact same encode is inside MP4 container, it Direct Play* rather than Direct Stream*.

I also noticed that MediaInfo (in webclient) reports bitrate for AAC wrong if in MKV, but correct if in MP4.

My install of Jellyfin is “portable” on Windows, version: 10.6.4

Hardware acceleration is set to None, because I cant find documentation I understand to proper enable any on Windows.

I have not seen issue described happen when running on the Jellyfin alternatives.

Thanks again.
.

Direct Play* while container is MP4, CMD output says:

[22:00:41] [INF] [42] MediaBrowser.Api.Playback.MediaInfoService: User policy for martin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[22:00:41] [INF] [42] MediaBrowser.Api.Playback.MediaInfoService: Profile: Unknown Profile, Path: E:\movies\The Words (2012)\The Words (2012).mp4, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
[22:00:41] [INF] [42] MediaBrowser.Api.Playback.MediaInfoService: RemoteClientBitrateLimit: 50000000, RemoteIp: 127.0.0.1, IsInLocalNetwork: True
[22:00:41] [INF] [42] MediaBrowser.Api.Playback.MediaInfoService: Profile: Unknown Profile, Path: E:\movies\The Words (2012)\The Words (2012).mp4, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
[22:00:41] [INF] [42] MediaBrowser.Api.Playback.MediaInfoService: RemoteClientBitrateLimit: 50000000, RemoteIp: 127.0.0.1, IsInLocalNetwork: True
[22:00:41] [INF] [42] MediaBrowser.Api.Playback.MediaInfoService: Profile: Unknown Profile, Path: E:\movies\The Words (2012)\The Words (2012).mp4, isEligibleForDirectPlay: True, isEligibleForDirectStream: True

Direct Stream* when container is MKV, CMD output says :

[21:55:05] [INF] [25] MediaBrowser.Api.Playback.MediaInfoService: User policy for martin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[21:55:05] [INF] [25] MediaBrowser.Api.Playback.MediaInfoService: Profile: Unknown Profile, Path: E:\movies\The Words (2012)\The Words (2012).mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
[21:55:05] [INF] [25] MediaBrowser.Api.Playback.MediaInfoService: Profile: Unknown Profile, No direct play profiles found for Path: E:\movies\The Words (2012)\The Words (2012).mkv
[21:55:05] [INF] [25] MediaBrowser.Api.Playback.MediaInfoService: RemoteClientBitrateLimit: 50000000, RemoteIp: 127.0.0.1, IsInLocalNetwork: True
[21:55:05] [INF] [25] MediaBrowser.Api.Playback.MediaInfoService: Profile: Unknown Profile, Path: E:\movies\The Words (2012)\The Words (2012).mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
[21:55:05] [INF] [25] MediaBrowser.Api.Playback.MediaInfoService: Profile: Unknown Profile, No direct play profiles found for Path: E:\movies\The Words (2012)\The Words (2012).mkv
[21:55:05] [INF] [25] MediaBrowser.Api.Playback.MediaInfoService: RemoteClientBitrateLimit: 50000000, RemoteIp: 127.0.0.1, IsInLocalNetwork: True
[21:55:05] [INF] [25] MediaBrowser.Api.Playback.MediaInfoService: Profile: Unknown Profile, Path: E:\movies\The Words (2012)\The Words (2012).mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
[21:55:05] [INF] [25] MediaBrowser.Api.Playback.MediaInfoService: Profile: Unknown Profile, No direct play profiles found for Path: E:\movies\The Words (2012)\The Words (2012).mkv
[21:55:06] [INF] [17] MediaBrowser.Api.Playback.Hls.DynamicHlsService: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[21:55:06] [INF] [17] MediaBrowser.Api.Playback.Hls.DynamicHlsService: D:\jellyfin\system\ffmpeg.exe -fflags +genpts -f matroska,webm -i file:"E:\movies\The Words (2012)\The Words (2012).mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -vsync -1 -codec:a:0 libmp3lame -ac 2 -ab 192000  -copyts -avoid_negative_ts disabled -f hls -max_delay 5000000 -hls_time 6 -individual_header_trailer 0 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "D:\jellyfin\data\transcodes\b546fa50670e5b44e1c65b5bcbc22c52%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "D:\jellyfin\data\transcodes\b546fa50670e5b44e1c65b5bcbc22c52.m3u8"
[21:55:06] [WRN] [16] Emby.Server.Implementations.HttpServer.HttpListenerHost: HTTP Response 200 to 127.0.0.1. Time (slow): 0:00:00.5414164. http://localhost:8096/videos/b38a0354-b09c-4288-61fd-ffbf690732fb/hls1/main/0.ts?DeviceId=TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6ODEuMCkgR2Vja28vMjAxMDAxMDEgRmlyZWZveC84MS4wfDE2MDI0NzAzMjQ5MzI1&MediaSourceId=b38a0354b09c428861fdffbf690732fb&VideoCodec=h264&AudioCodec=mp3,aac&AudioStreamIndex=1&VideoBitrate=119808000&AudioBitrate=192000&PlaySessionId=0ea37a83c13146f1a4cb931115b11df5&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=421b2eb0a0a8914cb1332a81c62e555e&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&h264-deinterlace=true&TranscodeReasons=VideoCodecNotSupported

*= as per Jellyfin Documentation on “Types of Transcoding”:
Direct Play: Delivers the file with no modifications. Almost no additional load on the server.
Remux: Changes the container but leaves both audio and video streams untouched.
Direct Stream: Transcodes audio but leaves original video untouched.
Transcode: Transcodes the video stream.