Jellyfin Forum
SOLVED: Roku Express 4K: Error During 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: SOLVED: Roku Express 4K: Error During Playback (/t-solved-roku-express-4k-error-during-playback)



Roku Express 4K: Error During Playback - mjd - 2023-07-25

I have a file that plays back correctly on my "Roku3" and "Roku Premier 4k" but when trying to play on a "Roku Express 4K" I get an immediate "error during playback" message on the roku. Transcoding in general works on the server and most of the videos play correctly on the Roku Express, only a small percentage seem to give this error (I'm not sure what to look for in a commonality. I'm open to suggestions.)

I don't know the first thing about media formats and codecs so I don't know how to begin troubleshooting this other than giving all the relevant info. Any advice on what to look for or what to try next would be appreciated.

Roku Express 4K app version 1.6.6

Quote:Server: jellyfin
Version: 10.8.10
Operating System: Linux
Architecture: X64

Quote:Video
Title: 1080p HEVC SDR
Codec: HEVC
Profile: Main 10
Level: 120
Resolution: 1920x1080
Aspect ratio: 16:9
Interlaced: No
Framerate: 23.976025
Bitrate: 6159 kbps
Bit depth: 10 bit
Video range: SDR
Video range type: SDR
Pixel format: yuv420p10le
Ref frames: 1

Audio
Title: English - Dolby Digital - Stereo
Language: eng
Codec: AC3
Layout: stereo
Channels: 2 ch
Bitrate: 192 kbps
Sample rate: 48000 Hz
Default: No
Forced: No
External: No

Code:
[2023-07-24 10:11:41.530 -04:00] [INF] User policy for "user". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-07-24 10:11:41.537 -04:00] [INF]
StreamBuilder.BuildVideoItem(
    Profile="Anonymous Profile",
    Path="/mnt/video/TV Shows/redacted.mkv",
    AudioStreamIndex=1,
    SubtitleStreamIndex=-1
) => (
    PlayMethod=Transcode,
    TranscodeReason=AudioCodecNotSupported
)
"media:/videos/22ef73c5-f296-4ee8-cc96-0a25eb41d31c/master.m3u8?MediaSourceId=22ef73c5f2964ee8cc960a25eb41d31c&VideoCodec=hevc,h264,hevc&AudioCodec=aac&AudioStreamIndex=1&VideoBitrate=40000000&AudioBitrate=384000&MaxFramerate=23.976025&api_key=<token>&SubtitleMethod=Encode&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=89cdd9ffb1c22f64c4122b1541221b90&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=120&hevc-videobitdepth=10&hevc-profile=main10&hevc-rangetype=SDR,HDR10,HLG&TranscodeReasons=AudioCodecNotSupported"
[2023-07-24 10:11:42.275 -04:00] [INF] Playback stopped reported by app "Jellyfin Roku" "1.6.6" playing "redacted". Stopped at "0" ms



RE: Roku Express 4K: Error During Playback - TheDreadPirate - 2023-07-25

The log states that your Express 4K doesn't support AC3 and it was being converted to AAC. Is there a ffmpeg log? Same directory as the jellyfin log you included in your post. That would help us troubleshoot if something happened on the server side during the transcode. I can't imagine converting stereo AC3 to stereo AAC would be problematic.


RE: Roku Express 4K: Error During Playback - mjd - 2023-07-25

Code:
/videos/22ef73c5-f296-4ee8-cc96-0a25eb41d31c/hls1/main/0.ts

{"Protocol":0,"Id":"22ef73c5f2964ee8cc960a25eb41d31c","Path":"/mnt/video/TV Shows/redacted.mkv","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mkv,webm","Size":62205944,"Name":"Disk 01 - Episode Summaries","IsRemote":false,"ETag":"89cdd9ffb1c22f64c4122b1541221b90","RunTimeTicks":808000000,"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":null,"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":"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":6159004,"BitDepth":10,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"Height":1080,"Width":1920,"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":120,"IsAnamorphic":null},{"Codec":"ac3","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 - Dolby Digital - Stereo","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":"stereo","BitRate":192000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":2,"SampleRate":48000,"IsDefault":false,"IsForced":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"Profile":null,"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}],"MediaAttachments":[],"Formats":[],"Bitrate":6351004,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device cuda=cu:0 -filter_hw_device cu -autorotate 0 -i file:"/mnt/video/TV Shows/redacted.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_nvenc -preset p1 -b:v 2616000 -maxrate 2616000 -bufsize 5232000 -g:v:0 72 -keyint_min:v:0 72 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,1280)/2)*2:trunc(ow/a/2)*2,format=yuv420p" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c397755%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c397755.m3u8"


ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      57. 28.100 / 57. 28.100
  libavcodec    59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter    8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample  4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, matroska,webm, from 'file:/mnt/video/TV Shows/redacted.mkv':
  Metadata:
    encoder        : libebml v1.3.6 + libmatroska v1.4.9
    creation_time  : 2018-12-04T08:15:35.000000Z
    Writing frontend: StaxRip v1.9.0.0
  Duration: 00:01:20.80, start: 0.000000, bitrate: 6159 kb/s
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      BPS-eng        : 5965159
      DURATION-eng    : 00:01:20.789000000
      NUMBER_OF_FRAMES-eng: 1937
      NUMBER_OF_BYTES-eng: 60239906
      _STATISTICS_WRITING_APP-eng: mkvmerge v29.0.0 ('Like It Or Not') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-12-04 08:15:35
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      BPS-eng        : 192000
      DURATION-eng    : 00:01:20.800000000
      NUMBER_OF_FRAMES-eng: 2525
      NUMBER_OF_BYTES-eng: 1939200
      _STATISTICS_WRITING_APP-eng: mkvmerge v29.0.0 ('Like It Or Not') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-12-04 08:15:35
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (ac3 (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
Output #0, hls, to '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c397755.m3u8':
  Metadata:
    encoder        : Lavf59.27.100
  Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 2616 kb/s, 23.98 fps, 90k tbn (default)
    Metadata:
      encoder        : Lavc59.37.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 2616000/0/2616000 buffer size: 5232000 vbv_delay: N/A
  Stream #0:1: Audio: aac, 48000 Hz, stereo, s16, 256 kb/s
    Metadata:
      encoder        : Lavc59.37.100 libfdk_aac
frame=    1 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed=  0x   
frame=  37 fps=0.0 q=30.0 size=N/A time=00:00:01.45 bitrate=N/A speed=2.69x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c3977550.ts' for writing
frame=  89 fps= 84 q=35.0 size=N/A time=00:00:03.62 bitrate=N/A speed=3.42x   
frame=  139 fps= 89 q=30.0 size=N/A time=00:00:05.69 bitrate=N/A speed=3.64x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c3977551.ts' for writing
frame=  190 fps= 92 q=25.0 size=N/A time=00:00:07.78 bitrate=N/A speed=3.76x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c3977552.ts' for writing
frame=  240 fps= 93 q=27.0 size=N/A time=00:00:09.85 bitrate=N/A speed=3.83x   
frame=  289 fps= 94 q=30.0 size=N/A time=00:00:11.94 bitrate=N/A speed=3.88x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c3977553.ts' for writing
frame=  331 fps= 92 q=30.0 size=N/A time=00:00:13.50 bitrate=N/A speed=3.77x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c3977554.ts' for writing
frame=  384 fps= 94 q=31.0 size=N/A time=00:00:15.97 bitrate=N/A speed=3.92x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c3977555.ts' for writing
frame=  440 fps= 96 q=29.0 size=N/A time=00:00:18.28 bitrate=N/A speed=3.99x   
frame=  497 fps= 98 q=32.0 size=N/A time=00:00:20.48 bitrate=N/A speed=4.03x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c3977556.ts' for writing
frame=  557 fps= 99 q=29.0 size=N/A time=00:00:23.21 bitrate=N/A speed=4.14x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c3977557.ts' for writing
frame=  617 fps=101 q=26.0 size=N/A time=00:00:25.64 bitrate=N/A speed= 4.2x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c3977558.ts' for writing
frame=  667 fps=101 q=32.0 size=N/A time=00:00:27.58 bitrate=N/A speed=4.18x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c3977559.ts' for writing
frame=  724 fps=102 q=28.0 size=N/A time=00:00:29.95 bitrate=N/A speed=4.21x   
frame=  785 fps=103 q=30.0 size=N/A time=00:00:32.51 bitrate=N/A speed=4.27x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775510.ts' for writing
frame=  844 fps=104 q=16.0 size=N/A time=00:00:35.07 bitrate=N/A speed=4.32x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775511.ts' for writing
frame=  916 fps=106 q=23.0 size=N/A time=00:00:38.14 bitrate=N/A speed=4.42x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775512.ts' for writing
frame=  981 fps=107 q=19.0 size=N/A time=00:00:40.83 bitrate=N/A speed=4.47x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775513.ts' for writing
frame= 1039 fps=108 q=24.0 size=N/A time=00:00:43.37 bitrate=N/A speed= 4.5x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775514.ts' for writing
frame= 1115 fps=110 q=22.0 size=N/A time=00:00:46.25 bitrate=N/A speed=4.56x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775515.ts' for writing
frame= 1187 fps=112 q=24.0 size=N/A time=00:00:49.25 bitrate=N/A speed=4.63x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775516.ts' for writing
frame= 1266 fps=114 q=21.0 size=N/A time=00:00:52.65 bitrate=N/A speed=4.72x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775517.ts' for writing
frame= 1338 fps=115 q=15.0 size=N/A time=00:00:55.72 bitrate=N/A speed=4.78x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775518.ts' for writing
frame= 1383 fps=114 q=40.0 size=N/A time=00:00:57.53 bitrate=N/A speed=4.73x   
frame= 1428 fps=113 q=39.0 size=N/A time=00:00:59.39 bitrate=N/A speed=4.69x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775519.ts' for writing
frame= 1470 fps=111 q=41.0 size=N/A time=00:01:01.05 bitrate=N/A speed=4.63x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775520.ts' for writing
frame= 1525 fps=111 q=28.0 size=N/A time=00:01:03.36 bitrate=N/A speed=4.62x   
frame= 1574 fps=111 q=36.0 size=N/A time=00:01:05.53 bitrate=N/A speed=4.61x   
[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775521.ts' for writing


[q] command received. Exiting.

[hls @ 0x55d010091c00] Opening '/var/lib/jellyfin/transcodes/c1528c781dac64acffc689174c39775522.ts' for writing
frame= 1589 fps=110 q=37.0 Lsize=N/A time=00:01:06.19 bitrate=N/A speed=4.59x   
video:21256kB audio:2083kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown



RE: Roku Express 4K: Error During Playback - TheDreadPirate - 2023-07-25

This looks like a client side issue. All the Roku documentation indicates that it should be able to decode AC3 natively. No transcoding required. The jellyfin server and ffmpeg logs look normal. For giggles, can you post the media info for a video that playbacks correctly on this Express 4k?

I would submit an issue on the Jellyfin-Roku git.

https://github.com/jellyfin/jellyfin-roku/issues


RE: Roku Express 4K: Error During Playback - mjd - 2023-07-25

Ok, I feel a little dumb with this one - but I think I stumbled on the issue/fix. This particular roku was configured with HTTP Basic auth in the server URL - something like https://user:pass@jellyfin.example.com even though the server didn't use basic auth for anything. It worked for most things, but falls apart for loading transcoded videos. (I had completely forgotten this roku's server URL was set up like that 🤦). Removing the basic auth from the server url fixed the problem.