HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: antares on 2018-12-20 12:01:29

Title: UPnP MediaRenderer Output 1.0 has reverse stereo-channels!
Post by: antares on 2018-12-20 12:01:29
Hi,

I'm wondering that nearly nobody noticed our discussion here (https://hydrogenaud.io/index.php/topic,98370.225.html) that UPnP MediaRenderer Output 1.0 has reverse stereo-channels, which has been confirmed!

Martin
Title: Re: UPnP MediaRenderer Output 1.0 has reverse stereo-channels!
Post by: Peter on 2018-12-20 16:39:06
The discussion was noticed. Thanks for reporting the problem and making sure that it gets my attention.

I'm afraid that there is no such bug with any of my devices: Linn DS, Kodi/OpenELEC.

It might be that specific devices mishandle LPCM streams and reverse the channels in them, which is their bug not ours.

There are troubleshooting options available for the UPnP output, under Preferences / Advances / Playback / UPnP MediaRenderer Output. Possibly setting stream format to "prefer WAV" will help with this issue.
I can add an option to reverse stereo channels there also, if there's no better workaround.
Title: Re: UPnP MediaRenderer Output 1.0 has reverse stereo-channels!
Post by: antares on 2018-12-20 18:25:37
Hi Peter,

thanks for your attention and your answer. But how can you explain the fact, that the old component "UPnP/DLNA Renderer, Server, Control Point 0.99.49" doesn't have reverse stereo channels?

Martin
Title: Re: UPnP MediaRenderer Output 1.0 has reverse stereo-channels!
Post by: Peter on 2018-12-21 10:55:42
The foo_upnp component streams the files as they are. My UPnP output component launches a minimal UPnP media server that presents the output being played as a live stream.

From the posted console log, I see the bug occurs with WAV rather than LPCM, so you can disregard what I wrote above about LPCM channel order.
One potential issue is apparent from the console log:
Code: [Select]
Accept-Ranges: none
(...)
Range: bytes=46-
The device asks for partial content after I just specifically told it that it's not supported. Perhaps it then misreads the returned content somehow. I'll investigate this further.
Title: Re: UPnP MediaRenderer Output 1.0 has reverse stereo-channels!
Post by: kode54 on 2018-12-21 22:17:20
Yes, this appears to be asking for a WAV stream to skip its header, but the header is 44 bytes, so it's also skipping half of a sample frame?
Title: Re: UPnP MediaRenderer Output 1.0 has reverse stereo-channels!
Post by: ragg987 on 2018-12-22 04:48:15
Hi Peter, appreciate your support. I an happy to provide follow up info or test any options, do ask if needed. I had previously tested the WAV and LPCM options but made no difference.
Title: Re: UPnP MediaRenderer Output 1.0 has reverse stereo-channels!
Post by: Peter on 2018-12-28 14:15:40
Attempted fix (initial N bytes skipped when handling such request)-
https://www.foobar2000.org/temp/foo_out_upnp-1.1b1.fb2k-component

Please report if this helps.
Title: Re: UPnP MediaRenderer Output 1.0 has reverse stereo-channels!
Post by: ragg987 on 2018-12-30 11:21:59
Just to confirm - this has fixed the reversal issue on my setup. Thanks, Peter.
Title: Re: UPnP MediaRenderer Output 1.0 has reverse stereo-channels!
Post by: antares on 2018-12-30 20:52:08
Hi Peter,
after installing your fix, channels are in right order again.

Thanks

Martin
Title: Re: UPnP MediaRenderer Output 1.0 has reverse stereo-channels!
Post by: Peter on 2018-12-31 12:50:42
Thanks for confirming. The official version will be updated with this fix shortly.