ElvishArtisan / GlassCoder

Minimalist audio encoder for generating live streams.
GNU General Public License v2.0
23 stars 7 forks source link

Connection lost #10

Closed hbh3 closed 4 years ago

hbh3 commented 4 years ago

My installation of GlassCoder was previously working to a local Icecast2 server fine, but when I switched to a remote server, I am getting the below error. Any idea what is causing the extra //stream on the end?

`# glasscoder --server-type=icecast2 --server-url=http://radio.streamer.com:xxxx/stream --server-auth=user:password --verbose --audio-format=mp3 --audio-samplerate=48000 --audio-channels=2 --audio-bitrate=128 --stream-name="streamname" --stream-description="streamdesc" --stream-url="https://listen.mydomain.com" --stream-genre="80s" --audio-device=jack --jack-server-name="rivendell_0" --jack-client-name="MainLog" --jack-gain=0

glasscoder: connected to JACK graph at 48000 samples/sec.

glasscoder: connection to "http://radio.streamer.com:xxxx/stream//stream" lost`

newdanceradio commented 4 years ago

I have the same issue, exactly the same error glasscoder: connection to "http://stream.newdanceradio.ru/mp3_192_fallback//mp3_192_fallback"  lost And yes, if the icecast server is working in local everything is fine, but if server is at remote location, everytime got the same error, and what is interesting, that glasscoder is showing that it's reconnecting, but really it isn't.

ElvishArtisan commented 4 years ago

Both of these are indicative of a network problem. The 'reconnecting' message means just that -- glasscoder(1) is attempting to reconnect. In this case, clearly unsuccessfully.

One good way to test network connectivity is to use telnet(1). You should be able to do:

telnet <server-ip> <server-port>

and get a connection. ITOH, if the command hangs, or throws an error message, you have a network problem.

N.B. That telnet command takes a space between the address and port arguments, not a ':'.

hbh3 commented 4 years ago

Thanks for replying.

I get through with telnet and I get a connection:

telnet 123.123.123.123 1234 Trying 112.123.123.123... Connected to 123.123.123.123. Escape character is '^]'.

Darkice and BUTT are working on my configuration but not GlassCoder. I even have BUTT working with SSL so I know both the unencrypted and the SSL ports at my host are working with other software. I prefer to use GlassCoder.

ElvishArtisan commented 4 years ago

Should be fixed in 31807fa. Please test!

hbh3 commented 4 years ago

This makes me very happy! Compiling now and preparing to test.

hbh3 commented 4 years ago

Ran into a make issue:

In file included from hlsconnector.h:52:0, from connectorfactory.cpp:23: fileconveyor.h:27:23: fatal error: curl/curl.h: No such file or directory

include <curl/curl.h>

hbh3 commented 4 years ago

I fixed this by installing libcurl-devel package.

hbh3 commented 4 years ago

Confirmed fixed!

Worked fine for http connection to the Icecast2 server but did not work for https connection (similar error as originally reported with the double "stream//stream" being sent). Should it work with https connections as well? I'm happy with http for now.

Thank you!

ElvishArtisan commented 4 years ago

In file included from hlsconnector.h:52:0, from connectorfactory.cpp:23: fileconveyor.h:27:23: fatal error: curl/curl.h: No such file or directory

include <curl/curl.h>

Interesting. That should have been caught by the configure script!

ElvishArtisan commented 4 years ago

Confirmed fixed!

Cool. Thank you for testing!

Worked fine for http connection to the Icecast2 server but did not work for https connection (similar error as originally reported with the double "stream//stream" being sent). Should it work with https connections as well? I'm happy with http for now.

HTTPS is not supported (yet). That will be a whole kettle of fish in its own right, especially as Icecast support for HTTPS has itself only recently stabilized.

ElvishArtisan commented 4 years ago

In file included from hlsconnector.h:52:0, from connectorfactory.cpp:23: fileconveyor.h:27:23: fatal error: curl/curl.h: No such file or directory

include <curl/curl.h>

Confirmed here.

ElvishArtisan commented 4 years ago

Fixed in 8fdd494.