05-20-2020, 06:45 PM
Compressed formats like flac inherently use VBR encoding. I'd expect to see the bitrate of the stream at something around 800K.
MPD's bitrate status element represents a snapshot of the rate in kbps of the incoming stream. It's probably obtained from CURL. The snapshot is taken each time certain MPD idle timeouts happen. That's why it's very odd that it remains 0 during playback of these Flac streams. Normally if the first snapshot comes back 0 or undefined it will be updated with a valid value next time song changes or some other event that causes MPD idle timeout. MPD also reports 0 bps for the JB Radio 2 Flac stream. Must be something about flac format streams.
The RP flac streams have another oddity tho. They cause MPD idle timeout every 4 or 5 secs due to the "elapsed" MPD status element being updated. This element only applies to song files and not streams. Elapsed should be 0 for streams.
It won't be visible on the client but you can see the behavior of the RP stream it by turning on verbose logging in MPD config and then tail -f /var/log/mpd/log
Here's some debug from the client showing the "elapsed" element being updated.
MPD's bitrate status element represents a snapshot of the rate in kbps of the incoming stream. It's probably obtained from CURL. The snapshot is taken each time certain MPD idle timeouts happen. That's why it's very odd that it remains 0 during playback of these Flac streams. Normally if the first snapshot comes back 0 or undefined it will be updated with a valid value next time song changes or some other event that causes MPD idle timeout. MPD also reports 0 bps for the JB Radio 2 Flac stream. Must be something about flac format streams.
The RP flac streams have another oddity tho. They cause MPD idle timeout every 4 or 5 secs due to the "elapsed" MPD status element being updated. This element only applies to song files and not streams. Elapsed should be 0 for streams.
It won't be visible on the client but you can see the behavior of the RP stream it by turning on verbose logging in MPD config and then tail -f /var/log/mpd/log
Here's some debug from the client showing the "elapsed" element being updated.
Code:
[Log] engineMpd: success branch: data=({"volume":"10","repeat":"0","random":"0","single":"0","consume":"0","playlist":"538","playlistlength":"61","mixrampdb":"0.000000","state":"play","song":"59","songid":"62","time":"0","elapsed":"136","bitrate":"","audio":"44100:16:2","nextsong":"60","nextsongid":"63","song_percent":"0","audio_sample_rate":"44.1","audio_sample_depth":"16","audio_channels":"Stereo","file":"http:\/\/stream.radioparadise.com\/flac","track":null,"date":null,"composer":null,"cover_art_hash":1879569972,"encoded":"VBR","artist":"Radio station","title":"The Clash - Clampdown","album":"AAA New station","station_name":"AAA New station","coverurl":"images\/radio-logos\/AAA New station.jpg"}) (playerlib.min.js, line 24)
[Log] engineMpd: success branch: data=({"volume":"10","repeat":"0","random":"0","single":"0","consume":"0","playlist":"539","playlistlength":"61","mixrampdb":"0.000000","state":"play","song":"59","songid":"62","time":"0","elapsed":"138","bitrate":"","audio":"44100:16:2","nextsong":"60","nextsongid":"63","song_percent":"0","audio_sample_rate":"44.1","audio_sample_depth":"16","audio_channels":"Stereo","idle_timeout_event":"changed: playlist","file":"http:\/\/stream.radioparadise.com\/flac","track":null,"date":null,"composer":null,"cover_art_hash":187175884,"encoded":"VBR","artist":"Radio station","title":"The Clash - Clampdown","album":"AAA New station","station_name":"AAA New station","coverurl":"images\/radio-logos\/AAA New station.jpg"}) (playerlib.min.js, line 24)
[Log] engineMpd: success branch: data=({"volume":"10","repeat":"0","random":"0","single":"0","consume":"0","playlist":"540","playlistlength":"61","mixrampdb":"0.000000","state":"play","song":"59","songid":"62","time":"0","elapsed":"143","bitrate":"","audio":"44100:16:2","nextsong":"60","nextsongid":"63","song_percent":"0","audio_sample_rate":"44.1","audio_sample_depth":"16","audio_channels":"Stereo","idle_timeout_event":"changed: playlist","file":"http:\/\/stream.radioparadise.com\/flac","track":null,"date":null,"composer":null,"cover_art_hash":1216097015,"encoded":"VBR","artist":"Radio station","title":"The Clash - Clampdown","album":"AAA New station","station_name":"AAA New station","coverurl":"images\/radio-logos\/AAA New station.jpg"}) (playerlib.min.js, line 24)
[Log] engineMpd: success branch: data=({"volume":"10","repeat":"0","random":"0","single":"0","consume":"0","playlist":"541","playlistlength":"61","mixrampdb":"0.000000","state":"play","song":"59","songid":"62","time":"0","elapsed":"147","bitrate":"","audio":"44100:16:2","nextsong":"60","nextsongid":"63","song_percent":"0","audio_sample_rate":"44.1","audio_sample_depth":"16","audio_channels":"Stereo","idle_timeout_event":"changed: playlist","file":"http:\/\/stream.radioparadise.com\/flac","track":null,"date":null,"composer":null,"cover_art_hash":569758706,"encoded":"VBR","artist":"Radio station","title":"The Clash - Clampdown","album":"AAA New station","station_name":"AAA New station","coverurl":"images\/radio-logos\/AAA New station.jpg"}) (playerlib.min.js, line 24)