Post Tue Mar 15, 2011 1:16 pm

[Readme] Sony Bluray Disc/Network Media Players

07/05/2015 - removed DTS remux issue - resolved by newer FFmpeg and device profiles from Serviio 1.5 onwards
27/04/2014 - long overdue comprehensive update
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.

-This is a lengthy detailed technical document, but it's necessary because it summarises the last five years of community effort that makes Serviio the Sony recommended media server.

- Unfortunately owing to limitations in Sony's DNLA firmware design the BDP/SMP players need to have their appropriate device profile manually selected in Serviio Console, since Serviio is unable to autodetect them. By default the 2010 profile will be selected since this represents a lowest common denominator of format support. It is recommended that these devices are given a DHCP reservation so their IP address does not change or, failing that, are configured to a static IP address.

- Be careful if you are buying a Sony player specifically for use with Serviio - be certain it supports DLNA before purchase. While all 2010 players were DLNA-enabled, it looks like Sony later repositioned DLNA as a premium feature: the BDP-S380 has no DLNA support, the BDP-S390 only gained it some time after release with a firmware update, and the BDP-S1100 also has no DLNA support.

- 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 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.

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. This is somewhat strange since the Bravia TVs do display thumbnails. To vastly speed up adding content to Serviio's library, de-select 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 2010 players support subtitles in Matroska files but this is disabled in Serviio by default for other reasons explained below. European and Canadian 2010 players do support DivX XSUB subtitles.

- SRT subtitle files are not natively supported. Serviio 1.2 introduced a feature to burn them into a transcoded video stream if needed. See Serviio's subtitle documentation for more details.

- 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).

- Some users reported problems with native playback of MKV files (2012 players or newer) that had been authored with newer versions of MKVToolNix which introduced MKV header compression enabled by default. This results in a "Data corrupted" error message. Affected files can be repaired, details in this forum thread.

- FFwd/Rew seeking functionality fails during native MKV playback (2012 players or newer) when the file has been authored with new default settings of MKVToolNix, and also when ASS format subtitle fonts are embedded. A more detailed explanation can be found in here,and details of how to repair by remuxing with mkvmerge in this forum post. A workaround for this issue would be to use the 'BDP-Sx80/SMP-N200 (2011)' device profile instead, which will remux all MKVs to M2TS (without subtitles and additional audio tracks though).

- 2011 players or newer no longer support DivX AVI playback, although Xvid remains supported. It is possible to edit the FourCC code of existing DivX AVI media files to get around this restriction using the FourCC Changer utility. Amending the FourCC value to XVID is instantaneous and does not need the video to be transcoded. According to this forum thread only DIVX and DIV5 files can be amended. Media with an existing FourCC value of DIV3 or DIV4 will fail.

- Certain Xvid AVI files will not render correctly (QPel : Yes). Unfortunately these sub-types cannot currently be detected by Serviio, but there is a workaround. Certain AVI files have audio issues arising from non-zero wBitsPerSample in their MP3 audio stream which can be fixed using VirtualDub.

Sony BD Player/SMP device profile evolution and design decisions
- The original 2010 Sony-published format support list is inaccurate, particularly for DLNA. Note that HD video formats were intended to be unsupported.

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

- This originally meant that region-specific profiles were required, since 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) 2010 players do 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, suggesting a buggy buffering implementation 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 2010 BDP owners 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. The downside is that Matroska-embedded subtitles and additional audio tracks are lost. If support for these features is vital to you, you have a European or Canadian 2010 player, and you understand the native Matroska playback problems described above, then you can remove the matroska matches from the transcoding section of the Sony BDP device profile.

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

- Media's native audio format is preserved wherever possible (AC-3, AAC, DTS). A long-standing FFmpeg bug preventing DTS audio remuxing was resolved from Serviio 1.5 onwards.

- Live-streamed H.264 video in Flash container is force transcoded to MPEG2 (despite H.264 usually being remuxed) since it crashes the 2010/2011 players. From Serviio 0.6.2 the device profile is able to target live streams only using the contentType attribute.

- For 2010 players, apart from the subtitle/alt audio track support for Matroska (which has its own problems), and the relatively seldom-used DivX XSUB subtitle support, there is basically no difference in format support between the Sony firmware regions. Serviio 0.5.1 introduced a unified multi-region profile once Serviio allowed multiple DLNA resource type substitutions to be specified. Since the Sony firmware does not announce its region via DLNA a unified profile kept things simple and reduced the user support requests on the forum.

- The 2011 players introduced a problem - Serviio cannot distinguish them from the 2010 models since they report the same DLNA identification. Consequently owners of these devices need to manually amend the selected profile for their device in Serviio Console.

- Since some manual device profile selection was inevitable, and since Serviio's profiles.xml permits cascading inheritance, a separate US version of the 2010 player profile was re-introduced. This allowed the European and Canadian players native DivX XSUB subtitle support by default without manual edits to the device profile. 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 stream is not altered.

- For Audio, WMA is supported by the 2010 players 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 via DLNA. Instead, it and most other audio formats that are not natively supported are decoded by FFmpeg and sent as uncompressed LPCM for best quality. If you need metadata from audio tags you should edit the device profile XML to change this to MP3, ideally with a high bitrate (320Kbps).

- Serviio 0.6 introduced impersonation of Windows Media Player Sharing, thus removing the top level Audio/Video/Image category folders which had made navigating the Sony XMB menus quite confusing in earlier versions, and had created many support enquiries on the forum.

- 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.

- Sony changed very little with the 2011 players. DivX support was removed, presumably as a result of licensing costs. They retained support for other MPEG-4 ASP implementations, in particular Xvid. Serviio 1.1 added FourCC code matching in the device profile to allow native playback of the supported types, keeping video transcoding to a minimum. XSUB support was removed on the 2011 models, and there were no longer regional differences to DLNA functionality.

- The 2012 players gained more robust native Matroska support (including subtitles and alternate audio tracks), and better audio format support, though once again lacking DivX and XSUB support.

- If you want to use a gaming surround headset which expects only Dolby Digital input, you can modify the device profile (in config/profiles.xml) to transcode all surround audio types to AC-3. Insert this into the <Transcoding> section of your specific player's device profile, just below the first part that checks the H.264 profile levels:
    <!-- transcode all surround audio types to ac3 -->
    <Video targetContainer="mpegts" targetACodec="ac3" aBitrate="640" >
       <Matches container="*" vCodec="h264" aCodec="aac" />
       <Matches container="*" vCodec="h264" aCodec="dca" />
       <Matches container="*" vCodec="h264" aCodec="truehd" />
       <Matches container="*" vCodec="h264" aCodec="dts-hd" />
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.