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

Esp-radio does not play resolved URL #194

Open
Harry79 opened this issue Jan 15, 2021 · 1 comment
Open

Esp-radio does not play resolved URL #194

Harry79 opened this issue Jan 15, 2021 · 1 comment

Comments

@Harry79
Copy link

Harry79 commented Jan 15, 2021

Hi,

I tried to play br-br3-live.cast.addradio.de/br/br3/live/mp3/mid but Esp-radio failed to play. Instead it output:

22:27:32.814 -> D: Command: station with parameter br-br3-live.cast.addradio.de/br/br3/live/mp3/mid
22:27:32.814 -> D: STOP requested
22:27:32.814 -> D: Stopping client
22:27:33.325 -> D: Song stopped correctly after 0 msec
22:27:33.969 -> D: Connect to new host br-br3-live.cast.addradio.de/br/br3/live/mp3/mid
22:27:34.015 -> D: Connect to br-br3-live.cast.addradio.de on port 80, extension /br/br3/live/mp3/mid
22:27:34.198 -> D: Connected to server
22:27:34.198 -> D: Switch to HEADER
22:27:34.198 -> D: Server: nginx
22:27:34.198 -> D: Content-Length: 0
22:27:34.198 -> D: Connection: close
22:27:34.198 -> D: Cache-Control: no-cache, no-store
22:27:34.198 -> D: Expires: Mon, 26 Jul 1997 05:00:00 GMT
22:27:34.198 -> D: Access-Control-Allow-Origin: *
22:27:34.245 -> D: Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type
22:27:34.245 -> D: -Allow-Headers: Origin, Accept, X-Requested-With, Content-Type seen.
22:27:34.245 -> D: Access-Control-Allow-Methods: GET, OPTIONS, HEAD
22:27:34.245 -> D: Location: http://br-edge-1063-dus-dtag-cdn.cast.addradio.de/br/br3/live/mp3/mid?_art=dj0yJmlwPTE4OC
22:27:34.245 -> D: Switch to DATA, bitrate is 0, metaint is 0
22:27:53.365 -> D: No data input

Notice the output contains "http://br-edge-1063-dus-dtag-cdn.cast.addradio.de/br/br3/live/mp3/mid?_art=dj0yJmlwPTE4OC"

When I tried to play http://br-edge-1063-dus-dtag-cdn.cast.addradio.de/br/br3/live/mp3/mid?_art=dj0yJmlwPTE4OC Esp-radio played the stream! It outputs:

22:28:42.553 -> D: Command: station with parameter br-edge-1063-dus-dtag-cdn.cast.addradio.de/br/br3/live/mp3/mid?_art
22:28:42.553 -> D: STOP requested
22:28:42.553 -> D: Stopping client
22:28:43.065 -> D: Song stopped correctly after 0 msec
22:28:43.711 -> D: Connect to new host br-edge-1063-dus-dtag-cdn.cast.addradio.de/br/br3/live/mp3/mid?_art=dj0yJmlwPTE
22:28:43.758 -> D: Connect to br-edge-1063-dus-dtag-cdn.cast.addradio.de on port 80, extension /br/br3/live/mp3/mid?_a
22:28:43.945 -> D: Connected to server
22:28:43.990 -> D: Switch to HEADER
22:28:43.990 -> D: Content-Type: audio/mpeg
22:28:43.990 -> D: audio/mpeg seen.
22:28:43.990 -> D: icy-br:128
22:28:43.990 -> D: ice-audio-info: bitrate=128
22:28:43.990 -> D: icy-br:128
22:28:43.990 -> D: icy-description:BAYERN 3
22:28:44.036 -> D: icy-genre:pop music
22:28:44.036 -> D: icy-name:BAYERN 3
22:28:44.083 -> D: icy-pub:1
22:28:44.083 -> D: Server: dg-br-http_dus-dtag_edge_6db87ead817a9f22842173d9953458ca
22:28:44.083 -> D: Cache-Control: no-cache, no-store
22:28:44.083 -> D: Access-Control-Allow-Origin: *
22:28:44.083 -> D: Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type
22:28:44.130 -> D: -Allow-Headers: Origin, Accept, X-Requested-With, Content-Type seen.
22:28:44.130 -> D: Access-Control-Allow-Methods: GET, OPTIONS, HEAD
22:28:44.130 -> D: Connection: Close
22:28:44.130 -> D: Expires: Mon, 26 Jul 1997 05:00:00 GMT
22:28:44.130 -> D: icy-metaint:16000
22:28:44.130 -> D: Switch to DATA, bitrate is 128, metaint is 16000
22:28:44.130 -> D: First chunk:

So it seems Esp-radio figures out how to resolve the actual URL but does not play the stream if not given the resolved URL.

How to make Esp-radio play the stream right away?

Thanks & Regards,
Harald

@Edzelf
Copy link
Owner

Edzelf commented Jan 15, 2021

Yes, the URL redirects to another location. A software change could be made to follow this redirect. Should not be too difficult.

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

2 participants