iOS/tvOS aac+hevc xml tweaks into mainline?

Server Version#:1.19.1.2645-ccb6eb67e
Player Version#: 2.16

tvOS and iOS has had support for multichannel AAC for a while, how soon before we can set audio.channels=6 ? both platforms handle downmixing nicely. this would save server CPU time transcoding to AC3. much of my content is encoded w/ hevc+aac in mp4 containers.

iOS can also support direct playback of h265/hevc in mp4 containers. how long before we can put that in the mainline xml as well? reduces server cpu and network utilization for the h264 conversions. also allows offline mode for content without transcoding.

19c19
<     <VideoProfile container="mp4,mov" codec="h264,h265,hevc,mpeg4" audioCodec="aac" subtitleCodec="mov_text,tx3g,ttxt,text" />
---
>     <VideoProfile container="mp4,mov" codec="h264,mpeg4" audioCodec="aac" subtitleCodec="mov_text,tx3g,ttxt,text" />
39c39
<         <UpperBound name="audio.channels" value="6" onlyTranscodes="true" />
---
>         <UpperBound name="audio.channels" value="2" onlyTranscodes="true" />
2 Likes

This would be super helpful, I’ve been manually editing these files for over two years (support was added in iOS 11, 2017!!) now and it feels like it’s more than time for this to be default behavior.

1 Like

no other responses but a +1 eh? :frowning:

Your comment peaked my interest. Would you provide an example of how to edit the files manually?

my server’s linux/centos 7. whenever there’s a plexmediaserver package update, i run this script after install and before starting the service.

1 Like

Pretty much what nadams5855 said. Works great, I use an AppleTV 4K as my main playback device and it passes HEVC (h265) and full 5.1 audio without any issue, no transcode. It’s really a bummer on the default settings that it will transcode all audio down to just stereo, and I just can’t understand why.

Thank you very much for posting this. I am in the process of modifying it to work on MacOS and running into an issue I can’t figure out. The sed command gives me an error:

sed: 1: "/Applications/Plex\ Med ...": extra characters at the end of P command

I searched this error and found some answers but unfortunately they don’t seem to apply here as there is no “p” command that I see in your sed argument. I am thinking the sed command is interpreting the path as part of the command but that would be odd. Here is the complete line:

sed -Ei 's/<UpperBound name="audio.channels" value="2" onlyTranscodes="true" \/>/<UpperBound name="audio.channels" value="6" onlyTranscodes="true" \/>/g' /Applications/Plex\ Media\ Server.app/Contents/Resources/Profiles/iOS.xml

Any help would be appreciated.

for macOS, sed -Ei '' instead of sed -Ei. -i on macOS is expecting a file extension.

from the man page:

     -i extension
             Edit files in-place, saving backups with the specified extension.
             If a zero-length extension is given, no backup will be saved.  It
             is not recommended to give a zero-length extension when in-place
             editing files, as you risk corruption or partial content in situ-
             ations where disk space is exhausted, etc.
1 Like

Given the cryptic error, that would have been tough for me to decipher. I appreciate you saving me many hours of frustration. Thank you!

We are ignoring the warning and giving the -i argument a “zero-length” extension.

Could I just remove the cp commands in your script and use:

sed -Ei 'bak' instead?

I guess we’d have to combine the first two sed arguments?

In any case it worked perfectly after making that edit.

i think combining the two sed search and replace into one command would be tough. you’re welcome to give it a whirl though. this script isn’t the only solution (really, plex integrating these changes to mainline xmls would be best!). i’m sure there’s better/other ways to do it.

I thought editing iOS.xml might be the solution to streaming some HEVC files that I have to iOS. Unfortunately, it didn’t solve the problem. In fact it seems to make matters worse. I am trying to narrow it down. One potential issue is the video stream:

Stream #0:0(und): Video: hevc (Main 10) (hev1 / 0x31766568)

I think on MacOS the hev1 tag is incompatible and should be hvc1 instead:

Stream #0:0(und): Video: hevc (Main 10) (hvc1 / 0x31637668)

Now that I see the upper bound is 8 bit color the other potential issue could be 10 bit color.

i can reproduce the playback problem on my 11 pro but not my ipad pro, both running ios 13.4.1. tvOS works fine.

i tried both the old and new player settings. i tried the other tag modes too in the xml, same behavior.

my 480p 10b/aac 2ch content works fine on the 11 pro but not 1080p 10b/aac 6ch content. time to try some other variables i guess.

upgraded to ios 13.5 on my 11pro max, still had problems w/ 1080p hevc 10bit/aac 5.1. i reinstalled plex and my playback issues went away.

still nothing from plex itself? i’d file a feature request but there doesn’t seem to be a way to do so.

HEVC is now working without modifying anything. I think the many updates to both Plex Server and the Plex iPhone app have resolved these issues, and possibly in combination with iOS 13.5. Thinking I will keep things locked down right here.

iOS 13.5
Plex iOS 7.1
Plex Server Version 1.19.4.2935

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.