Direct streaming / playing hevc is broken on android / android tv

hi everyone.

I don’t know, when exactly it happend, but recently I am not able to directly stream / play my hevc/mkv files on android app, android tv app and android browser anymore. it used to work for months before. on windows it continues to work.

my setup:

server

rpi 4
raspbian buster
jellyfin 10.6.3
docker image (same issue for jellyfin/jellyfin and linuxserver/jellyfin)

clients

android tv 8
android 10
android 9
always most recent app releases from playstore

I have unchecked video transcoding for my user to enforce direct streaming and this always worked without issues.

now when i start a movie, it seems to start streaming, but does not play anything. also there is no incompatibility message on the clients or anything else. my server dashboard shows the following message

Direct streaming

The media is compatible with the device regarding resolution and media type (H.264, AC3, etc), but is in an incompatible file container (mkv, avi, wmv, etc). The video will be re-packaged on the fly before streaming it to the device.

Direct Streaming a file uses very little processing power without any loss in video quality.

the log file tells me the following:

[2020-08-30 15:58:09.785 +02:00] [INF] [24] MediaBrowser.Api.Playback.MediaInfoService: User policy for “Graf Koks”. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2020-08-30 15:58:09.785 +02:00] [INF] [24] MediaBrowser.Api.Playback.MediaInfoService: Profile: “Unknown Profile”, Path: “/media/multimedia/Filme/Birds of Prey - The Emancipation of Harley Quinn (2020)/Birds of Prey - The Emancipation of Harley Quinn (2020).mkv”, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
[2020-08-30 15:58:09.785 +02:00] [INF] [24] MediaBrowser.Api.Playback.MediaInfoService: Profile: “Unknown Profile”, No direct play profiles found for Path: “/media/multimedia/Filme/Birds of Prey - The Emancipation of Harley Quinn (2020)/Birds of Prey - The Emancipation of Harley Quinn (2020).mkv”
[2020-08-30 15:58:09.786 +02:00] [INF] [24] MediaBrowser.Api.Playback.MediaInfoService: Profile: “Unknown Profile”, Path: “/media/multimedia/Filme/Birds of Prey - The Emancipation of Harley Quinn (2020)/Birds of Prey - The Emancipation of Harley Quinn (2020).mkv”, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
[2020-08-30 15:58:09.786 +02:00] [INF] [24] MediaBrowser.Api.Playback.MediaInfoService: Profile: “Unknown Profile”, No direct play profiles found for Path: “/media/multimedia/Filme/Birds of Prey - The Emancipation of Harley Quinn (2020)/Birds of Prey - The Emancipation of Harley Quinn (2020).mkv”
[2020-08-30 15:58:09.787 +02:00] [INF] [24] MediaBrowser.Api.Playback.MediaInfoService: Profile: “Unknown Profile”, Path: “/media/multimedia/Filme/Birds of Prey - The Emancipation of Harley Quinn (2020)/Birds of Prey - The Emancipation of Harley Quinn (2020).mkv”, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
[2020-08-30 15:58:09.787 +02:00] [INF] [24] MediaBrowser.Api.Playback.MediaInfoService: Profile: “Unknown Profile”, No direct play profiles found for Path: “/media/multimedia/Filme/Birds of Prey - The Emancipation of Harley Quinn (2020)/Birds of Prey - The Emancipation of Harley Quinn (2020).mkv”
[2020-08-30 15:58:12.463 +02:00] [INF] [16] MediaBrowser.Api.Playback.Hls.DynamicHlsService: /usr/lib/jellyfin-ffmpeg/ffmpeg -fflags +genpts -f matroska,webm -i file:"/media/multimedia/Filme/Birds of Prey - The Emancipation of Harley Quinn (2020)/Birds of Prey - The Emancipation of Harley Quinn (2020).mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -bsf:v hevc_mp4toannexb -vsync -1 -codec:a:0 copy -copyts -avoid_negative_ts disabled -f hls -max_delay 5000000 -hls_time 6 -individual_header_trailer 0 -hls_segment_type mpegts -start_number 0 -hls_segment_filename “/config/data/transcodes/cca4408d135f1f19b7be8c2d093bfb48%d.ts” -hls_playlist_type vod -hls_list_size 0 -y “/config/data/transcodes/cca4408d135f1f19b7be8c2d093bfb48.m3u8”
[2020-08-30 15:58:13.468 +02:00] [ERR] [31] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request: “The operation was canceled”. URL: “http://192.168.178.101:8096/videos/97906aa8-09d1-d44c-47a8-f064bf5afd69/hls1/main/0.ts?DeviceId=43eb9e0e2dc8d323&MediaSourceId=97906aa809d1d44c47a8f064bf5afd69&VideoCodec=h264&AudioCodec=mp3,aac,opus&AudioStreamIndex=1&VideoBitrate=139360000&AudioBitrate=640000&PlaySessionId=a7f3c25a18694df096012fadd1d823ad&SubtitleMethod=Encode&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=366bb844517deb329ec2bae036ee7709&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&h264-profile=high,main,baseline,constrainedbaseline&h264-level=41&TranscodeReasons=VideoCodecNotSupported
[2020-08-30 15:58:13.469 +02:00] [WRN] [31] Emby.Server.Implementations.HttpServer.HttpListenerHost: HTTP Response 200 to “192.168.178.36”. Time (slow): 0:00:01.0757315. “http://192.168.178.101:8096/videos/97906aa8-09d1-d44c-47a8-f064bf5afd69/hls1/main/0.ts?DeviceId=43eb9e0e2dc8d323&MediaSourceId=97906aa809d1d44c47a8f064bf5afd69&VideoCodec=h264&AudioCodec=mp3,aac,opus&AudioStreamIndex=1&VideoBitrate=139360000&AudioBitrate=640000&PlaySessionId=a7f3c25a18694df096012fadd1d823ad&SubtitleMethod=Encode&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=366bb844517deb329ec2bae036ee7709&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&h264-profile=high,main,baseline,constrainedbaseline&h264-level=41&TranscodeReasons=VideoCodecNotSupported

here is an example media info for a file which used to work

Video

Title1080p HEVC
CodecHEVC
ProfileMain
Level120
Resolution1920x800
Aspect ratio2.40:1
InterlacedNo
Framerate23.976025
Bitrate3241 kbps
Pixel formatyuv420p
Ref frames1

Audio

TitleGer Dolby Digital 5.1 Default
Languageger
CodecAC3
Layout5.1
Channels6 ch
Bitrate640 kbps
Sample rate48000 Hz
DefaultYes

Audio

TitleEng Dolby Digital 5.1
Languageeng
CodecAC3
Layout5.1
Channels6 ch
Bitrate640 kbps
Sample rate48000 Hz
DefaultNo

Subtitle

TitleGer - Default
Languageger
CodecPGSSUB
DefaultYes
ForcedNo
ExternalNo

Subtitle

TitleGer
Languageger
CodecPGSSUB
DefaultNo
ForcedNo
ExternalNo

Subtitle

TitleEng
Languageeng
CodecPGSSUB
DefaultNo
ForcedNo
ExternalNo

I always installed the newest versions of server and client. i do not know exactly, when it stopped because I only used my windows devices in the last time, where it continues to work.

any idea what went wrong?

Short Update:

After a lot of trial and error the solution for my Android TV devices was to set the player from auto to libVLC in the app settings. Although this was not neccessary in the past, it is okay for me.

On my other Android devices I was not able to find a solution. When I allow transcoding, playback works, but the video stream is encoded to h264. The reason for transcoding given on the server is incopatible subtitle format.

Hey, yeah, depending on what version you were in before, starting with 10.6 there were some stream changes.

The Android (non TV) client has only supported HEVC in rare cases. There are some upgrades coming (currently in beta) which should make it smoother. PGSSUBs will still cause transcoding though - they’re actual images and have to be burnt in to the picture. If you’re able to get text subs at all (like from OpenSubtitles), then it won’t be an issue.

Hi, thanks for your answer. For me it is okay if streaming on “normal” Android does not work because I also have a windows tablet.

Unfortunately I have faced another issue today now when trying to playback on my FireTV device. The movie plays and I have sound, but the screen stays black. Unfortunatly switching to libVLC does not solve this. Any idea?

Thank you in advance.