The MKV container has an aspect ratio of 16:9 (1024x576), while the video is PAL (720x576, SAR 64:45). All perfectly fine values. One of two things has to happen for this issue to be resolved:
- Just Direct Play the MKV. Probably not much that Plex can do here because they rely on third-party software to play media (I think it’s ExoPlayer on Android/Fire TV). No idea why the Fire TV can’t DP it even though my Android phone can:
[Transcode] MDE: Test: Direct Play is disabled
[Transcode] MDE: Test: media must be transcoded in order to use the hls protocol
[Transcode] MDE: Test: no direct play video profile exists for http/mkv/mpeg2video
[Transcode] MDE: Test: no direct play video profile exists for http/mkv/mpeg2video/ac3
[Transcode] Streaming Resource: Added session 0xb2c44b60:f22ede40dcaaaf83-com-plexapp-android
[Transcode] Streaming Resource: Reached Decision id=6719 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=8416 part=(id=10671 decision=transcode container=mkv protocol=hls streams=(Video=(id=22094 decision=copy width=720 height=576) Audio=(id=22095 decision=copy channels=6 rate=48000))))
- Despite of the Fire TV (supposedly) saying that it can’t work with MKV+MPEG2+AC3, the Plex Transcoder does precisely that: It creates an MKV container (
header) with MPEG-TS segments (media-%05d.ts). This container is also 16:9 (16x9 display width/height), so it should’ve worked. The MPEG-TS segments also have the right aspect ratio to them (that’s why for example my PC can play both correctly). Seems like the Fire TV client is jumping through many hoops just to play my media incorrectly.
This is the ffmpeg command:
-codec:0 mpeg2video
-noaccurate_seek
-analyzeduration 20000000
-probesize 20000000
-i Test.mkv
-map 0:0
-metadata:s:0 language=eng
-codec:0 copy
-map 0:1
-metadata:s:1 language=deu
-codec:1 copy
-segment_format matroska
-f ssegment
-individual_header_trailer 0
-flags +global_header
-segment_format_options output_ts_offset=10
-segment_header_filename header
-segment_time 10
-segment_start_number 0
-segment_copyts 1
-segment_time_delta 0.0625
-segment_list http://127.0.0.1:32400/video/:/transcode/session/f22ede40dcaaaf83-com-plexapp-android/f6201312-2ef8-46d8-af17-d6242a10a31d/manifest?X-Plex-Http-Pipeline=infinite
-segment_list_type csv
-segment_list_size 5
-segment_list_separate_stream_times 1
-segment_list_unfinished 1
-max_delay 5000000
-avoid_negative_ts disabled
-map_metadata:g -1
-map_metadata:c -1
-map_chapters -1
media-%05d.ts
-start_at_zero
-copyts
-vsync cfr
-y
-nostats
-loglevel quiet
-loglevel_plex error
-progressurl http://127.0.0.1:32400/video/:/transcode/session/f22ede40dcaaaf83-com-plexapp-android/f6201312-2ef8-46d8-af17-d6242a10a31d/progress
As you can see, it’s not doing anything fancy – just copying the streams into another container. I’ve checked with ffmpeg, ffprobe and mediainfo and everything looks fine to me. Every single device can play it properly (directly or not), just not the damn Fire TV.
You can take a look at it yourself but I doubt that you will find anything interesting: 5sec.zip
Workarounds:
Because everything is fine from my side (meaning I can’t just do mpeg2_metadata or something), I came up with two workarounds:
- Zero-out the (MKV) header. By hooking into the Plex Transcoder and wiping the
headerbefore the Fire TV has the chance to read it, the player will skip it and go straight tomedia-00000.ts, thus loading the correct settings from the MPEG-TS stream. This works becauseMPEG2andAC3are of course valid in this context but I do lose the ability to use any kind of subtitles. - Transcode to H.264. By modifying the Plex Transcoder and changing
-codec:v copytolibx264and adding-vf scale=1024:576to it, it will create a correct file. This is awful though because my device lacks support for hardware transcoding (thanks Plex!).