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!

Plex Forcing a Transcode on iOS

bigtimeboochbigtimebooch Posts: 7Members, Plex Pass Plex Pass
edited October 3 in iOS

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.

Comments

  • AchillesAchilles Posts: 1,908Members, Plex Pass, Plex Ninja Plex Ninja

    What is the container format?

  • bigtimeboochbigtimebooch Posts: 7Members, Plex Pass Plex Pass
    edited October 4

    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: 1,908Members, Plex Pass, Plex Ninja Plex Ninja
    edited October 4

    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 mpegts 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: 1,908Members, 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: 1,908Members, 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: 7Members, Plex Pass Plex Pass
    edited October 4

    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: 1,908Members, Plex Pass, Plex Ninja Plex Ninja

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

  • AchillesAchilles Posts: 1,908Members, Plex Pass, Plex Ninja Plex Ninja

    This is how I personally configure mine.

  • bigtimeboochbigtimebooch Posts: 7Members, 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: 26Members, Plex Pass Plex Pass

    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

Sign In or Register to comment.