Hey folks, there is a new Podcast category for forums https://forums.plex.tv/categories/podcasts
If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Direct Stream of 4K to ATV4K Still Not Working

nickp85nickp85 Posts: 54Members ✭✭

Just updated to Plex Server 1.11 and noticed that 4K videos in the MKV container are now attempting direct stream. Still isn't working though. I get a spinner for a while and it eventually errors saying "Something went wrong playing your media. Please try again."

Checked the Plex web player and can validate it is attempting to direct stream video and audio.

Guess this didn't get properly flushed out in the beta/PlexPass period?

Is there a fix coming?

«13

Answers

  • Vortec4800Vortec4800 Posts: 79Members, Plex Pass Plex Pass

    My current understanding is that we're waiting for a new version of the ATV client for this to be fully supported.

  • nickp85nickp85 Posts: 54Members ✭✭

    Does the latest TestFlight Plex app work with it? I'm in that beta and have the latest TestFlight build.

  • Nik3shNik3sh Posts: 125Members, Plex Pass Plex Pass
    edited February 20

    @nickp85 said:
    Does the latest TestFlight Plex app work with it? I'm in that beta and have the latest TestFlight build.

    If you’re on the latest Plex beta app surely you can test it yourself and know if 4K mkv direct streams? Does it not work in the latest app beta? Someone else said it does work for them on this forum.
    Not sure if it works because they’re on TVOS 11.26 or 11.3 beta which looks to have problems by reading posts on the Apple TV thread.

    https://forums.plex.tv/discussion/308088/issues-with-4k-hevc-content/p1

    Shouldn’t you be reporting this in the Plex beta section

  • nickp85nickp85 Posts: 54Members ✭✭

    Beta app doesn't work with it. I downgraded to the public beta app and am using PMS 1.11.3. I see others say Direct Stream is working. I've tried a number of 4K MKV files and none of them will stream. Also, I still cannot DirectPlay 4K HEVC MP4 format without editing tvOS.xml to allow it.

    Am I missing something here? What is expected to work at this point?

  • ersanersan Posts: 92Members, Plex Pass Plex Pass
    edited February 22

    They still haven't figured out how to remux from mkv to mp4 container on the fly, as far as I know. Unless there's been a breakthrough recently.

  • nickp85nickp85 Posts: 54Members ✭✭
    edited February 22

    I got it working but still requires remuxing manually so might as well just take the time and remux to MP4 for DirectPlay. Your MKV has to have the vtag for hvc1 which is what Apple supports. Doesn't like hev1 which apparently all of my MKV files are. I was able to ffmpeg the file using -codec copy and -vtag hvc1 to another mkv file and now it direct stream quite nicely, even while transcoding unsupported audio.

    So it sounds like their DirectStream process below is missing something in step 2 for Apple TV to make sure the vtag hvc1 is used.

    From https://support.plex.tv/articles/200250387-streaming-media-direct-play-and-direct-stream/

    Direct Stream
    You may have some media that is compatible with your device regarding resolution and media type (H.264, AC3, etc.), but is in an incompatible file container (.mkv, .avi, .wmv, etc.). In this case, the file can be Direct Streamed to your device. This means:

    The video and audio tracks are extracted from the original file;
    The streams are saved back into a compatible file container; and (not saving back to a container using the hvc1 vtag)
    The Plex Media Server repackages the content on-the-fly before streaming it.

    Damn Apple and their specific requirements.......

    Anyone from Plex care to comment on this finding?

  • Nik3shNik3sh Posts: 125Members, Plex Pass Plex Pass
    edited February 22

    Yeah I know about the hvc1 tag but I thought Plex would have solved it somehow on their server by letting us direct stream hev1 with 4K MKVs (which most people have), plex could be more clear on how to play 4K Movies on ATV 4K.

    that is disappointing! as you said might as well also convert the MKV to mp4 as well! to direct play 4K using ffmpeg.

    I wonder why another person posted that 4K MKV direct stream now on the beta app without needing to convert.

    I will stick with infuse, haven’t got time to manually convert all 4K MKVS.

  • WatchTowerPlexWatchTowerPlex Posts: 242Validating, Plex Pass Plex Pass

    I do not have any issues streaming mkv 4K content. The plex server remuxes just fine...

    https://forums.plex.tv/discussion/comment/1617929/#Comment_1617929

  • Nik3shNik3sh Posts: 125Members, Plex Pass Plex Pass
    edited February 23

    @WatchTowerPlex said:
    I do not have any issues streaming mkv 4K content. The plex server remuxes just fine...

    https://forums.plex.tv/discussion/comment/1617929/#Comment_1617929

    Strange my 4K MKVS sometimes direct stream but most times it transcodes, or just doesn’t play at all, it’**** or miss! If it does direct stream I get no film info or chapters.

    I’m on Plex app 1.24, latest Plex server, TVOS is on 11.3, Server on Windows 10

    Tried everything! adding hvc1 tag to an mp4 and mkv, (ffmpeg) still didn’t work! Only way was to remux to mp4 hvc1 tag and edit the TVOS.xml then it would direct play.

    Wonder why you can direct stream 4K MKVs without any remuxing.

  • WatchTowerPlexWatchTowerPlex Posts: 242Validating, Plex Pass Plex Pass

    @Nik3sh Do you mind dumping the xml metadata from one of the files that forces a transcode?

  • Nik3shNik3sh Posts: 125Members, Plex Pass Plex Pass
    edited February 23

    @WatchTowerPlex said:
    @Nik3sh Do you mind dumping the xml metadata from one of the files that forces a transcode?

    Attached info, all 4k Mkvs direct/stream on my shield TV and LG TV using Plex. thanks!

    Just to say on plexpy i can see nearly all 4K MKVs attempting to direct stream or transcode but then errors out, it will be just luck to which one one i get.

    I’ve noticed on these forums some people have managed to get it to direct stream while others haven’t. Maybe it’s the server Plex is running on.

  • WatchTowerPlexWatchTowerPlex Posts: 242Validating, Plex Pass Plex Pass
    edited February 23

    @Nik3sh said:

    @WatchTowerPlex said:
    @Nik3sh Do you mind dumping the xml metadata from one of the files that forces a transcode?

    Attached info, all 4k Mkvs direct/stream on my shield TV and LG TV using Plex. thanks!

    Just to say on plexpy i can see nearly all 4K MKVs attempting to direct stream or transcode but then errors out, it will be just luck to which one one i get.

    I’ve noticed on these forums some people have managed to get it to direct stream while others haven’t. Maybe it’s the server Plex is running on.

    Interesting I think I have the same version of that mkv... one bug that I reported a while back is if you run cinema trailers before a 4K movie it fails to play or try’s and transcode but not sure if it was fixed. Do you happen to have cinema trailers enabled? If so try disabling them.

    So you are saying that it sometimes works and then does not on the same mkv?

  • Nik3shNik3sh Posts: 125Members, Plex Pass Plex Pass
    edited February 24

    @WatchTowerPlex said:

    @Nik3sh said:

    @WatchTowerPlex said:
    @Nik3sh Do you mind dumping the xml metadata from one of the files that forces a transcode?

    Attached info, all 4k Mkvs direct/stream on my shield TV and LG TV using Plex. thanks!

    Just to say on plexpy i can see nearly all 4K MKVs attempting to direct stream or transcode but then errors out, it will be just luck to which one one i get.

    I’ve noticed on these forums some people have managed to get it to direct stream while others haven’t. Maybe it’s the server Plex is running on.

    Interesting I think I have the same version of that mkv... one bug that I reported a while back is if you run cinema trailers before a 4K movie it fails to play or try’s and transcode but not sure if it was fixed. Do you happen to have cinema trailers enabled? If so try disabling them.

    So you are saying that it sometimes works and then does not on the same mkv?

    G

    No cinema trailers enable

    When I press the play button it will attempt to either direct stream or transcode, I don’t know what I will get it’s different all the time!

    But none of them will play! I just see the spinning wheel then get an error message saying cannot play this video.

    Only one 4K mkv has opened up and played but even with that it’s a lottery if it will play or not the next time I press play it will buffer then error out.

    I can direct stream 1080p mkvs no problem.

    In the server release announcements I can’t see anything about being able to direct stream 4K mkvs on the Apple TV 4K

    @BigWheel It would be helpful if a Plex employee can make sense of this? But it’s like they don’t want to know when it comes to 4K playback

    See even this person @Leogan can’t get it to work

    https://forums.plex.tv/discussion/300602/4k-hdr-playback-through-direct-play-or-direct-stream-possible#latest

  • WatchTowerPlexWatchTowerPlex Posts: 242Validating, Plex Pass Plex Pass
    edited February 24

    @Nik3sh You may want to enable debug logging on the ATV and then pull the logs from the PMS server. That might give some more info on what is happening. https://support.plex.tv/articles/212639598-apple-tv-logs/

  • nickp85nickp85 Posts: 54Members ✭✭
    edited February 27

    Anyone from Plex can comment on this please? Will you enhance the direct stream capability with 4K media to Apple TV so it will apply the hvc1 tag while remuxing?

  • WatchTowerPlexWatchTowerPlex Posts: 242Validating, Plex Pass Plex Pass

    @nickp85 I created this how to... https://forums.plex.tv/discussion/309813/how-to-apple-tv-4k-mkv-4k-hevc-hdr-playback/p1

    Can you verify against those settings? Someone else was having a similar problem and they had their ATV set to SDR and not HDR in settings. There might be a bug with plex going from SDR to HDR. HDR to SDR content switching seems to work fine.

  • nickp85nickp85 Posts: 54Members ✭✭
    edited February 27

    Nope, set exactly as your article recommends, most MKV will not play, server shows attempting to direct stream, not transcode. The same MKV that doesn't play, if I use ffmpeg to remux it to MKV again but apply the hvc1 video tag, will direct stream fine after remux, still in MKV. When I look at PMS logs I did see some entry about not being able to find a compatible video tag... probably because it's looking for hvc1 before streaming rather than applying it while streaming.

    MP4 is entirely different story, out of the box tries to direct stream when it should direct play. I have to add the hevc codec and modify the tvOS.xml file to get it to Direct Play MP4 files.

  • WatchTowerPlexWatchTowerPlex Posts: 242Validating, Plex Pass Plex Pass
    edited February 27

    @nickp85 said:
    Nope, set exactly as your article recommends, most MKV will not play. The same MKV that doesn't play, if I use ffmpeg to remux it to MKV again but apply the hvc1 video tag, will direct stream fine after remux, still in MKV.

    MP4 is entirely different story, out of the box tries to direct stream when it should direct play. I have to add the hevc codec and modify the tvOS.xml file to get it to Direct Play MP4 files.

    What modifications do you have to make?

    edit: to clarify... what do you change in the tvOS.xml file?

  • nickp85nickp85 Posts: 54Members ✭✭
    edited February 27

    Add hevc here

    <DirectPlayProfiles> <VideoProfile container="mp4" codec="hevc,h264,mpeg4" audioCodec="aac,ac3,eac3" subtitleCodec="mov_text,tx3g,ttxt,text" />

    Add this under the h264 codec

    <VideoCodec name="hevc"> <Limitations> <UpperBound name="video.width" value="3840" isRequired="true" /> <UpperBound name="video.height" value="2160" isRequired="true" /> <UpperBound name="video.bitDepth" value="10" /> </Limitations> </VideoCodec>

    Change audio codec to * and increase to 6 channel (not really sure if this is necessary but others said to do it.

    <VideoAudioCodec name="*"> <Limitations> <UpperBound name="audio.channels" value="6" /> </Limitations> </VideoAudioCodec>

    After saving these changes and restarting Plex, all my 4K MP4 files use Direct Play and work very nicely. Problem is I use Docker for Plex so EVERY update overwrites my change... grrr. Been doing this since the Apple TV first came out.

    update: sorry, XML doesn't exactly copy in nicely here but hopefully you get the picture.

  • WatchTowerPlexWatchTowerPlex Posts: 242Validating, Plex Pass Plex Pass
    edited February 27

    @nickp85 said:
    Add hevc here

    <DirectPlayProfiles> <VideoProfile container="mp4" codec="hevc,h264,mpeg4" audioCodec="aac,ac3,eac3" subtitleCodec="mov_text,tx3g,ttxt,text" />

    Add this under the h264 codec

    <VideoCodec name="hevc"> <Limitations> <UpperBound name="video.width" value="3840" isRequired="true" /> <UpperBound name="video.height" value="2160" isRequired="true" /> <UpperBound name="video.bitDepth" value="10" /> </Limitations> </VideoCodec>

    Change audio codec to * and increase to 6 channel (not really sure if this is necessary but others said to do it.

    <VideoAudioCodec name="*"> <Limitations> <UpperBound name="audio.channels" value="6" /> </Limitations> </VideoAudioCodec>

    After saving these changes and restarting Plex, all my 4K MP4 files use Direct Play and work very nicely. Problem is I use Docker for Plex so EVERY update overwrites my change... grrr. Been doing this since the Apple TV first came out.

    update: sorry, XML doesn't exactly copy in nicely here but hopefully you get the picture.

    Yep thanks for the info.

    I took an MKV and remuxed it to an MP4 and it plays right out of the box. it does recontainer the MP4 into another MP4. I am not sure why but it may have to do with the MP4 streaming changes that were made when the ATV 4k was released.

    Now there is a bug where if I have cinema trailers turned on it will fail to play and say that there was a playback error.

    Feb 27 00:08:29 Living-Room Plex[170] <Notice>: 2018/02/27 00:08:29.055 (458 MB) (6946) \M-b\M^]\M^L PMKVideoPlaybackEngine.m:293 | Failed to prepare playback session for metadata { <PMKPlayQueueMetadata:0x16c9dee70 key:/library/metadata/70775 title:plex-preroll-v2 type:12 isDirectory:0> }, playQueueItemID:85356: Error Domain=PMKPlaybackEngineErrorDomain Code=2 "Couldn't create playback session" UserInfo={NSLocalizedDescription=Couldn't create playback session, 
    

    Soon as I turned off the prerolls/trailers it plays just fine.

«13
Sign In or Register to comment.