I have a stream based on Icecast server. It works on most of devices and browsers, but there is an issue for example on android mobile chrome - I can run stream, but it lasts 2 few seconds and it stops. User reports as well the on other browser and devices.
This is player info from mobile, where issue occures:
{
"properties": {},
"messages": [
{
"level": "info",
"message": "FFmpegDemuxer: created audio stream, config codec: mp3, profile: unknown, bytes_per_channel: 2, channel_layout: STEREO, channels: 2, samples_per_second: 44100, sample_format: Signed 16-bit planar, bytes_per_frame: 4, seek_preroll: 0us, codec_delay: 0, has extra data: false, encryption scheme: Unencrypted, discard decoder delay: true, target_output_channel_layout: NONE, target_output_sample_format: Unknown sample format, has aac extra data: false"
},
{
"level": "info",
"message": "Selected FFmpegAudioDecoder for audio decoding, config: codec: mp3, profile: unknown, bytes_per_channel: 2, channel_layout: STEREO, channels: 2, samples_per_second: 44100, sample_format: Signed 16-bit planar, bytes_per_frame: 4, seek_preroll: 0us, codec_delay: 0, has extra data: false, encryption scheme: Unencrypted, discard decoder delay: true, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format, has aac extra data: false"
},
{
"level": "info",
"message": "Effective playback rate changed from 0 to 1"
},
{
"level": "debug",
"message": "FFmpegDemuxer: av_read_frame(): End of file"
}
],
"events": [
{
"timestamp": 428923.310863,
"value": {
"created": "2022-06-07 11:42:54.362 UTC"
},
"displayTimestamp": "0.000",
"event": "kMediaLogCreated"
},
{
"timestamp": 428923.311442,
"value": {
"origin_url": "https://stream.xxxx.xxx:8443/"
},
"displayTimestamp": "0.001",
"event": "kWebMediaPlayerCreated"
},
{
"timestamp": 428923.311785,
"value": {
"url": "https://stream.xxxx.xxx:8443/xxxxxxx.mp3?16545998452"
},
"displayTimestamp": "0.001",
"event": "kLoad"
},
{
"timestamp": 428923.405597,
"value": {
"pipeline_state": "kStarting"
},
"displayTimestamp": "0.095",
"event": "kPipelineStateChange"
},
{
"timestamp": 428923.432143,
"value": {
"pipeline_state": "kPlaying"
},
"displayTimestamp": "0.121",
"event": "kPipelineStateChange"
},
{
"timestamp": 428923.426763,
"value": {
"duration": 2.718765
},
"displayTimestamp": "0.116",
"event": "kDurationChanged"
},
{
"timestamp": 428923.439653,
"value": {
"pipeline_buffering_state": {
"for_suspended_start": false,
"state": "BUFFERING_HAVE_ENOUGH"
}
},
"displayTimestamp": "0.129",
"event": "kBufferingStateChanged"
},
{
"timestamp": 428926.138386,
"value": {},
"displayTimestamp": "2.828",
"event": "kPlay"
},
{
"timestamp": 428929.103,
"value": {},
"displayTimestamp": "5.792",
"event": "kEnded"
},
{
"timestamp": 428929.105783,
"value": {},
"displayTimestamp": "5.795",
"event": "kPause"
}
],
"errors": []
}
This player info from desktop, where is no issue:
{
"properties": {},
"messages": [
{
"level": "info",
"message": "FFmpegDemuxer: created audio stream, config codec: mp3, profile: unknown, bytes_per_channel: 2, channel_layout: STEREO, channels: 2, samples_per_second: 44100, sample_format: Signed 16-bit planar, bytes_per_frame: 4, seek_preroll: 0us, codec_delay: 0, has extra data: false, encryption scheme: Unencrypted, discard decoder delay: true, target_output_channel_layout: NONE, target_output_sample_format: Unknown sample format, has aac extra data: false"
},
{
"level": "info",
"message": "Selected FFmpegAudioDecoder for audio decoding, config: codec: mp3, profile: unknown, bytes_per_channel: 2, channel_layout: STEREO, channels: 2, samples_per_second: 44100, sample_format: Signed 16-bit planar, bytes_per_frame: 4, seek_preroll: 0us, codec_delay: 0, has extra data: false, encryption scheme: Unencrypted, discard decoder delay: true, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format, has aac extra data: false"
},
{
"level": "info",
"message": "Effective playback rate changed from 0 to 1"
}
],
"events": [
{
"timestamp": 45942.954686,
"value": {
"created": "2022-06-07 11:48:19.885 UTC"
},
"displayTimestamp": "0.000",
"event": "kMediaLogCreated"
},
{
"timestamp": 45942.954777,
"value": {
"origin_url": "https://stream.xxxx.xxx:8443/"
},
"displayTimestamp": "0.000",
"event": "kWebMediaPlayerCreated"
},
{
"timestamp": 45942.954829,
"value": {
"url": "https://stream.xxxx.xxx:8443/xxxx.mp3"
},
"displayTimestamp": "0.000",
"event": "kLoad"
},
{
"timestamp": 45943.121403,
"value": {
"pipeline_state": "kStarting"
},
"displayTimestamp": "0.167",
"event": "kPipelineStateChange"
},
{
"timestamp": 45946.605256,
"value": {
"duration": "unknown"
},
"displayTimestamp": "3.651",
"event": "kDurationChanged"
},
{
"timestamp": 45946.609078,
"value": {
"pipeline_state": "kPlaying"
},
"displayTimestamp": "3.654",
"event": "kPipelineStateChange"
},
{
"timestamp": 45946.609662,
"value": {
"pipeline_buffering_state": {
"for_suspended_start": false,
"state": "BUFFERING_HAVE_ENOUGH"
}
},
"displayTimestamp": "3.655",
"event": "kBufferingStateChanged"
},
{
"timestamp": 45949.870751,
"value": {},
"displayTimestamp": "6.916",
"event": "kPlay"
}
],
"errors": []
}
I have noticed that on mobile duration is provided, but I don't know why.
This is fragment icecast.xml config, which doesn't contain vulnerable data:
<http-headers>
<header name="Cache-control" value="no-cache" />
</http-headers>
<limits>
<clients>500</clients>
<sources>10</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>60</source-timeout>
<burst-on-connect>1</burst-on-connect>
<burst-size>65535</burst-size>
</limits>
Of course required behaviour is no interrupting