Jellyfin Forum
Android "Source Error" when playing media - 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: Android "Source Error" when playing media (/t-android-source-error-when-playing-media)



Android "Source Error" when playing media - kevbo - 2023-12-03

I'm a long-time blu-ray ripping user. For some media, I re-encode to save space.  Recently I've started experimenting with HEVC/Opus in MKV. My primary use case is a Shield TV, so HEVC is OK.

My server is locally hosted Fedora 38/Jellyfin 10.8.12 using Fedora's RPMs, but a self-compiled version of jellyfin-mpeg (using an SRPM helpfully provided by another user).

I have re-encoded two TV series that I ripped from disc.  The first I used Handbrake with x265.  Playback works fine from both a Windows machine using the web client, and from the Shield TV using the Jellyfin client.

I've recently gotten an Arc A380 board.  The plan is to put it into the server, but I have issues I need to solve before I can do so, so I've put it into my Windows 10 desktop.  I then started encoding a second series using Handbrake, but using QuickSync (QSV) instead of x265.  The resulting encodes play just fine as straight files, and from the web interface:

[2023-12-02 23:04:57.036 -05:00] [INF] [59] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "jellyfin". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-12-02 23:04:57.038 -05:00] [INF] [59] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="/xxx/Friends (1994)/Season 01/Friends (1994) S01e02 The One With The Sonogram At The End.mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=VideoCodecNotSupported ) "mediaConfused-facevideos/8d4bc4c9-a700-4e89-346a-c09d67f7d8db/master.m3u8?MediaSourceId=8d4bc4c9a7004e89346ac09d67f7d8db&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=119616000&AudioBitrate=384000&MaxFramerate=23.976025&api_key=<token>&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=13ee6f0a016de49e2d913d9b77cc69db&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=120&hevc-videobitdepth=10&hevc-profile=main10&TranscodeReasons=VideoCodecNotSupported"
[2023-12-02 23:04:57.342 -05:00] [INF] [59] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2023-12-02 23:04:57.343 -05:00] [INF] [59] Jellyfin.Api.Helpers.TranscodingJobHelper: "ffmpeg" "-analyzeduration 200M -f matroska,webm -autorotate 0 -i file:\"/xxx/Friends (1994)/Season 01/Friends (1994) S01e02 The One With The Sonogram At The End.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -preset veryfast -crf 23 -maxrate 5136910 -bufsize 10273820 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames:0 \"expr:gte(t,0+n_forced*3)\" -sc_threshold:v:0 0 -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1920\,1080*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1920/a\,1080))/2)*2,format=yuv420p\" -codec:a:0 libfdk_aac -ac 2 -ab 384000 -af \"volume=2\" -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/b2b40b927ae2a756973ad084795f26ef%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/var/lib/jellyfin/transcodes/b2b40b927ae2a756973ad084795f26ef.m3u8\""

This plays correctly.

However, if I play the same file using both the Shield TV, and the android client on my Pixel 4a (Android 13), I get only this in the log:

[2023-12-02 23:12:29.203 -05:00] [INF] [75] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "jellyfin". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-12-02 23:12:29.204 -05:00] [INF] [75] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Jellyfin Android", Path="/xxx/Friends (1994)/Season 01/Friends (1994) S01e02 The One With The Sonogram At The End.mkv", AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "mediaConfused-facevideos/8d4bc4c9-a700-4e89-346a-c09d67f7d8db/stream.mkv?MediaSourceId=8d4bc4c9a7004e89346ac09d67f7d8db&Static=true&VideoCodec=hevc&AudioCodec=opus&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=13ee6f0a016de49e2d913d9b77cc69db"

That's it. On the pixel, a message pops up at the bottom of the screen saying "Source Error".  On the Shield TV, the media just doesn't play, and shows a 0:00 run time.

I tried enabling the "upload error logs to the server" options, but nothing is showing up.

On the Shield, I experimented with changing the media player to MPV. That worked.  Findroid on the phone also works (unsrprisingly). I think the problem is something very specific to ExoPlayer and these media files I've made using QSV.

My dilema is: I don't know where to go next.  What can I do to try to get more information than "Source Error"?

I was actually surprised to see "DirectPlay", because I suspected that ExoPlayer can't play the Opus audio, but it has no trouble with the x265 encoded show:

[2023-12-02 23:17:11.060 -05:00] [INF] [85] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "jellyfin". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-12-02 23:17:11.061 -05:00] [INF] [85] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Jellyfin Android", Path="/xxx/That 70's Show (199Nerd-face/Season 05/That '70S Show (199Nerd-face S05e23 Nobody's Fault But Mine (2).mkv", AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "mediaConfused-facevideos/cb43f241-77a8-a567-92aa-dac6937664b6/stream.mkv?MediaSourceId=cb43f24177a8a56792aadac6937664b6&Static=true&VideoCodec=hevc&AudioCodec=opus&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=ab62ac05009c0eedb79407969ffe9196"

This plays just find in the Android client. (Again, both media were made by the same version of Handbrake, both transcoding the audio to Opus, and the video to HEVC, the working using x265 and the non-working QSV.)

What can I do to try to further figure out what's going on here?

Thank you,

Kevin


RE: Android "Source Error" when playing media - tmsrxzar - 2023-12-03

since neither of your devices support the same things you should come at this from 2 angles

f.e. your pixel doesnt show it supports h265 main 10 https://www.devicespecifications.com/en/model/c624541a and my experience with shield i couldn't get opus to work

so you could be having 1 issue on 1 device and a different on the other

try video only and eliminate that from the equation, ffmpeg -i (infile) -map 0:v -c copy (testfile).mkv


RE: Android "Source Error" when playing media - kevbo - 2023-12-04

Thanks. I have done as you suggested and made a media file with just the video, but had the same problem. The thing is, the fact that the x265 encoded videos work and the QSV don't is what is tripping me up: both are HEVC Main 10 L4 and Opus.

I'm also just targeting the phone for now, because it is sitting next to me as I'm sitting at my PC doing the work. I think both devices can handle Opus audio, and the fact that the Pixel 4a plays the second video, and some UHD rips, just fine leads me to believe that it handles HEVC10 Main 10.

I think there's something screwy about the QSV encode, but I don't know how to get any log info to figure out why the Android device is saying "Source Error". That's really what I'm after: how can I get debugging/logging info from the client as it is running. I was originally thinking about how to do that on the Shield TV, but since my phone is having the problem too, it is probably easier to work with it.


Here's the one that works:

General
Unique ID : 45256732827076681419788273058715399969 (0x220C21339AE201571B2C32801709F721)
Complete name : \\xxx\That 70's Show (199Nerd-face\Season 01\That '70s Show (199Nerd-face s01e01 That '70s Pilot.mkv
Format : Matroska
Format version : Version 4
File size : 725 MiB
Duration : 22 min 33 s
Overall bit rate : 4 494 kb/s
Frame rate : 23.976 FPS
Movie name : That '70s Show (199Nerd-face s01e01 That '70s Pilot
Encoded date : 2023-11-13 14:02:22 UTC
Writing application : HandBrake 1.6.1 2023012300
Writing library : Lavf59.27.100
ErrorDetectionType : Per level 1

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L4@Main
Codec ID : V_MPEGH/ISO/HEVC
Duration : 22 min 33 s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 0)
Bit depth : 10 bits
Writing library : x265 3.5+1-f0c1022b6:[Windows][GCC 10.2.0][64 bit] 10bit
Encoding settings : cpuid=1111039 / frame-threads=4 / numa-pools=16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x1080 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-eob / no-eos / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=4 / b-adapt=0 / b-pyramid / bframe-bias=0 / rc-lookahead=15 / lookahead-slices=6 / scenecut=40 / no-hist-scenecut / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=2 / selective-sao=4 / no-early-skip / rskip / fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=24.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=1 / chromaloc-top=0 / chromaloc-bottom=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-sbrc / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass / no-mcstf
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Audio
ID : 2
Format : Opus
Codec ID : A_OPUS
Duration : 22 min 33 s
Channel(s) : 6 channels
Channel layout : L R C Lb Rb LFE
Sampling rate : 48.0 kHz
Compression mode : Lossy
Delay relative to video : -7 ms
Title : Surround 5.1
Language : English
Default : Yes
Forced : No

Menu
00:00:00.000 : Chapter 1
00:04:24.514 : Chapter 2
00:13:33.313 : Chapter 3
00:21:58.359 : Chapter 4


Here's the one that doesn't (the video-only version as suggested):

General
Unique ID : 49557309443681099956979934690330263555 (0x254863FFCF18134E0DFEA7EAE287C003)
Complete name : \\bravo\0movie\children\tv\tv_dvd\Friends (1994)\Season 01\Friends (1994) S01e01 The One Where Monica Gets A Roommate.mkv
Format : Matroska
Format version : Version 4
File size : 711 MiB
Duration : 22 min 48 s
Overall bit rate : 4 358 kb/s
Frame rate : 23.976 FPS
Movie name : Friends (1994) s01e01 The One Where Monica Gets a Roommate
Writing application : Lavf60.3.100
Writing library : Lavf60.3.100
ErrorDetectionType : Per level 1

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L4@High
Codec ID : V_MPEGH/ISO/HEVC
Duration : 22 min 48 s
Bit rate : 4 272 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.086
Stream size : 697 MiB (98%)
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Menu
00:00:00.007 : Chapter 1
00:05:10.150 : Chapter 2
00:14:11.691 : Chapter 3
00:22:09.085 : Chapter 4