Skip to content

A way to suppress the glitches and other streaming troubles #52

@philippedc

Description

@philippedc

Hi, I love the baldam exemple web radio. I built 3 of them. Unfortunately I have 2 problems with this code, especially with French radio station:

I have spent may be an hundred of hours to try to solve this problem. I thank wmarkow and fabitom for their help. In #51 they tried several workarounds like round buffer, but are mostly incomprehensible for my basic level of programming. But I learnt the following:
The glitches are due to \r\nX\r\n sequences, and then it looks like the streaming is chunked.
Works had been done to suppress these chunk messages, see #48, but I still have glitches for these particular French radios. Moreover, wmarkow and fabitom confirm that their codes are working well for themselves, but not for me :(

There is not many information about chunked transfer data, except this https://en.wikipedia.org/wiki/Chunked_transfer_encoding
When you read in detail, follow the links, you will find that chunked data stream is mostly for video transfer, here it is sound only, so I'm wondering if these chunks are not fake.... AND chunked transfer is only supported for HTTP1.1. Not in HTTP1.0

EUREKA !

@baldram I suggest to replace:

client.print(String("GET ") + path + " HTTP/1.1\r\n" +
                 "Host: " + host + "\r\n" +
                 "Connection: close\r\n\r\n");

with:

client.print(String("GET ") + path + " HTTP/1.0\r\n" +
                 "Host: " + host + "\r\n" +
                 "Connection: close\r\n\r\n");

It is a miracle: no more glitches, no lost stations, everything is fine now :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions