jellyfin-android icon indicating copy to clipboard operation
jellyfin-android copied to clipboard

App doesn't differentiate between 10 and 8 bit H265 decoder support

Open Mive82 opened this issue 10 months ago • 13 comments

Describe the bug

I have a device that supports hardware decoding of 8-bit H265, but not 10-bit. As a result, the app tries to direct play 10-bit H265 content and never starts.

Skimming through the code, it seems that the app only checks if an H265 decoder exists, but doesn't actually check if the decoder supports the required profile (Main10). Switching to software decoding works, but the device can't keep up.
Additionally, it seems the server's API endpoint also doesn't differentiate between them, so that's probably another issue.

If transcoding is forced, the content is then transcoded to h264 which works fine.

Direct playing 8-bit H265 also works fine.

This behavior is observed both on the latest release (2.6.2) and on the master branch ( 62d31221a7e0e14d12cfa437a02ca6326460ffdd ) at the time of writing.

It is the same on the stock rom (A11, OneUI 3), as well as LineageOS.

I've included logs from the debug build, the only thing changed is the server url.
logs1.log

Logs

--------- beginning of kernel
--------- beginning of main
--------- beginning of system
2025-01-05 19:28:03.994 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [RouterHistory] history update [object Object], https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:28:04.115 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [ViewManagerPage] loading view [%s] user/menu/index.html, https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:28:04.116 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [ConnectionRequired] connection state undefined, https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:28:04.188 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Requesting url without automatic networking: https://jellyfin.local/QuickConnect/Enabled, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:28:04.189 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Requesting url without automatic networking: https://jellyfin.local/Users/d6c001a83a6f40f3b91aa70b3128d102, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:28:06.569 14193-14286 Parcel                  org.jellyfin.mobile.debug            W  Expecting binder but got null!
2025-01-05 19:28:06.749 14193-14286 OpenGLRenderer          org.jellyfin.mobile.debug            E  Unable to match the desired swap behavior.
2025-01-05 19:28:08.524 14193-14286 BufferQueueProducer     org.jellyfin.mobile.debug            E  [VRI[MainActivity]#1(BLAST Consumer)1](id:377100000001,api:0,p:-1,c:14193) disconnect: not connected (req=1)
2025-01-05 19:28:08.524 14193-14286 libEGL                  org.jellyfin.mobile.debug            W  EGLNativeWindowType 0xb1607e08 disconnect failed
2025-01-05 19:28:08.524 14193-14286 OpenGLRenderer          org.jellyfin.mobile.debug            D  endAllActiveAnimators on 0xb0f0d5a0 (RippleDrawable) with handle 0xb5af9b50
2025-01-05 19:28:10.774 14193-14193 LeakCanary              org.jellyfin.mobile.debug            D  Watching instance of androidx.constraintlayout.widget.ConstraintLayout (org.jellyfin.mobile.settings.SettingsFragment received Fragment#onDestroyView() callback (references to its views should be cleared to prevent leaks)) with key 1bc97315-cf78-4b62-a780-9e8744d3d361
2025-01-05 19:28:10.775 14193-14193 LeakCanary              org.jellyfin.mobile.debug            D  Watching instance of androidx.lifecycle.SavedStateHandlesVM (androidx.lifecycle.SavedStateHandlesVM received ViewModel#onCleared() callback) with key fea01f6e-b24c-4b8c-b333-4f44b43e48ed
2025-01-05 19:28:10.775 14193-14193 LeakCanary              org.jellyfin.mobile.debug            D  Watching instance of leakcanary.internal.ViewModelClearedWatcher (leakcanary.internal.ViewModelClearedWatcher received ViewModel#onCleared() callback) with key 67710b69-0fe8-489b-8374-d46f5750bb36
2025-01-05 19:28:10.775 14193-14193 LeakCanary              org.jellyfin.mobile.debug            D  Watching instance of androidx.loader.app.LoaderManagerImpl$LoaderViewModel (androidx.loader.app.LoaderManagerImpl$LoaderViewModel received ViewModel#onCleared() callback) with key d7fa8f25-e4ee-4053-87d5-4fafb8895f1f
2025-01-05 19:28:10.777 14193-14193 LeakCanary              org.jellyfin.mobile.debug            D  Watching instance of org.jellyfin.mobile.settings.SettingsFragment (org.jellyfin.mobile.settings.SettingsFragment received Fragment#onDestroy() callback) with key a7ffa270-546f-4ec3-817d-4ab48b9eebed
2025-01-05 19:28:11.904 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [RouterHistory] history update [object Object], https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:28:11.912 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [ViewManagerPage] restoring view [%s] home.html, https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:28:11.913 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [viewContainer] tryRestoreView [object Object], https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:28:11.918 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [ConnectionRequired] connection state undefined, https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:28:15.927 14193-14227 in.mobile.debug         org.jellyfin.mobile.debug            W  Cleared Reference was only reachable from finalizer (only reported once)
2025-01-05 19:28:15.938 14193-14227 in.mobile.debug         org.jellyfin.mobile.debug            I  Explicit concurrent copying GC freed 52435(2404KB) AllocSpace objects, 6(312KB) LOS objects, 49% free, 8593KB/16MB, paused 515us,76us total 160.843ms
2025-01-05 19:28:18.282 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [RouterHistory] history update [object Object], https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:28:18.291 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [ViewManagerPage] loading view [%s] itemDetails/index.html, https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:28:18.306 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [ConnectionRequired] connection state undefined, https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:28:18.453 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Requesting url without automatic networking: https://jellyfin.local/Users/d6c001a83a6f40f3b91aa70b3128d102/Items/103695b264472ed2b851280df63d5bf9, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:28:18.564 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Requesting url without automatic networking: https://jellyfin.local/Shows/650024a659f37c9794ebf2e759cb699d/Episodes?SeasonId=53cd271ce11eb9f4a8c9acb243f0014d&UserId=d6c001a83a6f40f3b91aa70b3128d102&Fields=ItemCounts%2CPrimaryImageAspectRatio%2CCanDelete%2CMediaSourceCount, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:28:18.943 14193-14193 AssistStructure         org.jellyfin.mobile.debug            I  Flattened final assist data: 4940 bytes, containing 1 windows, 12 views
2025-01-05 19:28:19.182 14193-14193 WebView                 org.jellyfin.mobile.debug            V  offset:295.6770935058594 currentStart:0 currentEnd:1114, https://jellyfin.local/web/4113.585d97fba57546eefcc4.chunk.js (1)
2025-01-05 19:28:19.260 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Sending web socket message: KeepAlive, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:28:19.361 14193-14193 WebView                 org.jellyfin.mobile.debug            V  Received KeepAlive from server., https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:28:21.441 14193-14286 Parcel                  org.jellyfin.mobile.debug            W  Expecting binder but got null!
2025-01-05 19:28:21.488 14193-14286 Parcel                  org.jellyfin.mobile.debug            W  Expecting binder but got null!
2025-01-05 19:28:21.515 14193-14286 OpenGLRenderer          org.jellyfin.mobile.debug            E  Unable to match the desired swap behavior.
2025-01-05 19:28:22.601 14193-14286 BufferQueueProducer     org.jellyfin.mobile.debug            E  [VRI[PopupWindow:7e5e0cf]#2(BLAST Consumer)2](id:377100000002,api:0,p:-1,c:14193) disconnect: not connected (req=1)
2025-01-05 19:28:22.601 14193-14286 libEGL                  org.jellyfin.mobile.debug            W  EGLNativeWindowType 0xb16179e8 disconnect failed
2025-01-05 19:28:22.601 14193-14286 OpenGLRenderer          org.jellyfin.mobile.debug            D  endAllActiveAnimators on 0xb0f28d50 (ListView) with handle 0xb5af7bd0
2025-01-05 19:28:27.707 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Requesting url without automatic networking: https://jellyfin.local/Shows/650024a659f37c9794ebf2e759cb699d/Episodes?IsVirtualUnaired=false&IsMissing=false&UserId=d6c001a83a6f40f3b91aa70b3128d102&Fields=Chapters%2CTrickplay, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:28:27.861 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Requesting url without automatic networking: https://jellyfin.local/Users/d6c001a83a6f40f3b91aa70b3128d102/Items/103695b264472ed2b851280df63d5bf9, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:28:28.220 14193-14609 cr_HttpFlagsLoader      org.jellyfin.mobile.debug            D  [HttpFlagsLoader.java:73] Not loading HTTP flags because they are disabled in the manifest
2025-01-05 19:28:28.349 14193-14193 cr_CronetLibraryLoader  org.jellyfin.mobile.debug            I  Cronet version: 119.0.6045.31, arch: armv8l
2025-01-05 19:28:28.425 14193-14193 ExoPlayerImpl           org.jellyfin.mobile.debug            I  Init 8e70acb [ExoPlayerLib/2.19.1] [tdgsi_a64_ab, TrebleDroid with GApps, unknown, 33]
2025-01-05 19:28:28.533 14193-14193 in.mobile.debug         org.jellyfin.mobile.debug            W  Accessing hidden method Landroid/media/AudioTrack;->getLatency()I (unsupported, reflection, allowed)
2025-01-05 19:28:28.549 14193-14193 DefaultRenderersFactory org.jellyfin.mobile.debug            I  Loaded FfmpegAudioRenderer.
2025-01-05 19:28:28.694 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  audioAttributes [eventTime=0.55, mediaPos=0.00, window=0, 3,0,1,1]
2025-01-05 19:28:28.775 14193-14623 TrafficStats            org.jellyfin.mobile.debug            D  tagSocket(272) with statsTag=0xffffffff, statsUid=-1
2025-01-05 19:28:28.778 14193-14624 TrafficStats            org.jellyfin.mobile.debug            D  tagSocket(271) with statsTag=0xffffffff, statsUid=-1
2025-01-05 19:28:28.846 14193-14631 TrafficStats            org.jellyfin.mobile.debug            D  tagSocket(277) with statsTag=0xffffffff, statsUid=-1
2025-01-05 19:28:28.943 14193-14624 in.mobile.debug         org.jellyfin.mobile.debug            W  Long monitor contention with owner OkHttp https://jellyfin.local/... (14623) at void android.icu.util.ULocale$AliasReplacer.loadAliasData()(ULocale.java:1361) waiters=0 in void android.icu.util.ULocale$AliasReplacer.loadAliasData() for 112ms
2025-01-05 19:28:28.981 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  surfaceSize [eventTime=0.84, mediaPos=0.00, window=0, 0, 0]
2025-01-05 19:28:28.996 14193-14193 Choreographer           org.jellyfin.mobile.debug            I  Skipped 60 frames!  The application may be doing too much work on its main thread.
2025-01-05 19:28:29.030 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  surfaceSize [eventTime=0.89, mediaPos=0.00, window=0, 1920, 1200]
2025-01-05 19:28:29.116 14193-14217 OpenGLRenderer          org.jellyfin.mobile.debug            I  Davey! duration=1112ms; Flags=0, FrameTimelineVsyncId=472801, IntendedVsync=3997940730214, Vsync=3998939054794, InputEventId=0, HandleInputStart=3998943821793, AnimationStart=3998943826178, PerformTraversalsStart=3998952113870, DrawStart=3998980149909, FrameDeadline=3997974118696, FrameInterval=3998943663332, FrameStartTime=16638743, SyncQueued=3998986172178, SyncStart=3998986309755, IssueDrawCommandsStart=3998986887024, SwapBuffers=3999041440870, FrameCompleted=3999053533986, DequeueBufferDuration=53770, QueueBufferDuration=845500, GpuCompleted=3999053533986, SwapBuffersCompleted=3999043619024, DisplayPresentTime=3984825984880, CommandSubmissionCompleted=3999041440870, 
2025-01-05 19:28:29.757 14193-14193 in.mobile.debug         org.jellyfin.mobile.debug            W  Verification of org.jellyfin.sdk.model.api.BaseItemDto org.jellyfin.sdk.model.api.BaseItemDto$$serializer.deserialize(kotlinx.serialization.encoding.Decoder) took 190.495ms (large method) (67560.51 bytecodes/s) (218536B approximate peak alloc)
2025-01-05 19:28:29.868 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  timeline [eventTime=1.72, mediaPos=0.00, window=0, periodCount=1, windowCount=1, reason=PLAYLIST_CHANGED
2025-01-05 19:28:29.869 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    period [?]
2025-01-05 19:28:29.869 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    window [?, seekable=false, dynamic=true]
2025-01-05 19:28:29.869 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  ]
2025-01-05 19:28:29.870 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  mediaItem [eventTime=1.73, mediaPos=0.00, window=0, reason=PLAYLIST_CHANGED]
2025-01-05 19:28:29.906 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  state [eventTime=1.76, mediaPos=0.00, window=0, BUFFERING]
2025-01-05 19:28:29.968 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  playWhenReady [eventTime=1.82, mediaPos=0.00, window=0, true, USER_REQUEST]
2025-01-05 19:28:30.037 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  timeline [eventTime=1.89, mediaPos=0.00, window=0, period=0, periodCount=1, windowCount=1, reason=SOURCE_UPDATE
2025-01-05 19:28:30.037 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    period [?]
2025-01-05 19:28:30.037 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    window [?, seekable=false, dynamic=false]
2025-01-05 19:28:30.037 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  ]
2025-01-05 19:28:30.038 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  loading [eventTime=1.89, mediaPos=0.00, window=0, period=0, true]
2025-01-05 19:28:31.942 14193-14209 in.mobile.debug         org.jellyfin.mobile.debug            I  Background young concurrent copying GC freed 127698(5436KB) AllocSpace objects, 5(164KB) LOS objects, 26% free, 12MB/16MB, paused 299us,88us total 106.076ms
2025-01-05 19:28:32.651 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  timeline [eventTime=4.51, mediaPos=0.00, window=0, period=0, periodCount=1, windowCount=1, reason=SOURCE_UPDATE
2025-01-05 19:28:32.652 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    period [1611.02]
2025-01-05 19:28:32.653 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    window [1611.02, seekable=true, dynamic=false]
2025-01-05 19:28:32.653 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  ]
2025-01-05 19:28:32.675 14193-14619 MediaCodecInfo          org.jellyfin.mobile.debug            D  NoSupport [codec.profileLevel, hvc1.2.4.L120.90, video/hevc] [OMX.Exynos.hevc.dec, video/hevc] [tdgsi_a64_ab, TrebleDroid with GApps, unknown, 33]
2025-01-05 19:28:32.676 14193-14619 MediaCodecInfo          org.jellyfin.mobile.debug            D  NoSupport [codec.profileLevel, hvc1.2.4.L120.90, video/hevc] [c2.android.hevc.decoder, video/hevc] [tdgsi_a64_ab, TrebleDroid with GApps, unknown, 33]
2025-01-05 19:28:32.678 14193-14619 MediaCodecInfo          org.jellyfin.mobile.debug            D  NoSupport [codec.profileLevel, hvc1.2.4.L120.90, video/hevc] [OMX.Exynos.hevc.dec, video/hevc] [tdgsi_a64_ab, TrebleDroid with GApps, unknown, 33]
2025-01-05 19:28:32.784 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  videoEnabled [eventTime=4.64, mediaPos=0.00, window=0, period=0]
2025-01-05 19:28:32.786 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  audioEnabled [eventTime=4.64, mediaPos=0.00, window=0, period=0]
2025-01-05 19:28:32.806 14193-14619 DMCodecAdapterFactory   org.jellyfin.mobile.debug            I  Creating an asynchronous MediaCodec adapter for track type video
2025-01-05 19:28:32.806 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  tracks [eventTime=4.66, mediaPos=0.00, window=0, period=0
2025-01-05 19:28:32.806 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    group [
2025-01-05 19:28:32.813 14193-14193 EventLogger             org.jellyfin.mobile.debug            D      [X] Track:0, id=1, mimeType=video/hevc, codecs=hvc1.2.4.L120.90, res=1920x1080, color=BT709/Limited range/SDR SMPTE 170M, language=und, selectionFlags=[default], supported=NO_EXCEEDS_CAPABILITIES
2025-01-05 19:28:32.814 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    ]
2025-01-05 19:28:32.814 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    group [
2025-01-05 19:28:32.814 14193-14193 EventLogger             org.jellyfin.mobile.debug            D      [X] Track:0, id=2, mimeType=audio/eac3, channels=2, sample_rate=48000, language=en, label=English, selectionFlags=[default], supported=YES
2025-01-05 19:28:32.814 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    ]
2025-01-05 19:28:32.814 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    group [
2025-01-05 19:28:32.815 14193-14193 EventLogger             org.jellyfin.mobile.debug            D      [ ] Track:0, id=3, mimeType=audio/eac3, channels=2, sample_rate=48000, language=ja, label=Japanese, supported=YES
2025-01-05 19:28:32.815 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    ]
2025-01-05 19:28:32.815 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    group [
2025-01-05 19:28:32.815 14193-14193 EventLogger             org.jellyfin.mobile.debug            D      [X] Track:0, id=4, mimeType=text/x-ssa, language=en, label=English / Forced, selectionFlags=[default], supported=YES
2025-01-05 19:28:32.815 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    ]
2025-01-05 19:28:32.815 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    group [
2025-01-05 19:28:32.815 14193-14193 EventLogger             org.jellyfin.mobile.debug            D      [ ] Track:0, id=5, mimeType=text/x-ssa, language=en, label=English / Full, supported=YES
2025-01-05 19:28:32.815 14193-14193 EventLogger             org.jellyfin.mobile.debug            D    ]
2025-01-05 19:28:32.815 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  ]
2025-01-05 19:28:32.821 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  downstreamFormat [eventTime=4.68, mediaPos=0.00, window=0, period=0, id=1, mimeType=video/hevc, codecs=hvc1.2.4.L120.90, res=1920x1080, color=BT709/Limited range/SDR SMPTE 170M, language=und, selectionFlags=[default]]
2025-01-05 19:28:32.857 14193-14647 OMXClient               org.jellyfin.mobile.debug            I  IOmx service obtained
2025-01-05 19:28:32.985 14193-14646 MediaCodec              org.jellyfin.mobile.debug            I  MediaCodec will operate in async mode
2025-01-05 19:28:32.987 14193-14646 MediaCodec              org.jellyfin.mobile.debug            D  flushMediametrics
2025-01-05 19:28:32.991 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  connecting to surface 0xb1604ba8, reason connectToSurface
2025-01-05 19:28:32.991 14193-14646 MediaCodec              org.jellyfin.mobile.debug            I  [OMX.Exynos.hevc.dec] setting surface generation to 14533633
2025-01-05 19:28:32.992 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  disconnecting from surface 0xb1604ba8, reason connectToSurface(reconnect)
2025-01-05 19:28:32.992 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  connecting to surface 0xb1604ba8, reason connectToSurface(reconnect)
2025-01-05 19:28:33.002 14193-14647 ACodec                  org.jellyfin.mobile.debug            I  codec does not support config priority (err -1010)
2025-01-05 19:28:33.012 14193-14619 MediaCodec              org.jellyfin.mobile.debug            D  keep callback message for reclaim
2025-01-05 19:28:33.168 14193-14647 SurfaceUtils            org.jellyfin.mobile.debug            D  set up nativeWindow 0xb1604ba8 for 1920x1080, color 0x105, rotation 0, usage 0x402900
2025-01-05 19:28:33.175 14193-14619 MediaCodecInfo          org.jellyfin.mobile.debug            D  NoSupport [codec.profileLevel, hvc1.2.4.L120.90, video/hevc] [OMX.Exynos.hevc.dec, video/hevc] [tdgsi_a64_ab, TrebleDroid with GApps, unknown, 33]
2025-01-05 19:28:33.176 14193-14619 MediaCodecRenderer      org.jellyfin.mobile.debug            W  Format exceeds selected codec's capabilities [id=1, mimeType=video/hevc, codecs=hvc1.2.4.L120.90, res=1920x1080, color=BT709/Limited range/SDR SMPTE 170M, language=und, selectionFlags=[default], OMX.Exynos.hevc.dec]
2025-01-05 19:28:33.182 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  videoDecoderInitialized [eventTime=5.04, mediaPos=0.00, window=0, period=0, OMX.Exynos.hevc.dec]
2025-01-05 19:28:33.185 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  videoInputFormat [eventTime=5.04, mediaPos=0.00, window=0, period=0, id=1, mimeType=video/hevc, codecs=hvc1.2.4.L120.90, res=1920x1080, color=BT709/Limited range/SDR SMPTE 170M, language=und, selectionFlags=[default]]
2025-01-05 19:28:33.227 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  downstreamFormat [eventTime=5.08, mediaPos=0.00, window=0, period=0, id=2, mimeType=audio/eac3, channels=2, sample_rate=48000, language=en, label=English, selectionFlags=[default]]
2025-01-05 19:28:33.392 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  audioDecoderInitialized [eventTime=5.25, mediaPos=0.00, window=0, period=0, ffmpegLavc58.54.100-eac3]
2025-01-05 19:28:33.395 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  audioInputFormat [eventTime=5.25, mediaPos=0.00, window=0, period=0, id=2, mimeType=audio/eac3, channels=2, sample_rate=48000, language=en, label=English, selectionFlags=[default]]
2025-01-05 19:28:33.575 14193-14209 in.mobile.debug         org.jellyfin.mobile.debug            I  Background young concurrent copying GC freed 34302(1194KB) AllocSpace objects, 0(0B) LOS objects, 4% free, 15MB/16MB, paused 256us,191us total 153.358ms
2025-01-05 19:28:33.708 14193-14209 in.mobile.debug         org.jellyfin.mobile.debug            I  Background concurrent copying GC freed 47923(2736KB) AllocSpace objects, 17(1188KB) LOS objects, 49% free, 13MB/26MB, paused 639us,143us total 113.920ms
2025-01-05 19:28:35.605 14193-14209 in.mobile.debug         org.jellyfin.mobile.debug            I  Background young concurrent copying GC freed 84050(2247KB) AllocSpace objects, 0(0B) LOS objects, 6% free, 24MB/26MB, paused 9.137ms,183us total 98.787ms
2025-01-05 19:28:35.924 14193-14209 in.mobile.debug         org.jellyfin.mobile.debug            I  Background concurrent copying GC freed 89940(2515KB) AllocSpace objects, 10(176KB) LOS objects, 47% free, 26MB/50MB, paused 162us,113us total 173.328ms
2025-01-05 19:28:37.840 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  loading [eventTime=9.69, mediaPos=0.00, window=0, period=0, false]
2025-01-05 19:28:49.213 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Sending web socket message: KeepAlive, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:28:49.227 14193-14193 WebView                 org.jellyfin.mobile.debug            V  Received KeepAlive from server., https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:29:18.554 14193-14286 BufferQueueProducer     org.jellyfin.mobile.debug            E  [VRI[MainActivity]#0(BLAST Consumer)0](id:377100000000,api:0,p:-1,c:14193) disconnect: not connected (req=1)
2025-01-05 19:29:18.554 14193-14286 libEGL                  org.jellyfin.mobile.debug            W  EGLNativeWindowType 0xea1979e8 disconnect failed
2025-01-05 19:29:18.554 14193-14286 OpenGLRenderer          org.jellyfin.mobile.debug            E  Unable to match the desired swap behavior.
2025-01-05 19:29:18.557 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  surfaceSize [eventTime=50.41, mediaPos=0.00, window=0, period=0, 1200, 1920]
2025-01-05 19:29:18.559 14193-14193 SurfaceSyncer           org.jellyfin.mobile.debug            E  Failed to find sync for id=0
2025-01-05 19:29:18.559 14193-14193 SurfaceSyncer           org.jellyfin.mobile.debug            E  Failed to find sync for id=1
2025-01-05 19:29:18.610 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  surfaceSize [eventTime=50.47, mediaPos=0.00, window=0, period=0, 1200, 1830]
2025-01-05 19:29:18.612 14193-14193 SurfaceSyncer           org.jellyfin.mobile.debug            E  Failed to find sync for id=0
2025-01-05 19:29:18.612 14193-14193 SurfaceSyncer           org.jellyfin.mobile.debug            E  Failed to find sync for id=1
2025-01-05 19:29:18.612 14193-14193 SurfaceSyncer           org.jellyfin.mobile.debug            E  Failed to find sync for id=2
2025-01-05 19:29:19.313 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Sending web socket message: KeepAlive, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:29:19.315 14193-14193 WebView                 org.jellyfin.mobile.debug            V  Received KeepAlive from server., https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:29:19.827 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  connecting to surface 0xb1614788, reason connectToSurface
2025-01-05 19:29:19.827 14193-14646 MediaCodec              org.jellyfin.mobile.debug            I  [OMX.Exynos.hevc.dec] setting surface generation to 14533634
2025-01-05 19:29:19.827 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  disconnecting from surface 0xb1614788, reason connectToSurface(reconnect)
2025-01-05 19:29:19.827 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  connecting to surface 0xb1614788, reason connectToSurface(reconnect)
2025-01-05 19:29:19.829 14193-14647 SurfaceUtils            org.jellyfin.mobile.debug            D  set up nativeWindow 0xb1614788 for 1920x1080, color 0x105, rotation 0, usage 0x402900
2025-01-05 19:29:19.830 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  disconnecting from surface 0xb1604ba8, reason disconnectFromSurface
2025-01-05 19:29:19.830 14193-14646 Surface                 org.jellyfin.mobile.debug            E  freeAllBuffers: 4 buffers were freed while being dequeued!
2025-01-05 19:29:19.832 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  surfaceSize [eventTime=51.69, mediaPos=0.00, window=0, period=0, 0, 0]
2025-01-05 19:29:19.839 14193-14193 LeakCanary              org.jellyfin.mobile.debug            D  Watching instance of android.widget.FrameLayout (org.jellyfin.mobile.player.ui.PlayerFragment received Fragment#onDestroyView() callback (references to its views should be cleared to prevent leaks)) with key 03b28476-a5ad-4edf-be8f-3f19d484ad21
2025-01-05 19:29:19.919 14193-14193 ExoPlayerImpl           org.jellyfin.mobile.debug            I  Release 8e70acb [ExoPlayerLib/2.19.1] [tdgsi_a64_ab, TrebleDroid with GApps, unknown, 33] [goog.exo.core, goog.exo.exoplayer, goog.exo.decoder, goog.exo.ui, goog.exo.cronet, goog.exo.datasource, goog.exo.extractor, goog.exo.ffmpeg]
2025-01-05 19:29:19.926 14193-14619 MediaCodec              org.jellyfin.mobile.debug            D  keep callback message for reclaim
2025-01-05 19:29:19.929 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  connecting to surface 0xb1611528, reason connectToSurface
2025-01-05 19:29:19.930 14193-14646 MediaCodec              org.jellyfin.mobile.debug            I  [OMX.Exynos.hevc.dec] setting surface generation to 14533635
2025-01-05 19:29:19.930 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  disconnecting from surface 0xb1611528, reason connectToSurface(reconnect)
2025-01-05 19:29:19.930 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  connecting to surface 0xb1611528, reason connectToSurface(reconnect)
2025-01-05 19:29:19.931 14193-14647 SurfaceUtils            org.jellyfin.mobile.debug            D  set up nativeWindow 0xb1611528 for 1920x1080, color 0x105, rotation 0, usage 0x402900
2025-01-05 19:29:19.931 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  disconnecting from surface 0xb1614788, reason disconnectFromSurface
2025-01-05 19:29:19.932 14193-14646 Surface                 org.jellyfin.mobile.debug            E  freeAllBuffers: 4 buffers were freed while being dequeued!
2025-01-05 19:29:19.944 14193-14193 LeakCanary              org.jellyfin.mobile.debug            D  Watching instance of org.jellyfin.mobile.player.PlayerViewModel (org.jellyfin.mobile.player.PlayerViewModel received ViewModel#onCleared() callback) with key abb48f1a-a910-441a-a632-d556821c62bb
2025-01-05 19:29:19.945 14193-14193 LeakCanary              org.jellyfin.mobile.debug            D  Watching instance of androidx.lifecycle.SavedStateHandlesVM (androidx.lifecycle.SavedStateHandlesVM received ViewModel#onCleared() callback) with key 2561bbd7-ec06-472a-84bd-0708bf11ccbf
2025-01-05 19:29:19.945 14193-14193 LeakCanary              org.jellyfin.mobile.debug            D  Watching instance of leakcanary.internal.ViewModelClearedWatcher (leakcanary.internal.ViewModelClearedWatcher received ViewModel#onCleared() callback) with key 0e4b3439-b7e6-4bd0-8f06-cb903caa1789
2025-01-05 19:29:19.945 14193-14193 LeakCanary              org.jellyfin.mobile.debug            D  Watching instance of androidx.loader.app.LoaderManagerImpl$LoaderViewModel (androidx.loader.app.LoaderManagerImpl$LoaderViewModel received ViewModel#onCleared() callback) with key d8c2046a-9f3b-4912-ab17-a11905c63071
2025-01-05 19:29:19.946 14193-14646 SurfaceUtils            org.jellyfin.mobile.debug            D  disconnecting from surface 0xb1611528, reason disconnectFromSurface
2025-01-05 19:29:19.948 14193-14646 MediaCodec              org.jellyfin.mobile.debug            D  flushMediametrics
2025-01-05 19:29:19.948 14193-14646 MediaCodec              org.jellyfin.mobile.debug            D  flushMediametrics
2025-01-05 19:29:20.031 14193-14193 LeakCanary              org.jellyfin.mobile.debug            D  Watching instance of org.jellyfin.mobile.player.ui.PlayerFragment (org.jellyfin.mobile.player.ui.PlayerFragment received Fragment#onDestroy() callback) with key 9dbc0bb3-0682-43e1-b899-00586061de09
2025-01-05 19:29:20.082 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  videoDisabled [eventTime=51.94, mediaPos=0.00, window=0, period=0]
2025-01-05 19:29:20.083 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  audioDecoderReleased [eventTime=51.94, mediaPos=0.00, window=0, period=0, ffmpegLavc58.54.100-eac3]
2025-01-05 19:29:20.085 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  audioDisabled [eventTime=51.94, mediaPos=0.00, window=0, period=0]
2025-01-05 19:29:20.086 14193-14193 EventLogger             org.jellyfin.mobile.debug            D  videoDecoderReleased [eventTime=51.94, mediaPos=0.00, window=0, period=0, OMX.Exynos.hevc.dec]
2025-01-05 19:29:20.125 14193-14286 BufferQueueProducer     org.jellyfin.mobile.debug            E  [VRI[MainActivity]#0(BLAST Consumer)0](id:377100000000,api:0,p:-1,c:14193) disconnect: not connected (req=1)
2025-01-05 19:29:20.125 14193-14286 libEGL                  org.jellyfin.mobile.debug            W  EGLNativeWindowType 0xea1979e8 disconnect failed
2025-01-05 19:29:20.125 14193-14286 OpenGLRenderer          org.jellyfin.mobile.debug            E  Unable to match the desired swap behavior.
2025-01-05 19:29:22.971 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [RouterHistory] history update [object Object], https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:29:22.986 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [ViewManagerPage] restoring view [%s] home.html, https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:29:22.986 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [viewContainer] tryRestoreView [object Object], https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:29:22.993 14193-14193 WebView                 org.jellyfin.mobile.debug            V  [ConnectionRequired] connection state undefined, https://jellyfin.local/web/main.jellyfin.bundle.js?eae5280d42d3c188a26a?deferred=true&ts=1736101604798 (2)
2025-01-05 19:29:23.162 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Requesting url without automatic networking: https://jellyfin.local/Users/d6c001a83a6f40f3b91aa70b3128d102/Items/Resume?Limit=12&Recursive=true&Fields=PrimaryImageAspectRatio&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&EnableTotalRecordCount=false&MediaTypes=Video, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:29:23.163 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Requesting url without automatic networking: https://jellyfin.local/Users/d6c001a83a6f40f3b91aa70b3128d102/Items/Resume?Limit=12&Recursive=true&Fields=PrimaryImageAspectRatio&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&EnableTotalRecordCount=false&MediaTypes=Audio, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:29:23.165 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Requesting url without automatic networking: https://jellyfin.local/Users/d6c001a83a6f40f3b91aa70b3128d102/Items/Resume?Limit=12&Recursive=true&Fields=PrimaryImageAspectRatio&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CThumb&EnableTotalRecordCount=false&MediaTypes=Book, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:29:23.168 14193-14193 WebView                 org.jellyfin.mobile.debug            I  Requesting url without automatic networking: https://jellyfin.local/Shows/NextUp?Limit=24&Fields=PrimaryImageAspectRatio%2CDateCreated%2CPath%2CMediaSourceCount&UserId=d6c001a83a6f40f3b91aa70b3128d102&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CBanner%2CThumb&EnableTotalRecordCount=false&DisableFirstEpisode=false&NextUpDateCutoff=2024-01-06T18%3A29%3A23.165Z&EnableResumable=false&EnableRewatching=false, https://jellyfin.local/web/node_modules.jellyfin-apiclient.bundle.js?eae5280d42d3c188a26a (2)
2025-01-05 19:29:24.994 14193-14227 in.mobile.debug         org.jellyfin.mobile.debug            I  Explicit concurrent copying GC freed 42043(2698KB) AllocSpace objects, 588(38MB) LOS objects, 49% free, 7869KB/15MB, paused 600us,98us total 153.809ms
2025-01-05 19:29:29.477 14193-14286 BufferQueueProducer     org.jellyfin.mobile.debug            E  [VRI[MainActivity]#0(BLAST Consumer)0](id:377100000000,api:0,p:-1,c:14193) disconnect: not connected (req=1)
2025-01-05 19:29:29.478 14193-14286 libEGL                  org.jellyfin.mobile.debug            W  EGLNativeWindowType 0xea1979e8 disconnect failed

Application version

2.6.2

Where did you install the app from?

Google Play

Device information

Samsung Galaxy Tab A 10.1 (2019) (aka SM-T510/SM-T515)

Android version

Android 13, LineageOS 20

Jellyfin server version

10.10.3

Which video player implementations does this bug apply to?

  • [ ] Web player (default)
  • [x] Integrated player (ExoPlayer)
  • [ ] External player (VLC, mpv, MX Player)

Mive82 avatar Jan 05 '25 18:01 Mive82

I observe the same issues.

I have an old Lenovo YT3-X90F tablet with an integrated projector.

It supports h265@8bit only.

Jellyfish doesn't transcode to x264 on playback errors or when selecting Bitrates higher than the media has.

I have videos that are around 1300KBits in HEVC, but if I select 480p@1500 jellyfin doesn't transcode, instead - I guess - it thinks that direct play/stream is more efficient....?

kirides avatar Jan 12 '25 20:01 kirides

I am facing same issue, when HEVC file is played on RK3229 it says playback error, re-try. It thinks it can play the HEVC, which it can't, so it doesn't request H264 transcode, meaning: it'd be nice to be able to set acceptable formats per device.

Ginpachi98 avatar Feb 11 '25 14:02 Ginpachi98

I have the same issue on a "xiaomi redmi tab SE 8.7" tablet (codename "flare" - model reference 24075RP89G - SOC mediatek MT8786X - GPU mali-G52 MC2).

This SOC only supports hardware accelerated h265/HEVC 8bit decoding through a codec named "c2.mtk.hevc.decoder".

When using the app integrated video player for playing a HEVC Main 10@L4 video it wrongly assumes the device is capable of decoding it through hardware acceleration using the above codec, so it requests a direct play from the server, and of course the playback fails because it lacks the hardware capabilities.

Strangely, when trying to play a HEVC Main 10@L5 video instead of L4 level, it detects correctly that the mtk hevc decoder codec is not capable of handling it and falls back correctly to transcoding, so the video playback works.

When using the app web player option this issue does not happen, it detects correctly that the device cant decode HEVC 10bit in both cases and falls back to transcoding. But when using the app web player option the playback is a bit laggy and lacks volume / brightness touch controls while with the integrated player the playback is smooth. When i use chrome directly for web playback instead of using the app it feels less laggy than using the app web player option, but it's still not as smooth as the integrated player of the app.

I did a logcat recording when the issue happens and isolated the relevant log parts:

Format exceeds selected codec's capabilities
03-02 17:45:35.568   950   969 E VPUD    : [Err, h265_dec_init] The format HW not support

03-02 17:45:35.620 32101 32297 D MediaCodecInfo: NoSupport [codec.profileLevel, hvc1.2.4.L120.90, video/hevc] [c2.mtk.hevc.decoder, video/hevc] [flare, 24075RP89G, Google, 35]
03-02 17:45:35.620 32101 32326 W jellyfin.mobile: AIBinder_linkToDeath is being called with a non-null cookie and no onUnlink callback set. This might not be intended. AIBinder_DeathRecipient_setOnUnlinked should be called first.
03-02 17:45:35.621 32101 32297 E ExoPlayerImplInternal: Playback error
03-02 17:45:35.621 32101 32297 E ExoPlayerImplInternal:   com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/hevc, hvc1.2.4.L120.90, -1, und, [1920, 800, -1.0, null], [-1, -1]), format_supported=NO_EXCEEDS_CAPABILITIES

Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: c2.mtk.hevc.decoder

03-02 17:45:36.245 32101 32334 D MediaCodecInfo: NoSupport [codec.profileLevel, hvc1.2.4.L120.90, video/hevc] [c2.mtk.hevc.decoder, video/hevc] [flare, 24075RP89G, Google, 35]

03-02 17:45:36.347 32101 32334 W MediaCodecRenderer: Format exceeds selected codec's capabilities [id=1, mimeType=video/hevc, codecs=hvc1.2.4.L120.90, res=1920x800, language=und, selectionFlags=[default], c2.mtk.hevc.decoder]

03-02 17:45:36.353   950   969 I VPUD    : == vdec_codec_msg_handler() == msg_id = 0xA001, codec_id = 1
03-02 17:45:36.354   950   969 E VPUD    : [Err] This HW not support 10bit
03-02 17:45:36.354   950   969 E VPUD    : [Err, h265_dec_init] Fail to open Vdec Drv H265 instance! -88
03-02 17:45:36.354   950   969 E VPUD    : [Err, h265_dec_init] The format HW not support
03-02 17:45:36.354   950   969 E VPUD    : [Err] Error code 6
03-02 17:45:36.354   950   969 I VPUD    : [ERROR] eVDecDrvInit fail (2)!!

03-02 17:45:36.356 32101 32333 D CCodec  : Component "c2.mtk.hevc.decoder" returned error: 0xe

03-02 17:45:36.360 32101 32334 E MediaCodecVideoRenderer:   android.media.MediaCodec$CodecException: Error 0x80000000
03-02 17:45:36.361 32101 32334 D MediaCodecInfo: NoSupport [codec.profileLevel, hvc1.2.4.L120.90, video/hevc] [c2.mtk.hevc.decoder, video/hevc] [flare, 24075RP89G, Google, 35]
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal: Playback error
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:   com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/hevc, hvc1.2.4.L120.90, -1, und, [1920, 800, -1.0, null], [-1, -1]), format_supported=NO_EXCEEDS_CAPABILITIES
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:       at H2.K.handleMessage(SourceFile:451)
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:       at android.os.Handler.dispatchMessage(Handler.java:105)
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:       at android.os.Looper.loopOnce(Looper.java:232)
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:       at android.os.Looper.loop(Looper.java:317)
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:       at android.os.HandlerThread.run(HandlerThread.java:85)
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:   Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: c2.mtk.hevc.decoder
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:       at H3.i.A(SourceFile:5)
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:       at d3.p.s(SourceFile:215)
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:       at H3.i.s(SourceFile:1)
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:       at H2.K.c(SourceFile:975)
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:       at H2.K.handleMessage(SourceFile:317)
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:       ... 4 more
03-02 17:45:36.361 32101 32334 E ExoPlayerImplInternal:   Caused by: android.media.MediaCodec$CodecException: Error 0x80000000
03-02 17:45:36.362 32101 32336 E MediaCodec: flush() is valid only at Executing states; currently at Released state
03-02 17:45:36.363 32101 32334 E ExoPlayerImplInternal: Disable failed.
03-02 17:45:36.363 32101 32334 E ExoPlayerImplInternal:   java.lang.IllegalStateException: flush() is valid only at Executing states; currently at Released state

Application version

2.6.2

Where did you install the app from?

Google Play Store

Device information

xiaomi redmi tab SE 8.7 - codename "flare"

Android version

Android 15 - original GSI image from google Build number AP4A.241205.013

Jellyfin server version

10.10.6

Which video player implementations does this bug apply to?

Integrated player (ExoPlayer)

NeutroGe avatar Mar 02 '25 19:03 NeutroGe

So i compiled the app and poked a bit about this today.

The app detects correctly my tablet codec information as "HEVC Main" and the source video is also correctly detected as "HEVC Main 10".

The app uses the interface called "MediaSourceInfo" from the jellyfin API. This interface contains the booleans called "supportDirectPlay" and "supportsTranscoding".

The source of the issue is that the "supportDirectPlay" boolean is incorrectly set to "true" when the device HEVC codec capability is "Main" and the source is "Main 10".

I didn't find how that "MediaSourceInfo" is generated from the API, it's probably somewhere in https://github.com/jellyfin/jellyfin-sdk-kotlin . I lack the technical capabilities to fix this, perhaps a dev familiar with the project will know what to do.

I did a quick and dirty hack to disable the usage of HEVC hardware acceleration by the app by commenting/removing the line 14 of the file https://github.com/jellyfin/jellyfin-android/blob/master/app/src/main/java/org/jellyfin/mobile/player/deviceprofile/CodecHelpers.kt :

MediaFormat.MIMETYPE_VIDEO_HEVC, MediaFormat.MIMETYPE_VIDEO_DOLBY_VISION -> "hevc"

which leads to the app assuming there are no hevc decoders at all available, which in turns triggers a transcode whenever playing any hevc encoded video file.

I have uploaded this modified version here if some people want to use it without having to compile the whole project themselves (github doesn't let me upload the APK directly): https://www.mediafire.com/file/th61juyazhi1uyt/jellyfin-v2.6.2-nohevc-UNOFFICIAL.apk/file (edit: link updated, recompiled the apk without the debug setting and with integrated exo player as default player instead of web player. Also added UNOFFICIAL in the apk name to make it clear).

@Ginpachi98 @kirides @Mive82 it's not perfect but at least it's a workaround while waiting for a real dev to fix it properly ;)

NeutroGe avatar Mar 03 '25 20:03 NeutroGe

Recompiled my modified APK which was in debug mode to normal mode, set integrated exo player as default player, app name is JellyfinNOHEVC and apkname is jellyfin2.6.2-nohevc-UNOFFICIAL.apk to make it clear it's just a dirty hack if people randomly find it on the net.

Link edited in my previous message @kirides

NeutroGe avatar Mar 05 '25 05:03 NeutroGe

Thank you, I did virusbyte check it's OK file and it works on my chinese tv box. It'd be maybe too much to ask, but could you post jellyfin android TV version as well, until certain fix @NeutroGe

Ginpachi98 avatar Mar 05 '25 21:03 Ginpachi98

Thank you, I did virusbyte check it's OK file and it works on my chinese tv box. It'd be maybe too much to ask, but could you post jellyfin android TV version as well, until certain fix @NeutroGe

You're welcome :) I'll try to do it a bit later. I found out yesterday that the change i've done to set exoplayer as default player from the start created a bug for subtitles management. I'll try to solve this then look into the android TV version.

NeutroGe avatar Mar 05 '25 21:03 NeutroGe

@NeutroGe After writing this issue I did a similar thing myself, but in a different file. If you move 2 files down to DeviceProfileBuilder.kt (https://github.com/jellyfin/jellyfin-android/blob/master/app/src/main/java/org/jellyfin/mobile/player/deviceprofile/DeviceProfileBuilder.kt), you can set the available codecs your client supports. By removing the unsupported codecs from AVAILABLE_VIDEO_CODECS and containers from SUPPORTED_CONTAINER_FORMATS, the app will request transcoding properly. To be clear, this is also a bodge while we wait for a proper fix, but may be a bit cleaner.

Mive82 avatar Mar 06 '25 17:03 Mive82

Thank you, I did virusbyte check it's OK file and it works on my chinese tv box. It'd be maybe too much to ask, but could you post jellyfin android TV version as well, until certain fix @NeutroGe

Sorry, i've checked the android-TV app but i didn't find an obvious parameter to disable HEVC in it. I've tried something but the emulator and my android tablet dont allow hardware acceleration with the TVapp, and i dont have an android TV, so i cant test myself if my changes are working, and it's too complicated to give other people files to test and then modify and then test ect...

You'll need to find someone who can patch the app and test on their own android TV

For the android app i've updated my apk: https://www.mediafire.com/file/th61juyazhi1uyt/jellyfin-v2.6.2-nohevc-UNOFFICIAL.apk/file

The subtitle bug is resolved :)

NeutroGe avatar Mar 06 '25 19:03 NeutroGe

@NeutroGe After writing this issue I did a similar thing myself, but in a different file. If you move 2 files down to DeviceProfileBuilder.kt (https://github.com/jellyfin/jellyfin-android/blob/master/app/src/main/java/org/jellyfin/mobile/player/deviceprofile/DeviceProfileBuilder.kt), you can set the available codecs your client supports. By removing the unsupported codecs from AVAILABLE_VIDEO_CODECS and containers from SUPPORTED_CONTAINER_FORMATS, the app will request transcoding properly. To be clear, this is also a bodge while we wait for a proper fix, but may be a bit cleaner.

Thank you, I did virusbyte check it's OK file and it works on my chinese tv box. It'd be maybe too much to ask, but could you post jellyfin android TV version as well, until certain fix @NeutroGe

Sorry, i've checked the android-TV app but i didn't find an obvious parameter to disable HEVC in it. I've tried something but the emulator and my android tablet dont allow hardware acceleration with the TVapp, and i dont have an android TV, so i cant test myself if my changes are working, and it's too complicated to give other people files to test and then modify and then test ect...

You'll need to find someone who can patch the app and test on their own android TV

For the android app i've updated my apk: https://www.mediafire.com/file/th61juyazhi1uyt/jellyfin-v2.6.2-nohevc-UNOFFICIAL.apk/file

The subtitle bug is resolved :)

if i read this correctly, the only change to workaround this mess, is to add a check for "hevc" in here https://github.com/jellyfin/jellyfin-android/blob/13c0e5c3f85cdb8ff6f6ff0b821c2e780770c5c9/app/src/main/java/org/jellyfin/mobile/player/deviceprofile/DeviceProfileBuilder.kt#L41

Something like this, should be enough, but i don't know kotlin, or if one should add case-insensitive comparison

if (name == "hevc") {
  continue
}

kirides avatar Mar 06 '25 20:03 kirides

@kirides There are three arrays toward the end of DeviceProfileBuilder.kt file: SUPPORTED_CONTAINER_FORMATS, AVAILABLE_VIDEO_CODECS and AVAILABLE_AUDIO_CODECS that matter for this use case. By changing those, you change the supported codecs without altering the logic of determining said supported codecs. By changing them, we force the app to request a transcode if the video codec is not on the supported list. Here are my values:

private val SUPPORTED_CONTAINER_FORMATS = arrayOf(
    "mp4", "fmp4", "mkv", "mp3", "ogg", "wav", "mpegts", "flv", "aac", "flac", "3gp",
)
private val AVAILABLE_VIDEO_CODECS = arrayOf(
    // mp4
    arrayOf("mpeg1video", "mpeg2video", "h263", "mpeg4", "h264"),
    // fmp4
    arrayOf("mpeg1video", "mpeg2video", "h263", "mpeg4", "h264"),
    // mkv
    arrayOf("mpeg1video", "mpeg2video", "h263", "mpeg4", "h264"),
    // mp3
    emptyArray(),
    // ogg
    emptyArray(),
    // wav
    emptyArray(),
    // mpegts
    arrayOf("mpeg1video", "mpeg2video", "mpeg4", "h264"),
    // flv
    arrayOf("mpeg4", "h264"),
    // aac
    emptyArray(),
    // flac
    emptyArray(),
    // 3gp
    arrayOf("h263", "mpeg4", "h264"),
)
private val AVAILABLE_AUDIO_CODECS = arrayOf(
    // mp4
    arrayOf("mp1", "mp2", "mp3", "aac", "alac", "ac3", "opus"),
    // fmp4
    arrayOf("mp3", "aac", "ac3", "eac3"),
    // mkv
    arrayOf(*PCM_CODECS, "mp1", "mp2", "mp3", "aac", "vorbis", "opus", "flac", "alac", "ac3", "eac3", "dts", "mlp", "truehd"),
    // mp3
    arrayOf("mp3"),
    // ogg
    arrayOf("vorbis", "opus", "flac"),
    // wav
    PCM_CODECS,
    // mpegts
    arrayOf(*PCM_CODECS, "mp1", "mp2", "mp3", "aac", "ac3", "eac3", "dts", "mlp", "truehd"),
    // flv
    arrayOf("mp3", "aac"),
    // aac
    arrayOf("aac"),
    // flac
    arrayOf("flac"),
    // 3gp
    arrayOf("3gpp", "aac", "flac"),
)

Mive82 avatar Mar 06 '25 20:03 Mive82

@Mive82

I may just not properly understand the jellyfin code, but the flow looks like that part I mentioned builds up the "supported by the hardware" codecs into videoCodecs and audioCodecs maps.

As videoCodecs is used to filter the "supported by jellyfin" codecs down, to only contain what is in both collections, removing it, or rather, never adding "hevc" to videoCodecs should have the same effect, but needs less changes.

kirides avatar Mar 06 '25 20:03 kirides

Related issues: #1049 #1174 and #1220 The closed ones are not fixed but stale (after removing the stale label three times I forgot the forth time and don't have the permission to reopen whoops). Thanks for looking into it more, my workaround is using the webplayer (to force transcoding)...

broetchenrackete36 avatar Mar 20 '25 21:03 broetchenrackete36

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

jellyfin-bot avatar Jul 19 '25 03:07 jellyfin-bot