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!

Strange behavior with transcoding on n Apple TV 4K (and iPad pro)

fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

Hi,

I recently update my plex environment:

New powerful Server and new client which is now Apple TV 4K.

Server is a Intel Skylake CPU i7500T (quad core with latest QSV features), transcoding is enabled and is working well. Server version is 1.9.4.4325

Here my findings and problems:

1) I have plenty of ts files recored from satellite TV. These files are ts container which include h264 streams 1080i50 at bandwidths between 5-15 MB/s in average.

So once I moved the ts files to the plex server I discovered the ATV 4K to behave like this: I start the playback with Audio is on but no video coming through, in other words only a black screen with audio. From my previous experiences I remembered that ts files are tricky since they have some not video related overhead information inside (that happened to me few years ago with a Raspberry PI setup). So I re-coded (using mkvmerge) the ts files to mkv files (with slightly smaller file size in result).

Same thing happens, no change in behavior compared to the original ts file.

It is important to mention that mkv files from makemkv are not problematic, they start to play just as normal as expected (with transcoding).

2) I took my older iPad Air 1 and played the same files as above. And surprise: No issue playing this files, so both mkv and the original ts file play well. Transcoding I noticed is set to 4MBs 720p. So with the older iPad not being so powerful this is a thing which understandable. Pushing it manually to a higher bandwidth is not working for all bandwidths, 8 MBs 1080p seems to be possible (it is not a network bandwidth thing, as later turned out when playing the iPad pro in parallel).

3) With knowing that I returned to the ATV 4K. First step was to modify the bandwidth manually and it turned out to be a successful step. Playback starts with audio and video. I repeated it also with ts and mkv file, both behave the same (means actually now with newer versions of plex server and client there is no issue with ts files).

I started with lower bandwidth but on the ATV 4K it seems to be possible even at 20MBs 1080p settings. What is not possible to use the „automatic convert“ setting or the „direct stream“.

One interesting thing is also: Once playing the from scratch with Audio and black screen even to enter the bandwidth setting and just select to the already checked marked 20 MBs 1080p setting is sufficient to „tweak“ the client on ATV 4k to play.

4) iPad pro (2015 9.8“) experience: I did all the same experiments as I did with the ATV 4K and the results are the same. It surprised me as it behaved different to the iPad Air 1.

Conclusion: My setup has a problem with ts or corresponding mkv files with more powerful clients and is confused somehow by the transcoding settings, assuming that it selected by intention the 20MBs 1080p setting. Re-Confirming the settings simply solve the problem, but cause a „bad user experience“.

The setup has not problems with mkv files in general, since other files play. Maybe this is related to higher bandwidth or something else different (profile of the decoding or something).

I tried to workaround with the settings in the client app:

a) modify the automatic quality between on and off
b) Play smaller files at original quality (only ATV 4K)

No success. Anybody ideas?

It is no bandwidth issue or server not powerful enough issue since at he end 3 streams ran in parallel, two via wifi and one over ethernet.

Finally I must say that it would be desirable to just direct play the file on apple devices. And the Infuse App demonstrates that this is possible (at least for the ATV 4K). I accept transcoding or even understand the need of transcoding for mobile devices via wifi but not for a wired (network) player.

Many thanks for reading this long text.

Best regards,
Frank

«1

Comments

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    Update:

    The status when information on the server when playing the files is for video "direct play" which I think is a bug.

    For the iPad pro the workaround is to set the quality settings to 1080p 12MBs rather than the standard setting 1080p 20MBs. Than it will transcode as expected. That contradicts with the workaround which I described earlier by setting the quality per individual movie to the 1080p 20 MBs setting. So I think this kind of confirms that in with that setting something strange and buggy is going on, so direct play is not what is desired by that setting to my understanding.

    For the iPad the setting is OK, since there is no visible quality difference between 20MBs and 12MBs.

    Question: Where can I put this bug?

    Frank

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    Update 2:

    Same status ("direct play") for client Apple TV 4k.

    Same workaround is possible (12 MBs 1080p) but it is not acceptable in this case, since the differences are visible.

    20MBs 1080p manual set for the file is still possible.

    One thing I recognized: one setting "Player smaller files at original quality" is always set to on. Once I overwrite this setting to off the app obviously does overwrite this setting to on. I don't fully understand the meaning of this setting, but if I interpret in my way than exactly this setting would solve the problem if could be set to off.

    Btw. I do not see a similar setting in the iPad App.

    Frank

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    Logs attached.

    Dear Plex teams,

    I think this is a bug on IOS or TVOS if there is a "powerfull" client attached. Instead of transcoding a "direct play" for video is selected. This can be fixed manually per video with the quality settings, even just re-confirming the already checked marked 1080p 20MBs kicks the client to play the file properly. It cannot be fixed with the general settings other than selecting the lower bandwithes (for me works 1080p 12MBs e.g.).

    Please check the logfiles. It includes two attempts to play a) a mkv file and b) a ts file.

    Thanks,

    Frank

  • Cleaner_2000Cleaner_2000 Posts: 145Members, Plex Pass Plex Pass
    edited October 2017

    This problem I reported months ago and also a sample file made available to the mods. I got never an answer or a solution. I dealt with shots of sky Germany in 1080i.

    Here we go:
    https://forums.plex.tv/discussion/264968/more-things-transcoding-video-audio-with-appletv-4-lately/p4

    You see the thread ended for months. I send a file to @chrisallen, but I never got a reply.

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    Hi,

    thanks for pointing me there.

    Reading this I recognize there are two things here identified as a problem:

    1) files play with sound only, they direct play for some reason
    2) files do not direct play, but transcode, which has been different before and isn't working with a low performance NAS e.g.

    I have identified one more thread with the number 1) problem:

    https://forums.plex.tv/discussion/291620/enabling-convert-automatically

    I understand the bitterness that nothing happens here. That is the reason I will drive this further.

    Question: In between I learned that there is on the server is a config file called tvos.xml which kind of gives guidance what content to transcode or the other way round to control what can be "direct play". So question to the experts, is that a way to tackle my problem? I hadn't have a look the file on my server but will do that soon. So for me personally I don't care about transcoding, as long it does it on the highest level (20MBit).

    To be honest: None of my contents direct plays on the Apple devices. And Plex in general has the attitude to prefer transcoding. So I am following this way.

    Cheers,
    Frank

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    Update:

    From the web I got this as the latest tvos.xml. There is a section:

    <DirectPlayProfiles>
     ...
     <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac" />
     ...
     </DirectPlayProfiles>
    

    Is this the problematic line?

    And does it contradcit with that line:

    <TranscodeTargets>
    <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac,eac3,ac3,mp3" context="streaming" />
    </TranscodeTargets>
    

    maybe I need some more background hows this technically works.

    Best regrads,
    Frank

       > <?xml version="1.0" encoding="utf-8"?>
        > <Client name="tvOS">
        >   <!-- Author: Plex Inc. -->
        >   <!-- This profile is used by A8-based tvOS devices -->
        >   <Settings>
        >     <Setting name="DirectPlayStreamSelection" value="true" />
        >     <Setting name="StreamUnselectedIncompatibleAudioStreams" value="true" />
        >   </Settings>
        >   <TranscodeTargets>
        >     <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac,eac3,ac3,mp3" context="streaming" />
        >     <MusicProfile container="mp3" codec="mp3" />
        >     <PhotoProfile container="jpeg" />
        >     <SubtitleProfile protocol="hls" container="webvtt" subtitleCodec="webvtt"/>
        >   </TranscodeTargets>
        >   <DirectPlayProfiles>
        >     <VideoProfile container="mp4" codec="h264,mpeg4" audioCodec="aac,ac3,eac3" subtitleCodec="mov_text,tx3g,ttxt,text" />
        >   
        >     <VideoProfile container="mov" codec="h264,mpeg4" audioCodec="aac,ac3" subtitleCodec="mov_text,tx3g,ttxt,text" />
        >     <!-- Allow Direct Play of HLS content  -->
        >     <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac" />
        >     <MusicProfile container="mp3" codec="mp3" />
        >     <MusicProfile container="mp4" codec="aac" />
        >     <PhotoProfile container="jpeg" />
        >   </DirectPlayProfiles>
        >   <CodecProfiles>
        >     <VideoCodec name="h264">
        >       <Limitations>
        >         <UpperBound name="video.width" value="1920" isRequired="true" />
        >         <UpperBound name="video.height" value="1080" isRequired="true" />
        >         <UpperBound name="video.bitDepth" value="8" />
        >       </Limitations>
        >     </VideoCodec>
        >     <VideoAudioCodec name="aac">
        >       <Limitations>
        >         <UpperBound name="audio.channels" value="2" />
        >       </Limitations>
        >     </VideoAudioCodec>
        >   </CodecProfiles>
        > </Client>
    
  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    Update:

    No success in trying things out just by guessing. So please give me guidance on what is possible with tvOS.xml.

    As you read this is a profile for A8 based tvOS, maybe an update for A10 based tvOS is needed? The same is true for h265 profiles as I read in such threads, can you please check on that?

    Best regards,
    Frank

  • j_r0ddj_r0dd Posts: 31Members, Plex Pass Plex Pass

    All my 4k HEVC encoded material transcodes to h264 on the apple tv. These files should at least direct stream since the 4k apple tv supports hevc. This is quite irritating since I replaced my Roku Ultra which played these movies fine. I played around with the tvos.xml with settings I found somewhere else in the forum and it still transcodes. The tvos.xml needs to be updated and the app on the apple tv might need to as well.

  • phiredropphiredrop Posts: 31Members, Plex Pass Plex Pass

    I too am seeing similar behavior on my iPad Pro with encoded .ts recordings. If I don't run my postprocessing script that transcodes to mp4, the original .ts files play fine. However after encoding them with handbrake to mp4, then renaming back to .ts for it to get placed in the Library, the iPad won't even play the file.

    However, I can get the file to play if I do one of two things:

    1. Change the Home Streaming quality on the iPad Plex app so anything lower than 1080p 20Mbps
    2. Change the video's file extension to .mp4
  • amadiganamadigan Posts: 6Members, Plex Pass Plex Pass

    I meant to post this a while ago, but it is possible to get Plex to stop transcoding HEVC.

    /usr/lib/plexmediaserver/Resources/profiles

    <?xml version="1.0" encoding="utf-8"?>
    <Client name="tvOS">
      <!-- Author: Plex Inc. -->
      <!-- This profile is used by A8-based tvOS devices -->
      <Settings>
        <Setting name="DirectPlayStreamSelection" value="true" />
        <Setting name="StreamUnselectedIncompatibleAudioStreams" value="true" />
      </Settings>
      <TranscodeTargets>
        <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac,eac3,ac3,mp3" context="streaming" />
        <MusicProfile container="mp3" codec="mp3" />
        <PhotoProfile container="jpeg" />
        <SubtitleProfile protocol="hls" container="webvtt" subtitleCodec="webvtt"/>
      </TranscodeTargets>
      <DirectPlayProfiles>
        <VideoProfile container="mp4" codec="h264,mpeg4,hevc" audioCodec="aac,ac3,eac3" subtitleCodec="mov_text,tx3g,ttxt,text" />
        <!-- Since tvOS may have issues direct playing mov/*/eac3 it has its own profile  -->
        <VideoProfile container="mov" codec="h264,mpeg4,hevc" audioCodec="aac,ac3" subtitleCodec="mov_text,tx3g,ttxt,text" />
        <!-- Allow Direct Play of HLS content  -->
        <VideoProfile protocol="hls" container="mpegts" codec="h264,hevc" audioCodec="aac" />
        <MusicProfile container="mp3" codec="mp3" />
        <MusicProfile container="mp4" codec="aac" />
        <PhotoProfile container="jpeg" />
      </DirectPlayProfiles>
      <CodecProfiles>
        <VideoCodec name="h264,hevc">
          <Limitations>
            <UpperBound name="video.width" value="1920" isRequired="true" />
            <UpperBound name="video.height" value="1080" isRequired="true" />
            <UpperBound name="video.bitDepth" value="8" />
          </Limitations>
        </VideoCodec>
        <VideoAudioCodec name="aac">
          <Limitations>
            <UpperBound name="audio.channels" value="2" />
          </Limitations>
        </VideoAudioCodec>
      </CodecProfiles>
    </Client>
    

    Basically, just add ,hevc after every instances of h264 (s/h264/h264,hevc/). However, Apple has a restriction on HEVC: the codec_tag_name must be hvc1, but some tools (like ffmpeg) default to hev1.

    Here's the command I used to re-tag the files:

    ffmpeg -i yourinput.mp4 -tag:v:0 hvc1 -hide_banner -max_muxing_queue_size 40960 -movflags faststart -write_tmcd on -vcodec copy -scodec copy -acodec copy -map 0 youroutput.mp4

    Poof! Plex Web reports 'Direct Play' when watching an H265 file on the Apple TV. Applying the same change in iOS.xml also allows Direct Play to iPhone and iPad. I haven't been able to get web playback in Safari, though.

    Honestly, I'm not sure why Plex hasn't done this. I figured I was late to the game because I only figured this out after the tvOS beta ended, but I've had this working for weeks now. It is a bit annoying that each Plex server update overwrites my changes to these files. I guess the codec_tag_name is a bit of a sticking point, but a very light change to the metadata before the file is sent to the Apple TV should fix that.

    Note: Apple TV 4K is not required.

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    @phiredrop said:
    I too am seeing similar behavior on my iPad Pro with encoded .ts recordings. If I don't run my postprocessing script that transcodes to mp4, the original .ts files play fine. However after encoding them with handbrake to mp4, then renaming back to .ts for it to get placed in the Library, the iPad won't even play the file.

    However, I can get the file to play if I do one of two things:

    1. Change the Home Streaming quality on the iPad Plex app so anything lower than 1080p 20Mbps
    2. Change the video's file extension to .mp4
    1. I can confirm
    2. does not work for me as a fix, same behavior as before

    Frank

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    I think I identified the bug / behavior of transcoding or not:

    Every ts file > 10GB will be transcoded, plays perfectly
    Every ts file < 10GB will be direct played, what is not possible with native tvOS player -> black screen, but sound

    I did several tests on files short below and over 10GB and I am pretty sure that this is the faulty behavior. I also have evidence (by examples) that it is not the bitrate. One ts file e.g. above 10GB has bit rate of 9MBit and plays well. The counter example is below and has 9Mbit as well and does direct play.

    So is there any automatism which select transcoding or direct play by file size? It is definitely not the ts file as such.

    And I also assume a relation to the setting in plex:

    "Kleinere Videos in Original-Qualität wiedergeben"

    I do not know the exact translation, best guess is: "Play Smaller Videos at Original Quality"

    This setting can not be reseted to "off", the setting flips back to on after doing so. Was also reported here:

    https://forums.plex.tv/discussion/288934/play-smaller-videos-at-original-quality-can-not-be-exhibited

    The explanation is here:

    Play Smaller Videos at Original Quality: When the original video file's quality (bit rate) is less than the quality that you've selected for Internet Streaming, Plex will try to play the original video without converting (transcoding). In that case, auto quality will not be used. Once a video starts at original quality, it will stay at original quality during playback. This preserves the full quality, but playback may pause frequently if your connection becomes slow.
    To temporarily disable this for a specific video, open the Playback Settings inside of the video player and choose Convert instead of Play Original Quality.

    Or can someone from the plex team confirm that this setting is only related to internet streaming and does not have influences on other issues, maybe as the issue above?

    Best regards,
    Frank

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    I am lost and nobody from Plex team supports this ...

    One last thing. The client setting: Direct Play to Off does also not help.

    Reading this:

    https://support.plex.tv/hc/en-us/articles/227715247-Server-Settings-Bandwidth-and-Transcoding-Limits

    And especially this section:

    Note: If the deep analysis for a file hasn't yet been performed, your Plex Media Server will assume a [2 x >average bitrate] value if it's needed for streaming limitation calculations.

    One could derive: Files with less than 10 Mbits (from the max settings 20 MBs 1080) will not transcode. Basically this might be ok, but not OK for an interlaced ts file. And the 10Mbits obviously are not the real limit since I have one counter example. But it might be the ballpark for this decision.

    So again: How can I avoid direct play or force transcoding for such kind of ts files (to my experience smaller than 10GB file size or may less 10Mbit bitrate?

    Frank

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    could something like this help?

       <TranscodeTargets>
         <VideoProfile container="mp4" codec="h264" audioCodec="aac" context="all">
           <!-- Inspired by Handbrake's profiles -->
           <Setting name="VideoEncodeFlags" value="-x264opts bframes=3:cabac=1" />
         </VideoProfile>
         <VideoProfile protocol="hls" container="mpegts" codec="h264" audioCodec="aac,mp3" context="streaming">
           <Setting name="VideoEncodeFlags" value="-deinterlace -x264opts bframes=3:cabac=1" />
         </VideoProfile>
         <MusicProfile container="mp3" codec="mp3" />
         <PhotoProfile container="jpeg" />
       </TranscodeTargets>
    

    taken from here:

    http://forums.plex.tv/discussion/104321/interlace-settings

    Frank

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    Hi,

    no success with this try outs ..

    Frank

  • zarchivezarchive Posts: 5Members, Plex Pass Plex Pass

    Similar Problem - I’m not sufficiently technically minded to comment on any of the coding solutions: I outlined my problem here - thanks Frank for reading my post and directing me to your thread here. My post:

    https://forums.plex.tv/discussion/293704/apple-tv-app-defaults-to-play-original-quality-video-won-t-play-only-convert-automaticaly-works#latest

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    Hi,

    I can confirm, that the workaround as in the other thread above works for me as well, so choose automatically convert per individual file starts the film as well with both picture and sound.

    The file plays transcoded for video and audio.

    The general settings are not able to select "convert automatically".

    Frank

  • phiredropphiredrop Posts: 31Members, Plex Pass Plex Pass

    Anyone been able to downgrade and confirm the issue isn't in an older version? This bug, along with the DVR recordings crapping out early, are starting to cause contention in the household! Pretty disappointed in these major issues for being a paying customer.

  • phiredropphiredrop Posts: 31Members, Plex Pass Plex Pass

    Unfortunately no changes for me using the below updated versions:

    • ATV Plex App v 1.18.1
    • tvOS 11.1
    • Plex 1.9.6.4401 beta

    Workaround: set ATV Plex App Settings > Allow Direct Play to Off

  • fsl2014fsl2014 Posts: 92Members, Plex Pass Plex Pass

    Hi,

    same experience here. As to the workaround: I have to test this, this did not work for me with previous versions. I will updated.

    Thanks!

    Frank

«1
Sign In or Register to comment.