Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mp3 files from qingtingfm can not be decoded properly. #491

Closed
DeqingSun opened this issue Feb 2, 2022 · 3 comments
Closed

mp3 files from qingtingfm can not be decoded properly. #491

DeqingSun opened this issue Feb 2, 2022 · 3 comments

Comments

@DeqingSun
Copy link

Hi, Thanks for creating this library, it makes audio steaming so easy.

I tried to stream radio from qingting.fm, a major Mandarin radio host and the output was not smooth, I can hear music for about a half second, and noise for about 1 second, and repeat. The similar issue was also mentioned with #141

I did some search and did some experiment. I downloaded a few seconds of stream and I did not find any "ID3" "3DI" or "TAG" ascii in binary, so it should not be a ID3 tag issue. I also checked the connection speed, the download speed is about 20~40KB/s for the 64Kbps stream, and it played properly on computer. I also check the fill level of the AudioFileSourceBuffer, it increased steadily.

Is there any suggestions on how to troubleshoot this issue? Thanks.

Here is some log with http://lhttp.qingting.fm/live/388/64k.mp3

Connecting to WiFi
...Connecting to WiFi
...Connecting to WiFi
...Connecting to WiFi
Connected
Running for 5 seconds ...Free mem=266888
Changing URL to: http://lhttp.qingting.fm/live/388/64k.mp3, vol=0
Before stop...Free mem=266888
After stop...Free mem=266888
created icystream
created buffer
created decoder
Decoder start...
+0 0x3ffb26f0
Done start new URL
Free PSRAM=3883435
Running for 6 seconds*...Free mem=259092
getFillLevel 0
status: 'Refilling buffer'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 2562'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'forbidden bitrate value' at byte offset 7081'
status: 'Decoding error 'forbidden bitrate value' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'lost synchronization' at byte offset 7081'
status: 'Decoding error 'bad main_data_begin pointer' at byte offset 708'
status: 'Decoding error 'bad main_data_begin pointer' at byte offset 727'
status: 'Decoding error 'bad main_data_begin pointer' at byte offset 727'
Free PSRAM=3883427
Running for 7 seconds*...Free mem=259092
getFillLevel 10350
title: ''
status: 'Decoding error 'lost synchronization' at byte offset 18800'
status: 'Decoding error 'lost synchronization' at byte offset 18609'
status: 'Decoding error 'lost synchronization' at byte offset 18609'
status: 'Decoding error 'lost synchronization' at byte offset 18609'
status: 'Decoding error 'lost synchronization' at byte offset 18609'
status: 'Decoding error 'lost synchronization' at byte offset 18609'
status: 'Decoding error 'lost synchronization' at byte offset 18609'
status: 'Decoding error 'bad main_data_begin pointer' at byte offset 186'
status: 'Decoding error 'bad main_data_begin pointer' at byte offset 188'
status: 'Decoding error 'bad main_data_begin pointer' at byte offset 188'
Free PSRAM=3883435
Running for 8 seconds*...Free mem=259092
getFillLevel 16218
@DeqingSun
Copy link
Author

Some update of the test, I used wget to fetch a section of the broadcast, it worked flawlessly if I used AudioFileSourcePROGMEM or put the fetched file on a local server. Seems to be a speed issue, but I also tried to implement #122 to pre-fill the buffer, and the sound still doesn't work well, even at the beginning.

@DeqingSun
Copy link
Author

Seems related to #394
The header does include Tranfer-Encoding: chunked streams and this explains why the wget works and direct connection does not.

@DeqingSun
Copy link
Author

Confirmed. It is a chunked issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant