Post Tue Mar 15, 2011 1:16 pm

[Readme] Sony Bluray Disc/Network Media Players

History
07/07/2012 - minor wording corrections, added h264leveleditor link, linked to open FFmpeg support ticket for DTS remuxing issue.
18/02/2012 - added note about enabling DivX XSUB support, DivX/Xvid issues on 2011 models, updated TSMuxer download links, updated the sample edits to profiles.xml, added a section at the end about gaming surround headset support, and generally tidied up.




Important
- The 'Sony BD Player/SMP' device profile included with Serviio represents the best compromise for immediate usability in the broadest range of scenarios, and it is multiregion. The Sony SMP is basically a BDP without the Bluray drive, hence the unified profile. More experienced users may wish to make some specific tweaks for DTS audio or subtitles as described below.

- Be careful if you are buying a Sony player specifically for use with Serviio. While all 2010 players were DLNA-enabled, it looks like Sony have repositioned DLNA as a premium feature for 2011/2012. The BDP-S380 and BDP-S390 appear to be left out, with only the BDP-S480 and upwards having the DLNA client.

- Be very cautious about updating the firmware on your Sony devices from now on, as it's quite likely they will add Cinavia audio watermark detection soon which will prevent the playback of watermarked content (which will be a lot of Blurays going forward). The Sony PS3 for instance already has this, and the latest update for BDP-S390 (a non-DLNA product) has added it. Consult this list for more info. Even a recording of a watermarked audio track made using a microphone still contains the watermark. Remember firmware cannot be downgraded, so any future update that introduces Cinavia cannot be removed once applied.

- A while back, some users reported problems with MKV files that had been authored with newer versions of MKVToolNix which introduced MKV header compression. This results in a "Data corrupted" error message. More details in this forum thread.



Features not supported by Sony firmware - Serviio will not be able to fix these
- Thumbnail artwork for video or audio media is not supported, only for images. To vastly speed up adding content to Serviio's library, deselect Generate thumbnails for local videos in the Metadata tab of the Serviio console.

- Subtitles are not supported in MPEG Program Streams (VOB files from DVDs). The player supports these from disc, but not via DLNA. European and Canadian players support subtitles in Matroska files but this is disabled in Serviio by default for other reasons explained below. European and Canadian players do support DivX XSUB subtitles but this is disabled by default in the device profile to allow US region players to play AVI files. Read on to find out how to enable this.

- SRT subtitle files are not supported.

- AVC/H.264 High Profile Levels greater than 4.1 are not supported (use h264leveleditor or TSMuxer to change the level if higher. This usually works because the levels are often incorrectly set to start with).



Sony BD Player/SMP device profile evolution and design decisions
- The Sony-published format support list is inaccurate, particularly for DLNA

- Early testing showed that most formats can be played natively (i.e. without transcoding) on the BDP by forcing their mime-type to DivX, however DivX is not supported on US firmwares

- This originally meant that region-specific profiles were required, seeing as DLNA Resource types were also being forced, and these were PAL/NTSC specific (from Serviio 0.5.1 onwards this profile became multi-region).

- The European and Canadian (but not US) firmwares support subtitles and audio track selection for Matroska files. However, there are significant problems with this native Matroska playback, namely:
    1) the player makes individual HTTP requests for these files in 32KB chunks rather than a continuous stream, and it seems to be poorly buffered by the firmware. As such it stutters over wifi, even at quite low bitrates (above approx. 4-5Mbps). Since most people don't have a Cat5 cabled home, this would affect most Serviio users.
    2) FFwd/Rew seeking breaks. The file stutters immediately following seek, and is unwatchable from that point onwards. Pausing for a moment rectifies this but only for a few seconds, implicating the buffering on the player.
    3) the player stutters with bitrates over approx. 12Mbps, even on a wired connection. This typically affects high motion scenes in most HD movies.

- To fix the problems above, and to make Serviio as usable as possible for most people out of the box, all Matroska content is remuxed by default to MPEG Transport Stream (M2TS) with extremely low overhead even on NAS devices. High bitrate files (e.g. 30Mbps) play fine. Seeking works, but do wait a few minutes before trying to FFwd too far into a file as you'll be trying to play through faster than it has been remuxed.

- MP4 container videos do not support seeking either when played natively by the player, so they are also remuxed to MPEG Transport Stream. This fixes stuttering of H.264 MOV files from iPhone 4 HD recordings.

- Original audio is preserved wherever possible (AC-3 and AAC), however the FFmpeg tool which Serviio depends upon cannot currently remux DTS Audio properly (it ends up silent - open FFmpeg support ticket 1398), so the device profile transcodes it to AC-3. If DTS support is important to you there are two options:
    1) use TSMuxer to pre-convert your file from MKV to M2TS before adding it to your Serviio library, which will keep the DTS intact. This only takes a few minutes as it's a remux, not a transcode.
    2) if your BDP is on a wired connection and you can tolerate the problems described above, then edit the Transcoding section of the 'Sony BD Player/SMP' Profile as follows. Change this:
        Code:
            <Video targetContainer="mpegts" targetACodec="ac3" aBitrate="320">
               <!-- FFmpeg cannot currently remux dts audio properly so it must be transcoded, but all other audio is left alone -->
               <Matches container="matroska" aCodec="dca" />
               <Matches container="matroska" aCodec="vorbis" />
               <Matches container="ogg" vCodec="mpeg4" />
               <Matches container="mp4" aCodec="lpcm" />
            </Video>
            
    to this:
        Code:
            <Video targetContainer="mpegts" targetACodec="ac3" aBitrate="320">
               <!-- FFmpeg cannot currently remux dts audio properly so it must be transcoded, but all other audio is left alone -->
               <Matches container="matroska" aCodec="vorbis" />
               <Matches container="ogg" vCodec="mpeg4" />
               <Matches container="mp4" aCodec="lpcm" />
            </Video>
            
    If you have a US player, you also need to change this line in the MediaFormatProfiles section from:
        Code:
            <MediaFormatProfile mime-type="video/divx">MATROSKA</MediaFormatProfile>
            
    to
        Code:
            <MediaFormatProfile mime-type="video/mpeg">MATROSKA</MediaFormatProfile>
            
    Be aware that changes to the device profiles require the Serviio service to restart to take effect. Also note that in the transcoding section, Serviio will always select the first applicable match in the order they appear in the file.

- Apart from this subtitle/alt audio track support for Matroska (which has its own problems) there is basically no difference between the Sony firmware regions, so Serviio 0.5.1 introduced a multi-region profile now that multiple DLNA resource type substitutions can be specified. So both PAL- and NTSC-specific resources are advertised, with the renderer device only 'seeing' the one that its firmware allows.

- If MKV subtitle support is vital to you, you have a European or Canadian player, and you understand the native Matroska playback problems described above, then you can remove all matroska matches from the transcoding section of the Sony BDP device profile.

- The stock profile allows AVI playback on both European and US region players, however if you need DivX XSUB subtitle support on a European or Canadian player you will need to comment out the AVI MediaFormatProfile line like so (notice that the comment tag is closed at the end of the line):
      Code:
          <!-- MediaFormatProfile mime-type="video/mpeg" name="MPEG_PS_PAL,MPEG_PS_NTSC">AVI</MediaFormatProfile> -->
If you have an AVI movie with separate SRT subtitles, you can inject them by converting to XSUB using AVIAddXSubs before you add the movie to your Serviio library. It's a quick process because the video is not altered.

- For Audio, WMA is supported by the player natively though it must be spoofed as MP3. WMA lossless is not supported. If you need this, add asf to the list of audio transcoding matches in the device profile.

- The same mime and DLNA resource type spoofing cannot be done for M4A, despite Sony advertising compatibility over DLNA. Instead, it and most other audio formats are decoded by FFmpeg and sent as uncompressed LPCM - ideal if your music collection is in FLAC format.

- Serviio 0.6 and newer impersonates Windows Media Player Sharing, thus removing the top level Audio/Video/Image folders which had made navigating the XMB quite confusing in earlier versions.

- The SMP-N100 and N200 have proved to be so similar to the BDP series that the profiles were merged from Serviio 0.6.1 onwards.

- Owners of 2011 series players have reported issues with DivX/Xvid, so it's possible they have similar restrictions to 2011 Bravias in that regard. However, there were reports of the cause being a particular encoding setting in the MP3 audio stream (non-zero wBitsPerSample):
viewtopic.php?f=11&t=3399&p=22551&hilit=great#p22546
http://www.sony-europe.com/discussions/message/691986 (explains how to fix affected files)
If this affects a large proportion of your media library, then you could change the Transcoding section of the device profile to transcode AVI content. Find the "unsupported codecs" comment and amend that part to look like this:
      Code:
     
          <!-- unsupported codecs will be transcoded to mpegts with mpeg2video and ac3 audio -->
          <Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3">
             <Matches container="asf" />
             <Matches container="flv" />
             <Matches container="ogg" />
             <Matches container="avi" />
             <Matches container="mp4" vCodec="mjpeg" />
          </Video>

- If you want to use a gaming surround headset which expects only Dolby Digital input, you can modify the profile to transcode all surround audio types to AC-3. Replace this part in the Transcoding section:
      Code:
          <Video targetContainer="mpegts">
             <Matches container="matroska" />
             <!-- remux mp4 container files to mpeg-ts to allow seeking -->
             <!-- this also fixes the renderer's jerky playback of mov container files such as iPhone 4 HD video recordings -->
             <Matches container="mp4" vCodec="h264" />
             <Matches container="avi" vCodec="h264" />
          </Video>
with this:
      Code:
          <Video targetContainer="mpegts">
             <Matches container="matroska" aCodec="ac3" />
             <Matches container="avi" vCodec="h264" aCodec="ac3" />
          </Video>
          <Video targetContainer="mpegts" targetACodec="ac3" aBitrate="320">
             <Matches container="matroska" />
             <Matches container="mpegts" aCodec="dca"/>
             <Matches container="mpegts" aCodec="aac"/>
             <Matches container="mpegts" aCodec="truehd"/>
             <Matches container="mp4" vCodec="h264" />
             <Matches container="avi" vCodec="h264" />
          </Video>
Make sure the Serviio's Transcoding tab has the Audio channels setting on Keep original (not Downmix to stereo). I save a copy of the old profile so I can revert back when I'm not using the headset. Remember, Serviio has to be restarted for device profile changes to take effect.