Chromecast AAC 7.1 stopped working (AAC 5.1 works)

Thank you for looking into this, from my side i have not gotten it working at all using the xml, and i have played with it quite a bit. It seems to me that it is ignoring the settings i specify in the xml and still trying to set it to 2ch and attempts to transcode it.

I suspect this is happening to due to the augmented profile being pulled down that you are using as a current work around for the ultra (so it does hevc 4k etc) and somewhere it has something that overrides the local xml.

Could we not make it so that the local xml has priority? Or am i barking up the wrong tree here, i’ll gladly post my xml i’m using if it helps at all

<?xml version="1.0" encoding="utf-8"?>
<Client name="Chromecast">
  <!-- Author: Plex Inc. -->
  <TranscodeTargets>
    <VideoProfile protocol="hls" container="mpegts" codec="h264,vp9,hevc,h265,mpeg1video,mpeg2video,mpeg4" audioCodec="ac3,mp3" context="streaming">
      <Setting name="VideoEncodeFlags" value="-x264opts bframes=3:cabac=1" />
    </VideoProfile>
    <VideoProfile protocol="http" container="matroska" codec="h264,vp9,hevc,h265,mpeg1video,mpeg2video,h264,mpeg4" audioCodec="ac3,mp3" context="streaming">
      <Setting name="VideoEncodeFlags" value="-x264opts bframes=3:cabac=1" />
    </VideoProfile>
    <VideoProfile protocol="dash" container="mp4" codec="h264,vp9,hevc,h265,mpeg1video,mpeg2video,h264,mpeg4" audioCodec="ac3,mp3" context="streaming">
      <Setting name="VideoEncodeFlags" value="-x264opts bframes=3:cabac=1" />
    </VideoProfile>
    <MusicProfile container="matroska" codec="mp3" />
    <PhotoProfile container="jpeg" />
  </TranscodeTargets>
  <TranscodeTargetProfiles>
    <VideoTranscodeTarget protocol="http" context="streaming">
      <VideoCodec name="*">
        <Limitations>
        </Limitations>
      </VideoCodec>
    </VideoTranscodeTarget>
    <VideoTranscodeTarget protocol="dash" context="streaming">
      <VideoCodec name="*">
        <Limitations>
        </Limitations>
      </VideoCodec>
    </VideoTranscodeTarget>
  </TranscodeTargetProfiles>
  <DirectPlayProfiles>
    <VideoProfile container="matroska" codec="vp9,hevc,h265,mpeg1video,mpeg2video,h264,mpeg4" audioCodec="eac3,dca,ac3,aac,mp3" subtitleFormat="srt,ass" />
	<VideoProfile container="avi" codec="vp9,hevc,h265,mpeg1video,mpeg2video,mpeg,mjpeg,msmpeg4v2,h264,mpeg4" audioCodec="eac3,ac3,dca,aac,mp3" subtitleFormat="srt,ass" />
    <VideoProfile container="mkv" codec="vp9,hevc,h265,mpeg1video,mpeg2video,h264,mpeg4" audioCodec="eac3,ac3,dca,mp3," subtitleFormat="srt,ass" />
    <VideoProfile container="flv" codec="hevc,mpeg1video,mpeg2video,h264,mpeg4" audioCodec="eac3,ac3,dca,aac,mp3,mp2,pcm,flac" />
    <PhotoProfile container="jpeg,gif,bmp,png" />
  </DirectPlayProfiles>
  <ContainerProfiles>
    <VideoContainer name="mp4">
      <Limitations>
        <Match name="part.optimizedForStreaming" value="1" />
      </Limitations>
    </VideoContainer>
  </ContainerProfiles>
  <CodecProfiles>
    <VideoCodec name="*">
      <Limitations>
	  <UpperBound name="video.width" value="3840" isRequired="true" />
        <UpperBound name="video.height" value="2160" isRequired="true" />
      </Limitations>
    </VideoCodec>
	<VideoAudioCodec name="aac">
      <Limitations>
               <UpperBound name="audio.channels" value="8" />
      </Limitations>
    </VideoAudioCodec>
    <MusicCodec name="mp3">
      <Limitations>
        <UpperBound name="audio.bitrate" value="320" />
        <UpperBound name="audio.channels" value="2" />
      </Limitations>
    </MusicCodec>
  </CodecProfiles>
</Client>

my current config, that is not working

Im on mobile but that doesnt seem to be the xml shared here and confirmed to work with the ultra, there’s a lot more stuff there ( some confusin things to)

In any case the local Profiles do override the bundled ones.

after reading your message and playing with it a bit i have discovered the following:

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

if i do this and force all 7.1 to 5.1 it works, sorry i was working under a false premise with the augmented profile

This is of course a workaround and doesn’t give my avr 7.1 passthrough (which i don’t need) but it works

So now looking in desktop, yeah that profile doesn’t make much sense, I’m not sue what you are trying to do but you are telling Chromecast that everything can be a Tranascode Target, and then you do the same on DirectPlay profiles!

Transcode Targets define the formats to which PMS will transcode media when the media’s format is not listed inside a DirectPlay Profile (or when the Media Decision Engine/Client profile augmentation provides those, this also means you don’t need to list all of that in the DirectPlay section unless it was for a custom client or DLNA i.e.)

See the example posted above (https://github.com/lukegackle/Plex-Media-Server-Chromecast-XML-profile/blob/master/Chromecast.xml) that should work fine for the Ultra.

Its a very clean profile, it simply removes “AAC” as a transcode target as it seems it was giving issues! But the most important part is the that is changes the Upper.Bound audio.channels limit to 6 rather than 2. You don’t need all the rest.

1 Like

BTW we are still very interested in samples that trigger the issue for you guys as this will help identify and confirm a fix if/when we have it.

I’m surprised you suggest modifying Chromecast.xml, since those changes seemingly do nothing for the Ultra. I think the augmented Ultra profile will always override the base Chromecast XML. See the following from my logs:

[Chromecast] X-Plex-Client-Profile-Extra: add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.width&value=4096&replace=true)+add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.height&value=2160&replace=true)+add-limitation(scope=videoCodec&scopeName=hevc&type=upperBound&name=video.bitDepth&value=10&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&protocol=http&videoCodec=hevc)+add-transcode-target-audio-codec(type=videoProfile&context=streaming&protocol=http&audioCodec=ac3)+add-limitation(scope=videoAudioCodec&scopeName=ac3&type=upperBound&name=audio.channel&value=6)+add-transcode-target-audio-codec(type=videoProfile&context=streaming&protocol=http&audioCodec=eac3)+add-limitation(scope=videoAudioCodec&scopeName=eac3&type=upperBound&name=audio.channel&value=6)+add-limitation(scope=videoAudioCodec&scopeName=aac&type=upperBound&name=audio.channel&value=2)+add-limitation(scope=videoTranscodeTarget&scopeName=hevc&scopeType=videoCodec&context=streaming&protocol=http&type=match&name=video.colorTrc&list=bt709|bt470m|bt470bg|smpte170m|smpte240m|bt2020-10|smpte2084&isRequired=false)

Notice the audio channel number limitations — there is no way I can find to increase these. If you modify an XML these flags still get passed and the limitations appear to take effect. In my case I have files that are DTS-HD 7.1 that are forced to transcode to EAC3 5.1 instead of the desired EAC3 7.1 that my TV and speakers support, I believe that is because of these incorrect channel limitations. I think the solution here is pretty easy: create a way to actually use our own XMLs from Chromecast Ultra without the augmented profile stepping on them, and then everyone can customize to fit their personal use case. Then after that you can work on having Plex doing better automatically :slight_smile:

Agree with the changing of Chromecast.xml. I do that after each server update. I have the one from Github and just substitute it in:

C:\Program Files (x86)\Plex\Plex Media Server\Resources\Profiles\Chromecast.xml

Works now like it used to. I have 7.1 encoded h264, 5.1 encoded, etc. This fixes for both my Chromecast Ultra and my normal Chromecast (For troubleshooting I’ve left my old chromecast in place). These are in the back of my Devon AV receiver. I get actual 7.1 output. I also get HiDef res when using my Headphones. Those didn’t work prior to the fix. Would only get the error. So, yep, pain in the behind, which means that I do hop over some of the server updates, but the GetHub fix as seen below does work (I’m sure it could be argued that it it can be done in a few different ways, but just acknowledging that this does work). Really, really think that Plex has to fix this. Really not very professional. Maybe focus on this instead of online movies and Tidal? Here is the modified Chromecast.xml file:

<?xml version="1.0" encoding="utf-8"?>

I did not suggest that! Other users did and with proven good results! I just Instructed folks to how to do it on the the “APP SUPPORT DIR” so changes are kept on upgrades! This Profiles will override the ones we ship, and a few users report here it does work for them!

But reading the rest of you’re post that as nothing to do with AAC 7.1 which is the original issue here!

Transcode should actually work for that if we transcode AAC 8>2; its not working. DP or transcode to AAC 6 seems to work though… and that’s the issue we are trying to solve; If there’s issues with DTS or others than this would be another issue, also not sure why its transcoding to EAC3 5.1 as that wouldn’t match the Profile we have or the alternative suggested by users!

It might make more sense for you to open another thread so we can discuss it there (note that if you are using some other custom profile depending on what you have there its likely why that happens, if not that it could be a bug, but not the one we are discussing here)

Well we do have a way for custom Profiles to be used WITHOUT messing with the bundled ones, but this still requires you to identify a device, please read my post above as to why this is complicated with Chromecast!

Now, that said, it should still transcode from ACC 8>2 and that should mean we support all Chromecasts; for some reason the Ultra doesn’t work in this scenario and doesn’t give us very useful info why; I’m a bit inclined to say the server (transcoder) might be doing something wrong but devs are still investigating; and honestly what would help most here is getting some samples!

@Chad_2 FYI you can and should put the profile in the local app data dir as I suggested here: Chromecast AAC 7.1 stopped working (AAC 5.1 works)

This will make sure the Profile you set is not wiped on updates.

As for the rest please read my post above: Chromecast AAC 7.1 stopped working (AAC 5.1 works) as it explains why that’s not that simple; and that we are still looking into fixing the transcode issue!

Thanks @mikec_pt, I missed that. Sorry, I have been reporting this issue since July on this thread and am just a little frustrated. Glad that you guys are working it. Will be great when it’s finally fixed.

No worries, btw would it be possible for you to share one o the AAC7.1 files that fail for you with the normal profile?

I don’t need a full movie or anything just a sample (https://support.plex.tv/articles/201035968-generating-sample-files-from-media/)

@mikec_pt do you still need a sample? I can provide you one.
My freind has the same problem with the h4 error in combination with 7.1 audio. Only difference is that we have it on a chromecast 2.

Yes please, but that sounds a possible different issue since it also happens on Chromecast 2.

Hello @mikec_pt,

Not sure if it’s related but thought might help to have maybe more information. This seems to also to be impacting Gen3 as well I’ve been seeing it randomly start buffering. The only workaround I had was to go back 10 seconds and it would continue to play till the next random time. However, now it appears when I try the workaround I need to stop the movie and recast it.

I’ve seen it affecting videos with
video H.264 and audio AAC Stereo
Video H.264 and audio AAC 5.1

I also get this issue (h4 error) with 7.1 audio on both my Chromecast ultra and Chromecast 3rd gen. My Chromecast 2nd gen works fine, however.

This doesn’t seem related to the fail reported here, It can just be due to wireless or possibly a bug, but its best you open another thread on that (or search for a similar one). The issue here is that AAC7.1 doesn’t play at all.

1 Like

Thanks for sharing, are you able to share a sample of the failing file?

Sure, how would I go about doing this?