Page 1 of 1

2015 Sony Downmixed Audio

PostPosted: Tue Oct 09, 2018 7:35 pm
by cuf
The Sony XBR 2015 TVs can play pretty much anything untranscoded and hardly needs a DLNA server. I firmly believe the recommended Serviio profile already remuxes/transcodes more than it needs to for these TVs.

Unfortunately, the past few firmware updates the x850c lost a few features. Unless you are using the Video App from Sony, multi-channel audio that isn't Dolby Digital gets played in stereo (this includes DTS, PCM and AAC).

While Sony's video app will passthrough (or play the core of) DTS(HD) and transcode AAC to DD, the latter sounds like crap.

It doesn't look like Sony is going to change it back. The config for this and probably other models/years could use an update to force a transcode to AC3 (preferably at 640kbps) for anything greater than 2.0 that isn't already in that format.

Re: 2015 Sony Downmixed Audio

PostPosted: Tue Oct 09, 2018 7:58 pm
by atc98092
You might try a few different profiles, just to see if you can find one that performs better than the Sony profile. For example, the Roku 4K TV profile will transcode all audio except DD to AC3, and not touch most video. Once you find one that does what you need, you can create your own personal profile that Serviio won't remove at update time.

I agree about Sony reducing functionality. My older Blu Ray players would bitstream TrueHD and Master Audio from my BD rips, while my current BD player will only do TrueHD. DTS must have upped their license fee. That's the main reason I have switched to an Nvidia Shield as my streaming player. Costs a little more, but my BD and UHD rips now play with TrueHD/Atmos and DTS:X audio, full HDR and matching video framerate.

Re: 2015 Sony Downmixed Audio

PostPosted: Fri Nov 16, 2018 8:46 pm
by cuf
atc98092 wrote:You might try a few different profiles, just to see if you can find one that performs better than the Sony profile. For example, the Roku 4K TV profile will transcode all audio except DD to AC3, and not touch most video. Once you find one that does what you need, you can create your own personal profile that Serviio won't remove at update time.

I agree about Sony reducing functionality. My older Blu Ray players would bitstream TrueHD and Master Audio from my BD rips, while my current BD player will only do TrueHD. DTS must have upped their license fee. That's the main reason I have switched to an Nvidia Shield as my streaming player. Costs a little more, but my BD and UHD rips now play with TrueHD/Atmos and DTS:X audio, full HDR and matching video framerate.


Tried Roku 4K TV, and it worked okay for DTS-HD MA, but AAC 5.1 didn't get re-encoded. I will have to do some trial and error.
Still, I have no idea why the Sony profile is 5 years out of date.

2015 Sony Downmixed Audio

PostPosted: Sat Oct 12, 2019 12:35 pm
by Emileroure
I have a SONY Surround Sound amplifier that has 4 speaker outputs and a 2 speaker rear output. The problem is when listening to something the audio in all the speakers just cuts out. It doesnt do it because i turn up the volume, it just does it randomly. I can turn it off and on and sometimes the audio will work but just for a second.....

Re: 2015 Sony Downmixed Audio

PostPosted: Sat Oct 12, 2019 9:20 pm
by DenyAll
Still, I have no idea why the Sony profile is 5 years out of date.
Because it somewhat relies on Forum members submitting profiles. The developer cannot possibly have every TV/device in the world in his back room.

So, perhaps consider developing your own profile (people here can help), share it with the forum and if you get consensus, submit it for inclusion with the Serviio distribution. Sound like the one for this tv will be simple.

Re: 2015 Sony Downmixed Audio

PostPosted: Fri May 08, 2020 2:13 am
by cuf
I guess I'm going to have to do this. Now if someone could point me to a guide on how to actually modify a Serviio profile...
Seriously, I'm sick of AAC 5.1 audio coming through in stereo and Sony's own Video App is just kind of crap.
It's a necessary evil for 3D and 4k videos, but if I can remove the need for it for non-DD mixes, that would be great.

Re: 2015 Sony Downmixed Audio

PostPosted: Fri May 08, 2020 1:37 pm
by atc98092
cuf wrote:I guess I'm going to have to do this. Now if someone could point me to a guide on how to actually modify a Serviio profile...
Seriously, I'm sick of AAC 5.1 audio coming through in stereo and Sony's own Video App is just kind of crap.
It's a necessary evil for 3D and 4k videos, but if I can remove the need for it for non-DD mixes, that would be great.


This page has the basics about the different transcoding functions of the profile: https://www.serviio.org/index.php?optio ... icle&id=24

Also see this page for details about the overall profile layout: https://www.serviio.org/index.php?optio ... icle&id=16

Rather than making changes to the main profiles file, I suggest creating a user-profiles.xml file, and that way if you muck something up in the coding, you can remove the file and get Serviio working again.

Re: 2015 Sony Downmixed Audio

PostPosted: Mon May 25, 2020 4:54 am
by cuf
Hmm. So what did I do wrong? Created user-profiles.xml.
  Code:
<Profiles>
<Profile id="sony4k2015" name="Sony Bravia 4K TV (2015)" extendsProfileId="1">
       <!-- 2015 Sony XBR Models. KDL models need x265 re-encoded.  Note: Supported Codecs depend on firmware version.  Additionally, Sony prevented some Apps from supporting some codecs.
This is an experimental profile by Serviio Forum User DoctorM.
          -->
<Detection>
  <UPnPSearch>
    <FriendlyName>BRAVIA (KDL-\d{2}X[89]\d{2}[C].*)|(KD-\d{2}X[89]\d{3}[C].*)</FriendlyName>
  </UPnPSearch>
</Detection>
         <!-- act as WMP so that the TV doesn't show root categories -->
        <DeviceDescription>
         <ModelName>Windows Media Player Sharing</ModelName>
         <ModelNumber>3.0</ModelNumber>
         <Manufacturer>Microsoft Corporation</Manufacturer>
      </DeviceDescription>
      <ContentDirectoryMessageBuilder>org.serviio.upnp.service.contentdirectory.SonyDLNAMessageBuilder
        </ContentDirectoryMessageBuilder>
      <ContentDirectoryDefinitionFilter>org.serviio.upnp.service.contentdirectory.definition.WMPContentDirectoryDefinitionFilter
        </ContentDirectoryDefinitionFilter>
<!-- Rename native WMA formats to those supported by the tv -->
      <MediaFormatProfile mime-type="audio/x-ms-wma" name="WMABASE">WMA_BASE</MediaFormatProfile>
      <MediaFormatProfile mime-type="audio/x-ms-wma" name="WMAFULL">WMA_FULL</MediaFormatProfile>
      <!-- Rename 3gp profiles that can be played as AVC -->
      <MediaFormatProfile mime-type="video/mp4" name="AVC_MP4_MP_SD_AAC_MULT5">AVC_3GPP_BL_QCIF15_AAC</MediaFormatProfile>
      <!-- Rename native avi formats to those supported by the tv -->
      <MediaFormatProfile mime-type="video/avi" name="">AVI</MediaFormatProfile>
      <!-- Rename native mpeg2ts with h264+ac3/aac formats to those supported by the tv (aac support is not advertised by the renderer but it works) -->
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3,AVC_TS_HD_24_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU">AVC_TS_MP_HD_AC3</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3,AVC_TS_HD_24_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU">AVC_TS_MP_SD_AC3</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3,AVC_TS_HD_24_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU">AVC_TS_MP_HD_AAC_MULT5</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3,AVC_TS_HD_24_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU">AVC_TS_MP_SD_AAC_MULT5</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3_T,AVC_TS_HD_24_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_MP_HD_AC3_T</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3_T,AVC_TS_HD_24_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_MP_SD_AC3_T</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3_T,AVC_TS_HD_24_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_HP_HD_MPEG1_L2_T</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3_T,AVC_TS_HD_24_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_HP_SD_MPEG1_L2_T</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3_T,AVC_TS_HD_24_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_MP_HD_AAC_MULT5_T</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3_T,AVC_TS_HD_24_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_MP_SD_AAC_MULT5_T</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3_T,AVC_TS_HD_24_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_MP_SD_MPEG1_L3</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/vnd.dlna.mpeg-tts" name="AVC_TS_HD_50_AC3_T,AVC_TS_HD_24_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T">AVC_TS_MP_SD_MPEG1_L3_T</MediaFormatProfile>
      <!-- Rename transcoded mpeg2ts with h264 to one of the TV's supported profiles -->
      <MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO">AVC_TS_MP_HD_AC3_ISO</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO">AVC_TS_MP_SD_AC3_ISO</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO">AVC_TS_HP_HD_MPEG1_L2_ISO</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO">AVC_TS_HP_SD_MPEG1_L2_ISO</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO">AVC_TS_MP_HD_AAC_MULT5_ISO</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO">AVC_TS_MP_SD_AAC_MULT5_ISO</MediaFormatProfile>
      <MediaFormatProfile mime-type="video/mpeg" name="AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO">AVC_TS_MP_SD_MPEG1_L3_ISO</MediaFormatProfile>
   </MediaFormatProfiles>
      <H264LevelCheck>FILE_ATTRIBUTES</H264LevelCheck>
      <Transcoding>
         <Video targetContainer="matroska" targetACodec="ac3" aBitrate="640" forceInheritance="true">
            <Matches container="*" vCodec="*" aCodec="dts" />
            <Matches container="*" vCodec="*" aCodec="aac" />
            <Matches container="*" vCodec="*" aCodec="truehd" />
            <Matches container="*" vCodec="*" aCodec="dts-hd" />
            <Matches container="*" vCodec="*" aCodec="dca" />
              <Matches container="*" vCodec="*" aCodec="flac" />
              <Matches container="*" vCodec="*" aCodec="LPCM" />


         </Video>
         <Audio targetContainer="mo4" targetACodec="ac3" aBitrate="640" forceInheritance="true">
            <Matches container="*" Codec="dts" />
            <Matches container="*" Codec="aac" />
            <Matches container="*" Codec="truehd" />
            <Matches container="*" Codec="dts-hd" />
            <Matches container="*" Codec="dca" />
              <Matches container="*" aCodec="LPCM" />
              <Matches container="*" aCodec="flac" />

         </Audio>
      </Transcoding>
      <LimitImageResolution>false</LimitImageResolution>
</Profile>
</Profiles>


I'll admit, even with the guides, I really don't know what I'm doing.
It doesn't show up as an available profile for my devices in older versions of Serviio and v2.1 locks up all together.

Also, I'd like to specify PCM > 2 channels as a codec to transcode as well, but I can't find a way to make the distinction between multichannel PCM and PCM 2.0.
Edit: Updated code. Still doesn't work though.

Re: 2015 Sony Downmixed Audio

PostPosted: Mon May 25, 2020 3:03 pm
by atc98092
The user-profiles.xml requires these two lines at the very beginning of the page:
  Code:
<?xml version="1.0" encoding="UTF-8"?>
<Profiles version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.serviio.org/xsd/profiles/v/1.10/Profiles.xsd">


Paste those in as the very first two lines, and then we can see what (if anything) remains to resolve it for you.

Re: 2015 Sony Downmixed Audio

PostPosted: Tue May 26, 2020 5:06 am
by cuf
Even with that, v2.1 locks up when I put in the user-profiles.
It might be the profiles, but considering it doesn't recover gracefully, it might be 2.1.
If you don't see any obvious issues, I'll have to roll back versions sometime and try again.

Re: 2015 Sony Downmixed Audio

PostPosted: Tue May 26, 2020 1:21 pm
by atc98092
I think I did find the error, as it's missing the opening <MediaFormatProfiles> tag. You could add that at line 21 and try it again.

Let's simplify the profile. Remove all of the sections prior to the <Transcoding> line. Most likely none of it is really necessary.

Re: 2015 Sony Downmixed Audio

PostPosted: Wed May 27, 2020 4:07 am
by cuf
So now it looks like this:
  Code:
<?xml version="1.0" encoding="UTF-8"?>
<Profiles version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.serviio.org/xsd/profiles/v/1.10/Profiles.xsd">
<Profiles>
<Profile id="sony4k2015" name="Sony Bravia 4K TV (2015)" extendsProfileId="1">
       <!-- 2015 Sony XBR Models. KDL models need x265 re-encoded.  Note: Supported Codecs depend on firmware version.  Additionally, Sony prevented some Apps from supporting some codecs.
This is an experimental profile by Serviio Forum User DoctorM.
          -->
<Detection>
  <UPnPSearch>
    <FriendlyName>BRAVIA (KDL-\d{2}X[89]\d{2}[C].*)|(KD-\d{2}X[89]\d{3}[C].*)</FriendlyName>
  </UPnPSearch>
</Detection>
         <!-- act as WMP so that the TV doesn't show root categories -->
        <DeviceDescription>
         <ModelName>Windows Media Player Sharing</ModelName>
         <ModelNumber>3.0</ModelNumber>
         <Manufacturer>Microsoft Corporation</Manufacturer>
      </DeviceDescription>
      <ContentDirectoryMessageBuilder>org.serviio.upnp.service.contentdirectory.SonyDLNAMessageBuilder
        </ContentDirectoryMessageBuilder>
      <ContentDirectoryDefinitionFilter>org.serviio.upnp.service.contentdirectory.definition.WMPContentDirectoryDefinitionFilter
        </ContentDirectoryDefinitionFilter>
      <Transcoding>
         <Video targetContainer="matroska" targetACodec="ac3" aBitrate="640" forceInheritance="true">
            <Matches container="*" vCodec="*" aCodec="dts" />
            <Matches container="*" vCodec="*" aCodec="aac" />
            <Matches container="*" vCodec="*" aCodec="truehd" />
            <Matches container="*" vCodec="*" aCodec="dts-hd" />
            <Matches container="*" vCodec="*" aCodec="dca" />
              <Matches container="*" vCodec="*" aCodec="flac" />
              <Matches container="*" vCodec="*" aCodec="LPCM" />


         </Video>
         <Audio targetContainer="mo4" targetACodec="ac3" aBitrate="640" forceInheritance="true">
            <Matches container="*" Codec="dts" />
            <Matches container="*" Codec="aac" />
            <Matches container="*" Codec="truehd" />
            <Matches container="*" Codec="dts-hd" />
            <Matches container="*" Codec="dca" />
              <Matches container="*" aCodec="LPCM" />
              <Matches container="*" aCodec="flac" />

         </Audio>
      </Transcoding>
      <LimitImageResolution>false</LimitImageResolution>
</Profile>
</Profiles>

Same thing. The console loads, but then the Serviio service shuts itself down.

Re: 2015 Sony Downmixed Audio

PostPosted: Wed May 27, 2020 1:51 pm
by atc98092
OK, I'd need to see the Serviio log, as it should indicate what in the profile is tripping it up.