

I don't remember/know how the PS4 deals with this, but knowing Sony I guess it's pretty picky about it. It guesses aren't very good for anything but MPEG-TS output though.

Some renderers will only accept valid values, which makes transcoding effectively impossible, so there is an algorithm that tries to "guess" the values in some circumstances. Some renderers will accept invalid values but reject missing values and vice versa. The DLNA standard doesn't properly define how to handle this, and as a consequence the implementations vary. There's no way for UMS to know the correct values without first transcoding the whole file, which isn't an option for obvious reasons. When it comes to the bitrate and size, they are actually unknown because the file is transcoded. Nobody has done this yet, and the result is bugs like this. In short, there's huge gaps in the logic and I can't see any other option than a massive refactoring to make it work well for most devices. The logic seems to me to have been written with only a single renderer in mind, and that is since has been "hacked" to work somewhat with some other devices. It's not a simple "bug" that can be fixed easily. As a consequence, there are many shortcomings with this code. Most renderers don't need DLNA.ORG_PN, so only a relatively few has this enabled. #1285 works as intended (the media is recognized as audio internally), but it didn't change the DLNA.ORG_PN and MIME-type logic.
