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!

BUG: Plex Forcing a Transcode on iOS

bigtimeboochbigtimebooch Posts: 9Members, Plex Pass Plex Pass
edited December 2017 in iOS

Edit: We now have a good half dozen people reporting identical behavior. It has been this way for over six months. This sure sounds like a bug yet I see zero responses from anyone that can actually fix this.

Problem: H.264 mkv files get transcoded on iOS no matter what the settings are for playback quality. Converting these files to an mp4 container allows for direct play, indicating that the issue is not with the encoding of the file itself or the bandwidth of the connection or the cpu strength of the player.

Expectation: H.264 mkv files should direct play if the same file can direct play when converted to an mp4 wrapper (no re-encoding, direct copy of streams).

I just moved to an iPad Pro from an android tablet for plex playback and noticed many files that should be able to be direct streamed are being transcoded by Plex. Selecting "original quality" in the drop down does nothing. Several times, transcoded bitrates are higher than the original bitrate! What the hell is going on? This is the core functionality of Plex and it appears to be broken on iOS.

There was a post with this exact same issue from May and it was shown as "answered" despite it obviously being a bug.

Before you ask:

  • H.264 encoding, Level 4.0, Stereo AAC Audio
  • No subtitles being used
  • Server is set to "maximum" playback quality
  • There is plenty of network bandwidth to do a direct stream (my lowly Nexus 5 and my Pixel C tablet can play these same files at original quality)
  • Encodes using the exact same settings at slightly lower bitrates direct play just fine on the iPad (as in this likely isn't some "compatibility issue" with the files)

As near as I can tell, any file with a bitrate above 10.0 MBps (or perhaps a threshold on the file size itself?) gets transcoded on iOS. Are you trying to tell me an iPad Pro can't play a 1080p 10.5 MBps H.264 stream when a 3 year old android phone can? BS. This is a bug with Plex on iOS and it was shrugged off previously, so here I am trying to bring more attention to it.

I can provide sample files if necessary.

«1

Comments

  • AchillesAchilles Posts: 2,134Members, Plex Pass, Plex Ninja Plex Ninja

    What is the container format?

  • bigtimeboochbigtimebooch Posts: 9Members, Plex Pass Plex Pass
    edited October 2017

    Containers are mostly mkv and a few mp4...However, your comment inspired me to do a bit more testing:

    It looks like the mp4 encodes all direct play. Some of the mkv files direct play, but most get transcoded.

    I took a high bit rate mkv (8.6 mbps) that was being transcoded by the iPad plex app and converted it to an mp4 container (straight copy using ffmpeg, no re-encode) and it direct plays just fine...the plot thickens!

    But I also found a lower bit-rate (3.5 mbps) mkv file that plays via direct stream just fine. Only minor differences in encoding between those two files (level 4.1, VFR for the one that plays fine and level 4.0, CBR for the one that has issues). Both have embedded subtitle tracks. The only big difference is the one that plays fine has only one AAC audio track while the one with issues has multiple audio tracks (AAC stereo being the first track).

    Maybe I'll try stripping out the extra audio tracks on the one with issues and see if that does anything....

    I also took a small, two minute chunk of the mkv file that transcodes and the small file also transcodes - so much for the large file size theory.

    Seems like Plex is messing up the direct stream of the video (or thinks it can't do it when it can), considering the conversion to mp4 container allows it to play just fine - unless I'm misunderstanding how the direct stream works?....I'd very much like to avoid converting all the mkv files over to mp4 just because I now have an iOS device....

    One other thing with all of these mkv files is that they have multiple audio streams and embedded subtitles (again, subtitles are off in Plex). First audio track is always AAC Stereo, next is usually a DTS or Dolby passthrough....

  • AchillesAchilles Posts: 2,134Members, Plex Pass, Plex Ninja Plex Ninja
    edited December 2017

    MKVs are not a supported Direct Play file format for any Apple iOS/tvOS device. If the video/audio codecs used inside the mkv file container are natively supported by Apple's API on iOS/tvOS devices, at the very least it will remux the MKV to MP4 container, resulting in Direct Stream playback. If either the video or audio codecs (or both) are not supported by Apple's API, it will transcode the respective stream(s).

  • AchillesAchilles Posts: 2,134Members, Plex Pass, Plex Ninja Plex Ninja

    Here is an example of an MKV that has supported codecs:

    Media
    Video Resolution 480p
    Duration 1:36:10
    Bitrate 3032 kbps
    Width 720
    Height 480
    Aspect Ratio 1.78
    Container MKV
    Video Frame Rate 24p
    Video Profile high
    
    Part
    Duration 1:36:10
    File Win a Date with Tad Hamilton! (2004).mkv
    Size 2.04 GB
    Container MKV
    Video Profile high
    
    Codec H264
    Bitrate 2200 kbps
    Language English
    Anamorphic 1
    Bit Depth 8
    Chroma Subsampling 4:2:0
    Color Range tv
    Color Space smpte170m
    Frame Rate 23.976 fps
    Height 480
    Level 3.1
    Pixel Aspect Ratio 186:157
    Profile high
    Ref Frames 5
    Scan Type progressive
    Width 720
    
    Codec AC3
    Channels 5.1
    Bitrate 448 kbps
    Language English
    Audio Channel Layout 5.1(side)
    Sampling Rate 48000 Hz
    Title Surround 5.1
    
    Codec AC3
    Channels 5.1
    Bitrate 384 kbps
    Language Français
    Audio Channel Layout 5.1(side)
    Sampling Rate 48000 Hz
    Title Surround 5.1
    Codec VOBSUB
    Language English
    Title SDH
    


    tail -f /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log | grep mkv
    Oct 03, 2017 23:20:51.393 [0x7fc99fffd700] DEBUG - MDE: Win a Date with Tad Hamilton! (2004): no direct play video profile exists for http/mkv/h264
    Oct 03, 2017 23:20:51.393 [0x7fc99fffd700] DEBUG - MDE: Win a Date with Tad Hamilton! (2004): no direct play video profile exists for http/mkv/h264/ac3
    Oct 03, 2017 23:20:51.394 [0x7fc99fffd700] DEBUG - Streaming Resource: Reached Decision id=45208 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. No direct play video profile exists for protocol http, with container mkv, and video codec h264. Transcode=1001,Direct play not available; Conversion OK.) media=(id=130579 part=(id=130584 decision=transcode container=mpegts protocol=hls streams=(Video=(id=713055 decision=copy width=720 height=480) Audio=(id=713056 decision=copy channels=6 rate=48000))))
    
  • AchillesAchilles Posts: 2,134Members, Plex Pass, Plex Ninja Plex Ninja

    Here is an example of an MKV that does not have a supported video codec:

    Media
    Video Resolution 480p
    Duration 1:26:32
    Bitrate 6493 kbps
    Width 720
    Height 480
    Aspect Ratio 1.78
    Container MKV
    Video Frame Rate NTSC
    Video Profile main
    
    Part
    Duration 1:26:32
    File Good Witch's Garden, The (2009).mkv
    Size 3.93 GB
    Container MKV
    Video Profile main
    
    Codec MPEG2VIDEO
    Bitrate 6301 kbps
    Language English
    Anamorphic 1
    Bit Depth 8
    Chroma Subsampling 4:2:0
    Color Range tv
    Frame Rate 29.97 fps
    Height 480
    Level 8
    Pixel Aspect Ratio 186:157
    Profile main
    Ref Frames 1
    Scan Type interlaced
    Width 720
    
    Codec AC3
    Channels Stereo
    Bitrate 192 kbps
    Language English
    Audio Channel Layout stereo
    Sampling Rate 48000 Hz
    Title Stereo
    


    tail -f /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log | grep mkv
    Oct 03, 2017 23:29:47.283 [0x7fc9c9bfe700] DEBUG - MDE: The Good Witch's Garden (2009): no direct play video profile exists for http/mkv/mpeg2video
    Oct 03, 2017 23:29:47.283 [0x7fc9c9bfe700] DEBUG - MDE: The Good Witch's Garden (2009): no direct play video profile exists for http/mkv/mpeg2video/ac3
    Oct 03, 2017 23:29:47.284 [0x7fc9c9bfe700] DEBUG - Streaming Resource: Reached Decision id=48541 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. No direct play video profile exists for protocol http, with container mkv, and video codec mpeg2video. Transcode=1001,Direct play not available; Conversion OK.) media=(id=969506 part=(id=969514 decision=transcode container=mpegts protocol=hls streams=(Video=(id=1971517 decision=transcode bitrate=9451 encoder=h264_vaapi width=854 height=480) Audio=(id=1971518 decision=copy channels=2 rate=48000))))
    
  • bigtimeboochbigtimebooch Posts: 9Members, Plex Pass Plex Pass
    edited October 2017

    Yeah, I'm just looking at what the ipad app is telling me and the crazy CPU load on my server. They've obfuscated the playback info on the app, so it only says "direct" and doesn't differentiate between direct play and direct stream - sorry if I confused the two earlier. To be clear: I want it to direct stream these files instead of transcoding them, which as far as I know, it should be able to do (right?!). Again, they are all H264. I re-encoded all of these myself from blu ray rips - I didn't accidentally encode them in MPEG2.

    My properties for both mkv files I am testing match the ones you posted for one that should play without transcoding (aside from different bit rate, resolution, and mine being level 4.0 rather than 3.1).

  • AchillesAchilles Posts: 2,134Members, Plex Pass, Plex Ninja Plex Ninja

    Oh I forgot, Plex has Automatic Bitrate now. Turn that off to prevent forced transcoding.

  • AchillesAchilles Posts: 2,134Members, Plex Pass, Plex Ninja Plex Ninja

    This is how I personally configure mine.

  • bigtimeboochbigtimebooch Posts: 9Members, Plex Pass Plex Pass

    That matches my settings as well :/

    I tried it with the auto-adjust on and off - doesn't seem to make a difference.

  • yohannmonnieryohannmonnier Posts: 8Members, Plex Pass Plex Pass

    It is because this is a bug of the iOS app, it always try to transcode to 20mbps and 1080 for any file on my side!

  • tomyuntomyun Posts: 47Members ✭✭

    Sounds like you have a similar issue to me. My iPad always tries transcoding for 1080p movies:
    https://forums.plex.tv/discussion/286072/strange-behavior-of-recommended-settings-for-original-video-quality

  • niallobrniallobr Posts: 141Members, Plex Pass Plex Pass
    edited November 2017

    I have a similar issue. My TVheadend recordings are in an MKV container with h264 video and AAC audio. PMS is transcoding the video and audio when played on iOS. Fine on Nvidia Shield TV. Looks like a bug?

    PMS: Nvidia SHIELD TV / Synology DS1513+

    Client: Shield TV / Xbox One S

    Remote: Logitech Harmony Elite

  • wes.hildebrandtwes.hildebrandt Posts: 1Members, Plex Pass Plex Pass

    @Achilles @bigtimebooch this still seems to be an issue for the iOS app. Has there been any update on this problem?

  • CoreMacFlyCoreMacFly Posts: 18Members, Plex Pass Plex Pass


    All my HEVC file played fine until last update
    now transcode
    i do only MP4 files and every file has an AAC track included

    Here bad choice of the audio track that needs a transcode but the HEVC video played fine and now PMS does a transcode to H264 !

    Only one file could not be played on the ipad it's a 2160p H265file !

  • cfmatrecfmatre Posts: 10Members, Plex Pass Plex Pass

    I converted it to an mp4 container (straight copy using ffmpeg, no re-encode). That fixed it for me.

  • bigtimeboochbigtimebooch Posts: 9Members, Plex Pass Plex Pass

    A little update: converting to an mp4 container (ffmpeg copy mode, no re-encode) brings direct play back. But this is not a viable solution for me as it would be converting thousands of files and manually updating other cataloging software I use that relies on the file name.

    Again, I will state that this is a bug in the iOS app.

    It would be nice to hear something from the devs on this. We have multiple people showing that mkv files transcode when they should be direct playing on iOS. The few "answers" I have seen give the same canned response about file types and formats. If we direct copy to an mp4 container and it can suddenly direct play, it seems to me that the encoding is just fine and plex should be able to unwrap the same encoding in an mkv container and direct play.

  • kclimiekclimie Posts: 83Members, Plex Pass Plex Pass
    edited December 2017

    As @Achilles stated, MKV cannot be Direct Played on iOS and/or tvOS. The players use Apples built-in player for media which does not support the container format. The best you can hope for is Direct Stream which re-muxes the media from MKV into a compatible streaming format (HLS).

    In order for Direct Stream to work, the media streams within the container must be in a 100% compatible format.

    Even though you don't like it, the answers you have seen appear to be "canned responses," because they are all stating the same facts and are correct.

  • niallobrniallobr Posts: 141Members, Plex Pass Plex Pass

    @kclimie said:
    As @Achilles stated, MKV cannot be Direct Played on iOS and/or tvOS. The players use Apples built-in player for media which does not support the container format. The best you can hope for is Direct Stream which re-muxes the media from MKV into a compatible streaming format (HLS).

    In order for Direct Stream to work, the media streams within the container must be in a 100% compatible format.

    Even though you don't like it, the answers you have seen appear to be "canned responses," because they are all stating the same facts and are correct.

    MKV’s with a h264 video stream and AAC audio stream are resulting in a full transcode of both streams instead of Direct Stream - this is not the expected behaviour.

    PMS: Nvidia SHIELD TV / Synology DS1513+

    Client: Shield TV / Xbox One S

    Remote: Logitech Harmony Elite

  • thenexus7thenexus7 Posts: 5Members, Plex Pass Plex Pass

    @kclimie said:
    As @Achilles stated, MKV cannot be Direct Played on iOS and/or tvOS. The players use Apples built-in player for media which does not support the container format. The best you can hope for is Direct Stream which re-muxes the media from MKV into a compatible streaming format (HLS).

    In order for Direct Stream to work, the media streams within the container must be in a 100% compatible format.

    Even though you don't like it, the answers you have seen appear to be "canned responses," because they are all stating the same facts and are correct.

    I have the exact same issue, and after some researchs I’ve found that the exact same file, played with another player on the same device just works ok!

    HEVC 1080p AAC 5.1 file played through PLEX —> transcoded to —> Apple TV 4
    Same file played through the network with Infuse —> direct stream (no transcoding) to —> Apple TV 4

    There’s something wrong in here! Because the both apps are FFMPEG based please PLEX Team have a look at this :wink:

  • kclimiekclimie Posts: 83Members, Plex Pass Plex Pass
    edited December 2017

    My understanding is that the Infuse player uses its own playback engine that can play just about anything - effectively the decoding is done on the client side. The Plex app uses Apples player which has some very strict media-compatibility requirements.

«1
Sign In or Register to comment.