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

Info for links #55

Open
Ducke1001 opened this issue Nov 20, 2024 · 10 comments
Open

Info for links #55

Ducke1001 opened this issue Nov 20, 2024 · 10 comments

Comments

@Ducke1001
Copy link

Hi stsaz, I want to use phiola to retrieve a stream info with the following command:

phiola info adress

It works, but sometimes phiola gives wrong informations. It usually works on the second attempt.
For example:

phiola info "http://streams.bigfm.de/bigfm-dance-128-aac"
φphiola v2.2.8 (windows-amd64)
#1 " - " "http://streams.bigfm.de/bigfm-dance-128-aac" 0MB 0:00.000 (0 samples) 128kbps MPEG1-L3 float32 44100Hz stereo
0:00

phiola info "http://streams.bigfm.de/bigfm-dance-128-aac"
φphiola v2.2.8 (windows-amd64)
#1 " - bigFM Dance" "http://streams.bigfm.de/bigfm-dance-128-aac" 0MB 0:00.000 (0 samples) 0kbps HE-AAC int16 44100Hz stereo
0:01

Can you check this out when you get a chance?

@stsaz
Copy link
Owner

stsaz commented Nov 22, 2024

#1 " - " "http://streams.bigfm.de/bigfm-dance-128-aac" 0MB 0:00.000 (0 samples) 128kbps MPEG1-L3 float32 44100Hz stereo

That's unexpected... Can you attach debug logs?

@Ducke1001
Copy link
Author

The error occurs when I previously requested the info of an mp3 stream.
Here an example:

phiola -Log phi.log -D info "http://streams.bigfm.de/bigfm-nitroxdeep-128-aac"
φphiola v2.2.8 (windows-amd64)
#1 " - " "http://streams.bigfm.de/bigfm-nitroxdeep-128-aac" 0MB 0:00.000 (0 samples) 128kbps MPEG1-L3 float32 44100Hz stereo
0:00

phi.log

@stsaz
Copy link
Owner

stsaz commented Nov 22, 2024

The log shows the Content-Type: audio/mpeg header in response from server -- phiola correctly expects MP3 data. Does the link play correctly in this case? Maybe the server switches the stream from AAC to MP3 in some cases (?). It would be harder for me to resolve this issue if I can't trust the audio type by Content-Type value.

@Ducke1001
Copy link
Author

Most of the time AAC-LC is returned correctly, but sometimes not. But it plays correctly, so it's not that bad. Especially if it's the server.

@stsaz
Copy link
Owner

stsaz commented Nov 23, 2024

But it plays correctly, so it's not that bad

If it plays fine all the time then info command shows correct info about the stream audio codec. I think there's nothing to fix here then. Or am I missing something?

@Ducke1001
Copy link
Author

If I have understood the debug data correctly, then the original server returns AAC. However, since the server is redirected, the wrong encoding is returned from the redirected server. The other data seems to be correct.
Can you take the encoding from the original server? The encoding is not really changed. Of course, only if the effort is not too great and my thoughts are correct.

By the way, when displaying the info for AAC streams, the bitrate is not shown.

@stsaz
Copy link
Owner

stsaz commented Nov 24, 2024

Can you take the encoding from the original server?

That would be incorrect behaviour from the HTTP client (phiola).

So the real audio data is always AAC in this case and never MP3? Then the only solution is to detect the real audio format by analyzing the data...

when displaying the info for AAC streams, the bitrate is not shown

Noted. Should be able to compute bitrate of AAC data after decoding 1 second of audio.

@Ducke1001
Copy link
Author

So the real audio data is always AAC in this case and never MP3?

I'm not really sure. But why should the server switch to mp3 when streaming aac? The codec is correct the second time it is called.
But if the effort is too high, then leave it as it is. The stream will still be played. This is more of a small error in the display. But not always and only on certain stations. Normally you don’t see it.

@stsaz
Copy link
Owner

stsaz commented Jan 26, 2025

... "http://streams.bigfm.de/bigfm-dance-128-aac" 0MB 0:00.000 (0 samples) 128kbps MPEG1-L3 ...

This issue now should be fixed, because I recently improved audio format detector.

... 0kbps HE-AAC ...

This is still to be resolved. I think the easiest way is to just show the bitrate from server (icy-br: 128).

@Ducke1001
Copy link
Author

This issue now should be fixed, because I recently improved audio format detector.

Thank you very much.

This is still to be resolved. I think the easiest way is to just show the bitrate from server (icy-br: 128).

Yes, why not? I think so too.

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