Jellyfin Forum
SOLVED: Movie exits with error code due "audio codec not supported" - 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: SOLVED: Movie exits with error code due "audio codec not supported" (/t-solved-movie-exits-with-error-code-due-audio-codec-not-supported)

Pages: 1 2


Movie exits with error code due "audio codec not supported" - ohshitgorillas - 2023-10-15

I am trying to watch a movie via the Jellyfin app for Roku TV, but at certain points throughout the movie, it exits with an extremely helpful and descriptive message "An error was encountered while playing this item."... if I go back to play the movie again, it will play for a few more seconds, then exit again.

The logs are below:

Code:
[2023-10-15 14:41:46.740 -07:00] [INF] [87] Emby.Server.Implementations.Session.SessionManager: Current/Max sessions for user "media": 0/0
[2023-10-15 14:41:46.748 -07:00] [INF] [87] Emby.Server.Implementations.Session.SessionManager: Creating new access token for user d99f2414-c961-4759-b49d-95e0e29ee804
[2023-10-15 14:46:46.253 -07:00] [INF] [109] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "media". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-10-15 14:46:46.301 -07:00] [INF] [109] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="/movies/The Lord of the Rings/2001. The Fellowship of the Ring/Part 1.mkv", AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=Transcode, TranscodeReason=AudioCodecNotSupported ) "media:/videos/662c21e9-37f9-164e-d730-f17c9d70c125/master.m3u8?MediaSourceId=662c21e937f9164ed730f17c9d70c125&VideoCodec=hevc,h264,hevc&AudioCodec=aac,ac3&AudioStreamIndex=1&VideoBitrate=40000000&AudioBitrate=640000&MaxFramerate=23.976025&api_key=<token>&SubtitleMethod=Encode&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=038a8e5949ffcc54017f98cb8171a0ba&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-rangetype=SDR,HDR10,HLG&TranscodeReasons=AudioCodecNotSupported"
[2023-10-15 14:46:46.998 -07:00] [INF] [61] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2023-10-15 14:46:47.012 -07:00] [INF] [61] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -fflags +genpts  -i file:\"/movies/The Lord of the Rings/2001. The Fellowship of the Ring/Part 1.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 \"/config/data/transcodes/7f00b6e0444d84d2d2d6d59ddfb83388%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/config/data/transcodes/7f00b6e0444d84d2d2d6d59ddfb83388.m3u8\""
[2023-10-15 14:46:47.635 -07:00] [WRN] [45] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://10.0.0.238:8096/videos/662c21e9-37f9-164e-d730-f17c9d70c125/hls1/main/0.ts?DeviceId=c409ab06-f0e6-57f2-a917-0a05f751e8c3&MediaSourceId=662c21e937f9164ed730f17c9d70c125&VideoCodec=hevc,h264,hevc&AudioCodec=aac,ac3&AudioStreamIndex=1&VideoBitrate=40000000&AudioBitrate=640000&MaxFramerate=23.976025&PlaySessionId=950a2e1f5f284f39865568864df91744&api_key=cb86c5cd40444e10b31f5f8cb2e4397b&SubtitleMethod=Encode&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=038a8e5949ffcc54017f98cb8171a0ba&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-rangetype=SDR,HDR10,HLG&TranscodeReasons=AudioCodecNotSupported&runtimeTicks=0&actualSegmentLengthTicks=64230000" to "10.0.0.27" in 0:00:00.6498463 with Status Code 200
[2023-10-15 14:47:02.249 -07:00] [INF] [61] Jellyfin.Api.Helpers.TranscodingJobHelper: Stopping ffmpeg process with q command for "/config/data/transcodes/7f00b6e0444d84d2d2d6d59ddfb83388.m3u8"
[2023-10-15 14:47:02.271 -07:00] [INF] [61] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 0
[2023-10-15 14:47:02.274 -07:00] [INF] [61] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2023-10-15 14:47:02.274 -07:00] [INF] [61] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -ss 00:10:06.105 -fflags +genpts  -i file:\"/movies/The Lord of the Rings/2001. The Fellowship of the Ring/Part 1.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 101 -hls_segment_filename \"/config/data/transcodes/7f00b6e0444d84d2d2d6d59ddfb83388%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/config/data/transcodes/7f00b6e0444d84d2d2d6d59ddfb83388.m3u8\""
[2023-10-15 14:47:03.386 -07:00] [WRN] [61] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://10.0.0.238:8096/videos/662c21e9-37f9-164e-d730-f17c9d70c125/hls1/main/101.ts?DeviceId=c409ab06-f0e6-57f2-a917-0a05f751e8c3&MediaSourceId=662c21e937f9164ed730f17c9d70c125&VideoCodec=hevc,h264,hevc&AudioCodec=aac,ac3&AudioStreamIndex=1&VideoBitrate=40000000&AudioBitrate=640000&MaxFramerate=23.976025&PlaySessionId=950a2e1f5f284f39865568864df91744&api_key=cb86c5cd40444e10b31f5f8cb2e4397b&SubtitleMethod=Encode&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=038a8e5949ffcc54017f98cb8171a0ba&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-rangetype=SDR,HDR10,HLG&TranscodeReasons=AudioCodecNotSupported&runtimeTicks=6061050000&actualSegmentLengthTicks=66320000" to "10.0.0.27" in 0:00:01.1403929 with Status Code 200
[2023-10-15 14:51:13.821 -07:00] [INF] [48] Jellyfin.Api.Helpers.TranscodingJobHelper: Stopping ffmpeg process with q command for "/config/data/transcodes/7f00b6e0444d84d2d2d6d59ddfb83388.m3u8"
[2023-10-15 14:51:13.841 -07:00] [INF] [48] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 0
[2023-10-15 14:51:13.842 -07:00] [INF] [48] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) "/config/data/transcodes/7f00b6e0444d84d2d2d6d59ddfb83388.m3u8"
[2023-10-15 14:51:15.924 -07:00] [INF] [48] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Jellyfin Roku" "1.6.6" playing "The Lord of the Rings: The Fellowship of the Ring". Stopped at "852000" ms
[2023-10-15 14:51:15.961 -07:00] [WRN] [48] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://10.0.0.238:8096/Sessions/Playing/Stopped" to "10.0.0.27" in 0:00:02.1471463 with Status Code 204
[2023-10-15 14:54:58.759 -07:00] [INF] [36] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "media". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-10-15 14:54:58.760 -07:00] [INF] [36] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="/movies/The Lord of the Rings/2001. The Fellowship of the Ring/Part 1.mkv", AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=Transcode, TranscodeReason=AudioCodecNotSupported ) "media:/videos/662c21e9-37f9-164e-d730-f17c9d70c125/master.m3u8?MediaSourceId=662c21e937f9164ed730f17c9d70c125&VideoCodec=hevc,h264,hevc&AudioCodec=aac,ac3&AudioStreamIndex=1&VideoBitrate=40000000&AudioBitrate=640000&MaxFramerate=23.976025&api_key=<token>&SubtitleMethod=Encode&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=038a8e5949ffcc54017f98cb8171a0ba&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-rangetype=SDR,HDR10,HLG&TranscodeReasons=AudioCodecNotSupported"
[2023-10-15 14:54:59.399 -07:00] [INF] [36] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2023-10-15 14:54:59.400 -07:00] [INF] [36] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -ss 00:14:06.679 -fflags +genpts  -i file:\"/movies/The Lord of the Rings/2001. The Fellowship of the Ring/Part 1.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 141 -hls_segment_filename \"/config/data/transcodes/493a95384e891c35030def5f07c06dd2%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/config/data/transcodes/493a95384e891c35030def5f07c06dd2.m3u8\""
[2023-10-15 14:55:00.434 -07:00] [WRN] [68] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://10.0.0.238:8096/videos/662c21e9-37f9-164e-d730-f17c9d70c125/hls1/main/141.ts?DeviceId=c409ab06-f0e6-57f2-a917-0a05f751e8c3&MediaSourceId=662c21e937f9164ed730f17c9d70c125&VideoCodec=hevc,h264,hevc&AudioCodec=aac,ac3&AudioStreamIndex=1&VideoBitrate=40000000&AudioBitrate=640000&MaxFramerate=23.976025&PlaySessionId=eaf62023ad3d4e94b70ab8893e47cc13&api_key=cb86c5cd40444e10b31f5f8cb2e4397b&SubtitleMethod=Encode&TranscodingMaxAudioChannels=6&RequireAvc=false&Tag=038a8e5949ffcc54017f98cb8171a0ba&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=153&hevc-videobitdepth=10&hevc-profile=main10&hevc-rangetype=SDR,HDR10,HLG&TranscodeReasons=AudioCodecNotSupported&runtimeTicks=8466790000&actualSegmentLengthTicks=60060000" to "10.0.0.27" in 0:00:01.0401778 with Status Code 200
[2023-10-15 14:55:10.503 -07:00] [INF] [70] Jellyfin.Api.Helpers.TranscodingJobHelper: Stopping ffmpeg process with q command for "/config/data/transcodes/493a95384e891c35030def5f07c06dd2.m3u8"
[2023-10-15 14:55:10.536 -07:00] [INF] [70] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 0
[2023-10-15 14:55:10.537 -07:00] [INF] [70] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) "/config/data/transcodes/493a95384e891c35030def5f07c06dd2.m3u8"

I can get as far as determining that the audio codec is at the heart of the problem. The file properties say the codec is AC-3 (ATSC A/52) surround 5.1, sample rate 48 kHz. My research indicates that the Jellyfin Roku TV app should have native support for this. I am asking my TV to downsample to stereo, but that shouldn't affect Jellyfin's ability to play back the item, right?

Any suggestions?


RE: Movie exits with error code due "audio codec not supported" - Deleted User - 2023-10-15

that snippet shows it being transcoded to the client so original file properties may not be as relevant

can you provide the ffmpeg log pasted to https://sourceb.in


RE: Movie exits with error code due "audio codec not supported" - ohshitgorillas - 2023-10-15

no problem

https://pasteb.in/?c077bca9f3820c15#7DvcmEnM2RQUeHw5L72A9EbwUBFU4T1gDEuTzMjF4ACM


RE: Movie exits with error code due "audio codec not supported" - Deleted User - 2023-10-15

from that it looks like the client aborted or throttle transcodes is turned on in the server playback config

if it is turned on, try with it turned off

if not, try lowering the bitrate the client is receiving to rule out bandwidth limitations


RE: Movie exits with error code due "audio codec not supported" - ohshitgorillas - 2023-10-15

Thanks, throttle transcodes is turned off.

Bandwidth limitations are unlikely since I'm at home and everything is going over gigabit LAN. Even the Roku TV has a direct LAN connection. I can watch plenty of other 4K content, even with hardware transcoding, without a problem. It's just this series apparently, and it's always played fine on Plex and Emby.

How do I lower the bitrate and which bitrate am I lowering?


RE: Movie exits with error code due "audio codec not supported" - Deleted User - 2023-10-15

"User defined maximum video bitrate" in the client settings on the Roku

the original looks like it's reported 32M so i would test with 20


RE: Movie exits with error code due "audio codec not supported" - ohshitgorillas - 2023-10-19

If I'm reading this right, that only affects remote streams. This is a local stream over LAN.


RE: Movie exits with error code due "audio codec not supported" - Deleted User - 2023-10-19

check in the client settings - on the client


RE: Movie exits with error code due "audio codec not supported" - ohshitgorillas - 2023-10-20

Oh, my bad. And yes, 20 Mbps prevents the error from popping up.

That said, I'd really prefer to watch things in full res on my home network if possible. Is there another way?

It's interesting that reducing the bandwidth helps resolve an audio codec problem.


RE: Movie exits with error code due "audio codec not supported" - Deleted User - 2023-10-20

that is consistent with the log, both would indicate a bandwidth issue

don't get too hung up on the wording of the error message being about audio, it could have received no audio and then couldn't play because of that
(i have received the same message when the subtitles caused an error)

need to focus on the network, i am not familiar with roku specifically so here are some things to try and i hope someone with more info will chime in

if roku supports ethernet, compare
if no ethernet consider a cheap usb to ethernet adapter, if possible
re-encode the video and perform some tests - copy audio, downgrade video bitrate keeping resolution
anything that can be used to test lan bandwidth to the server
- i usually use a reverse netcat with dd from dev/urandom to push the bandwidth at its max, but i am almost sure that is not an option for you
if the wireless router can be moved closer, out of cabinets, etc - wireless is very temperamental and can have interference
is the roku wifi 2.4, 5 or 6ghz

i apologize i cannot be more specific but i feel the issue has been identified, the "why" is the new goal, once the why is found then a resolution can present itself