How to stream high-res audio using flac files

Hi,

I do have some problems when streaming high-res music to my network player (a Musical Fidelity M1 CLIC).
Everything works well as long as I only stream CD-quality flac files (16bit/44.1KHz), but when streaming high-res audio (downloaded from qobuz.com) the playback sometimes stutters.

Now I am not sure where the problem is, since the M1 CLIC is known to have problems with this resolution.
However, Musical Fidelity claims that with the latest firmware (which I have installed), everything should work without problems.
When I place my music files onto a USB stick and use it to play with the M1 CLIC there is no stuttering… when streaming the same files using Plex, the playback starts to stutter.
Still… I am not a 100% sure that the Plex Media Server is the problem, since there might still be the possibility that the CLIC streaming client handles USB and LAN a bit different internally.

To be sure I checked the log files of my Plex Media Server (the file ā€œPlex DLNA Server.logā€) and the output leaves me curious.
I guess there is something going wrong.
Here is the output after pressing play on the streaming client:

May 23, 2017 22:41:50.243 [0x7f43f0ffd700] DEBUG - OnBrowseDirectChildren for '0' with filter 'dc:creator,dc:date,upnp:album,upnp:artist,upnp:genre,res,res@protection,res@duration,res@size,upnp:albumArtURI,upnp:searchClass' and sort '', paged as 0 + 95
May 23, 2017 22:41:50.244 [0x7f43f0ffd700] DEBUG - Mapped client to generic profile: Host: 192.168.0.1:32469; SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"; USER-AGENT: KnOS/3.2 bridgeCo-DMP/3.0 DLNADOC/1.50 INTEL_NMPR/2.0; CONNECTION: close; CONTENT-TYPE: text/xml ; charset="utf-8"; Content-Length: 606
May 23, 2017 22:41:50.244 [0x7f43f0ffd700] DEBUG - Mapped object 0 to  part 0 on server 
May 23, 2017 22:41:50.244 [0x7f43f0ffd700] DEBUG - OnBrowseDirectChildren returning success with 3 objects of 3 total
May 23, 2017 22:41:50.481 [0x7f43f0ffd700] DEBUG - GET for http://192.168.0.1:32469/object/ef2e0205713b6ddba8f0/file.flac : bytes=0-
May 23, 2017 22:41:50.481 [0x7f43f0ffd700] DEBUG - Mapped client to generic profile: Host: 192.168.0.1:32469; Range: bytes=0-; Icy-MetaData: 1; Connection: close; transferMode.dlna.org: Streaming; User-Agent: WinampMPEG/2.8; Accept: */*
May 23, 2017 22:41:50.481 [0x7f43f0ffd700] DEBUG - Mapped object ef2e0205713b6ddba8f0 to /library/metadata/290412 part 0 on server 
May 23, 2017 22:41:50.482 [0x7f43f0ffd700] DEBUG - Downloading document http://127.0.0.1:32400/library/metadata/290412
May 23, 2017 22:41:50.482 [0x7f43f0ffd700] DEBUG - HTTP requesting GET http://127.0.0.1:32400/library/metadata/290412
May 23, 2017 22:41:50.488 [0x7f43f0ffd700] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/library/metadata/290412
May 23, 2017 22:41:50.488 [0x7f43f0ffd700] DEBUG - Caching document http://127.0.0.1:32400/library/metadata/290412 as 4bca6e197e96ef93830f52eed752d0fa8afb1f38
May 23, 2017 22:41:50.488 [0x7f43f0ffd700] DEBUG - Serving up item /library/metadata/290412 part 0
May 23, 2017 22:41:50.489 [0x7f43f0ffd700] DEBUG - MDE: received PLEX_PROTOCOL_ANY from client, but could not determine best protocol. Defaulting to HTTP
May 23, 2017 22:41:50.489 [0x7f43f0ffd700] DEBUG - MDE: analyzing media item 467749
May 23, 2017 22:41:50.489 [0x7f43f0ffd700] DEBUG - MDE: L-O-V-E: Direct Playing due to no transcode profile
May 23, 2017 22:41:50.489 [0x7f43f0ffd700] DEBUG - MDE: L-O-V-E: no direct play music profile exists for http/flac/flac
May 23, 2017 22:41:50.489 [0x7f43f0ffd700] DEBUG - L-O-V-E - audio.bitrate limitation applies: 5589 > 288
May 23, 2017 22:41:50.489 [0x7f43f0ffd700] DEBUG - MDE: L-O-V-E: selected media 0 / 467749
May 23, 2017 22:41:50.492 [0x7f43f0ffd700] DEBUG - Proxied GET to http://127.0.0.1:32400/library/parts/475843/1495488422/file.flac?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx: HTTP/1.1 206
May 23, 2017 22:41:50.493 [0x7f43f0ffd700] DEBUG - Responding HTTP/1.1 206
May 23, 2017 22:41:52.743 [0x7f4401bfe700] DEBUG - GET for http://192.168.0.1:32469/proxy/0f2a63407dade8ff5a3e/albumart.jpg
May 23, 2017 22:41:52.744 [0x7f4401bfe700] DEBUG - Mapped client to generic profile: Host: 192.168.0.1:32469; Connection: close; User-Agent: Mozilla/4.0 (compatible); Accept: */*
May 23, 2017 22:41:52.747 [0x7f4401bfe700] DEBUG - Proxied GET to http://127.0.0.1:32400/photo/:/transcode?format=jpg&height=512&url=http%3A%2F%2F127%2E0%2E0%2E1%3A32400%2Flibrary%2Fmetadata%2F290409%2Fthumb%2F1495482309&width=512&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx: HTTP/1.1 200
May 23, 2017 22:41:52.747 [0x7f4401bfe700] DEBUG - Responding HTTP/1.1 200

Therese are my observations from the log file:

  • The client is mapped to the general profile
  • The client asks for any protocol and plex falls back to HTTP, since it could not determine a better protocol.
  • Transcoding is not taking place here (which is what I want)
  • The audio.bitrate limitation applies
  • There is a proxied get taking place
  • For the album art again the client is mapped to the generic profile, resulting in a proxied get

And here are my questions:

  • Why is the audio.bitrate limitation applied?
    I am on the same network… I checked my router and added plex.direct and plex.tv to allow DNS-Rebind.
    If I a use plex web on the same network the server is now listed as ā€œlocalā€.
    Can I somehow prevent the limitation or is the message misleading and there is no limitation applied??
  • Why is there a proxied get taking place?
    Shouldn’t that be a direct call? Why is there a proxy?
  • Can I do something to speed up thing within my network (e.g. can I disable SSL within the home network only)?
  • Is there a profile already available that allows for high-res streaming using flac files?

Cheers,
Niko

Settings - Server - DLNA - (Show Advanced) - ā€˜DLNA client preferences’
empty out this input field

Settings - Server - Network - (Show Advanced) - ā€˜LAN Networks’
put this into there 192.168.0.0/24 (no space characters before, after & inbetween)

save, then restart Plex server and try again
next time post a full log file

Hmm… the DLNA client preferences field is already empty ant the LAN networks contains ā€œ192.168.0.0/255.255.255.0ā€ (which as far as I know is the same as ā€œ192.168.0.0/24ā€, isn’t it?).

I can send a log file anyway if I am back home in the evening :slight_smile:

Ok… I changed the values as suggested.
Playback is still stuttering and as far as I can see nothing has changed in the log file. The audio.bitrate limitation is still in place…

The logfile is attached.
It includes everything from server restart to playing a 24bit/192KHz flac file.

I have filed the issue as a bug.

1 Like

Oh… great… thank you.
Let me know if I can provide missing information or more detail about my setup

Just to add some more information.
Over the weekend i tested with minidlna to see if the problem is caused by the M1 CLIC or by plex.
The same files that plex stutters with work with minidlna without issues (ok… there were two stutters at the very beginning but then the whole CD played without a single issue… plex keeps on stuttering for the whole CD).

So at least I can say that the problem is not my streaming client or the flac files.
Either the problem is solely caused by plex or it is some weird combination of multiple components (plex in combination with my client?).

So… again adding more information

Last time I tested with MiniDLNA on my laptop, while Plex runs on my server.
Starting MiniDLNA on the same system (server) also causes stuttering, but when I run it on the laptop everything plays fine.

I was thinking of a network issue so I changed the network card on the server without success.
The next thing I tried is to use the plug out the servers network cable and plug it into the server (so I can see if the problem is related to a network cable or a switch configuration). When doing this miniDLNA on the laptop plays all files fine.
So there must be something wrong with the servers centos configuration or its hardware (which is a bit unexpected to me, since the server is much stronger than my laptop).

I am running out of ideas…
… how can this issue be further investigated??

Ok… I did some additional things I thought make sense.

My first investigations targeted the network.
Although iperf3 showed showed some lost packages to the server, changing cables and even the network card did not help.
After connecting the server to the M1 CLIC directly (with fixed IP adresses instead of DHCP), the lost packages were gone, but the stuttering on 24bit/192kHz playback still was there. My conclusion to this is that things are not related to the network.

Next up I tried to disable as much services in centos. This also did not help.

Since my server already has virtualbox installed I thought I tried to use a virtualized fedora with a MiniDLNA server (which my laptop also uses). This works. Stuttering is gone. My first thought was that timing in the fedora kernels might be better than those of centos (they are much newer). Ok… I double checked that by installing a virtualized centos with a MiniDLNA server. And if I do this playback works as well without stuttering.
To complete: MiniDLNA works on my server if I use it in a virtualized centos 7.3, but not if I use it on the host’s centos 7.3.
So I am still left without a clue (bit at least with something ā€œlike a conclusionā€).

What I now think is that the problem is very unlikely related to the servers hardware (ok… there might be still a chance that the virtualized hardware behaves differently, but I really thing that a software problem or a configuration problem is much more likely).

Does someone know how to debug that?

Ok… I could fix my stuttering problem by re-installing the whole OS.
The problem therefore is not related to plex, but some setting in centos (and I still don’t known which).

However, the log messages don’t make sense to me anyway (why is bitrate limitation applied)?

@Niko_K said:
However, the log messages don’t make sense to me anyway (why is bitrate limitation applied)?

Bitrate limitation can come from 3 sources:

  • a fixed upper limit of what the device can handle. This is defined in the hardware profile of the device or it is defined by the Plex client software
  • a limit which is set in the preferences of the plex client. A user can set an upper limit to account for bad internet connection or save transfer volume on a remote connection
  • a limit which is set on the server for remote connections

Sometimes a local connection is falsely treated as a remote connection due to a non-cooperating router or crappy DNS or a ā€œuniqueā€ network configuration.

May I see the log in question?

1 Like

The log is the one referenced at the beginning of this thread.
Another example is the log referenced in comment #1444539.
The lines like ā€œMay 23, 2017 22:41:50.489 [0x7f43f0ffd700] DEBUG - L-O-V-E - audio.bitrate limitation applies: 5589 > 288ā€ get me curious here…

The client itself - as mentioned above - is a MF M1 Clic. It can handle up to 24bit/192khz of resolution…

I think your device is treated as if it is remote. Which of course is nonsense.

Have you tried this: https://forums.plex.tv/discussion/comment/1271871/#Comment_1271871 ?

Yes… I have trues this.
I am excluding my network form authorization. The actual value I’m using for exclusion is: 192.168.0.0/24

Sorry, then I am officially out of ideas! :frowning:

When I am back home (will take some days) I am going to double-check the log.
Since I re-installed the OS (which fixed the stuttering), maybe also the audio.bitrate limitation got fixed.
Actually running out of ideas had me re-install my system :slight_smile:

Side note:
I had great sucess with the Chrome web browser running on Windows with a multi-channel sound interface.
It direct-played 5.1 and 7.1 Flac files up to 192kHz/24bit !

Thanks @OttoKerner this description of where audio.bitrate limitation applies helped me find why FLAC was being transcoded to AAC from PMS -> iOS (remote). When playing AAC the iOS playback sometimes dropped/stuttered.

Turned out it was a combination of two things:

iOS client setting (now changed to Audio Internet Streaming to Original)
PMS > Remote Access > Limit remote stream bitrate > Original (No Limit)

I have FLAC direct play to iOS now, with wired high end headphones it sounds pretty sweet. No more playback stuttering.