Audio Transcode switches off HDR playback - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Support (https://forum.jellyfin.org/f-support) +--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting) +--- Thread: Audio Transcode switches off HDR playback (/t-audio-transcode-switches-off-hdr-playback) |
Audio Transcode switches off HDR playback - dthree - 2024-08-28 I have a number of 4k files with AV1 encoding and OPUS audio for English, AC3 for Spanish, Italian, and French dubs. When playing the file with the AC3 audio tracks, the playback is direct and the TV engages HDR mode. Switching to the OPUS audio causes the audio to transcode, which would be fine, except that HDR is no longer recognized by the TV and the image is flat and washed-out. The video is not being transcoded and subtitles are off. Somehow JF is not telling the TV its HDR. I have Jellyfin 10.9.10 running in TrueNAS Scale, Dragonfish-24.04.2 Intel i5-12400f, 32G mem There is an Intel ARC video card handling HW encode/decode. AV1 or HEVC 4k 10bit playback is solid with the HW accel. I did find an interesting bit in the logs. When playing the stream with AC3 audio, the log shows this call for playback, Check out "setparams=color_primaries" Code: [2024-08-27 12:43:45.577 -04:00] [INF] [54] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -init_hw_device opencl=ocl@va -filter_hw_device qs -hwaccel qsv -hwaccel_output_format qsv -c:v av1_qsv -noautorotate -i file:\"/mnt/path/Video/Movies/movie.mkv\" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 av1_qsv -preset veryfast -b:v 11546608 -maxrate 11546608 -bufsize 23093216 -profile:v:0 main -level 50 -g:v:0 72 -keyint_min:v:0 72 -vf \"setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,hwmap=derive_device=opencl,tonemap_opencl=format=nv12:p=bt709:t=bt709:m=bt709:tonemap=bt2390:peak=100:desat=0,hwmap=derive_device=qsv:reverse=1:extra_hw_frames=16,format=qsv\" -codec:a:0 libopus -strict -2 -ac 2 -ab 192000 -ar 48000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename \"a4dcf19d58cf3cebae11adae395497ed-1.mp4\" -start_number 0 -hls_segment_filename \"/cache/transcodes/a4dcf19d58cf3cebae11adae395497ed%d.mp4\" -hls_playlist_type vod -hls_list_size 0 -y \"/cache/transcodes/a4dcf19d58cf3cebae11adae395497ed.m3u8\"" But when playing with the transcoded OPUS audio, it looks like this: Code: [2024-08-27 12:36:19.894 -04:00] [INF] [63] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -hwaccel qsv -hwaccel_output_format qsv -c:v av1_qsv -noautorotate -i file:\"/mnt/path/Video/Movies/movie.mkv\" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 av1_qsv -preset veryfast -b:v 11546608 -maxrate 11546608 -bufsize 23093216 -profile:v:0 main -level 50 -g:v:0 72 -keyint_min:v:0 72 -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_qsv=format=nv12\" -codec:a:0 libopus -strict -2 -ac 2 -ab 192000 -ar 48000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename \"9552872040325d6da98ca2fb8e0ba090-1.mp4\" -start_number 0 -hls_segment_filename \"/cache/transcodes/9552872040325d6da98ca2fb8e0ba090%d.mp4\" -hls_playlist_type vod -hls_list_size 0 -y \"/cache/transcodes/9552872040325d6da98ca2fb8e0ba090.m3u8\"" Why is the color_primaries param set for bt709 instead of bt2020 when the only difference is OPUS vs AC3? My workaround has been to just transcode to a new file with AC3 but that's a lot of manual work for something JF was built to do. I did see a similar bug report from 2022, but it was marked "completed" and nothing since. RE: Audio Transcode switches off HDR playback - TheDreadPirate - 2024-08-28 Both are transcoding the video, both being converted to SDR, only the first one is tone mapping. Can you share the media info for each file? And what client are you playing these videos on? RE: Audio Transcode switches off HDR playback - dthree - 2024-08-29 Small correction, it is only transcoding 7.1 OPUS, but 5.1 OPUS is playing directly. Effect is the same, only plays in HDR when not transcoding audio. Also, the looked at the logs after testing this again and found that there is no transcode log when playing this file with the 5.1 audio as it is playing directly, so that log snippet above for AC3 playback is incorrect. This is playing in the Jellyfin app on a Roku 4802X Here is the media info. Code: General RE: Audio Transcode switches off HDR playback - TheDreadPirate - 2024-08-29 What I'm seeing from Roku's docs, and various Reddit posts for Plex/Jellyfin/Emby on Roku, seems to indicate that Roku only supports 7.1 audio for Dolby Digital and Dolby Digital+. DTS is passed through. For everything else Roku's docs recommend AAC stereo, but do state they support OPUS in MKV but don't state how many channels. But the Reddit posts seem to indicate that 5.1 is the cap for non-Dolby codecs. RE: Audio Transcode switches off HDR playback - dthree - 2024-08-29 I get why it needs to transcode the audio for 7.1, and I can confirm it does this with AAC 7.1 files as well as OPUS 7.1 audio. The issue is that it should still direct play the video (Direct Stream as it's called in the docs) while transcoding just the audio, but it's not. When playing Dolby TruHD 7.1 files, the player correctly transcodes the audio to 5.1, and passes through the video, retaining the HDR. Here's an example of that. Code: [2024-08-29 15:20:08.082 -04:00] [INF] [49] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -readrate 10 -fflags +genpts -i file:\"/mnt/Movies/TrueHD_movie.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -tag:v:0 hvc1 -bsf:v hevc_mp4toannexb -start_at_zero -codec:a:0 libfdk_aac -ac 6 -ab 640000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 6 -hls_segment_type mpegts -start_number 0 -hls_segment_filename \"/cache/transcodes/6fd59b8ffbe8b93c5cf1996370358599%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/cache/transcodes/6fd59b8ffbe8b93c5cf1996370358599.m3u8\"" You can see it's copying the video track and transcoding the audio track to aac 6 channel. I'm not sure why this isn't the behavior for OPUS or AAC 7.1 audio tracks. RE: Audio Transcode switches off HDR playback - TheDreadPirate - 2024-08-29 I am pretty sure my Roku Ultra is also a 4802X (I only use it for testing and troubleshooting). Most of my media is AV1 + some variety of Dolby or DTS audio. I also have test instance of Jellyfin with some experimental media with OPUS and FLAC audio. I will do some testing when I get home. I only learned just now that Roku supports AV1 and that the chipset in the 4802X (Realtek RTD1319) supports AV1 decoding. |