IceCast over TFPHTTPClient lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- RedCat · 2023-04-08 13:21 Good day to all! Such a question, how can I receive and process data from the http stream in parallel, I want to try to make an Internet radio, and process the icecast protocol as a decoder, I use libmpeg123 at this time I receive data via Synapse TTCPBlockSocket, but I don't like how this bundle works, after a while I get buffer emptying, maybe I'm wrong I process the headers, or rather I don't process them myself at all, I give the received packet to the decoder, he takes what he needs from there, now I want to try to use httpclient to receive the stream, but when sending a request FSocket HTTP.Get('http://myradio',Tmp Radio Stream); the stream is hanging, I assume that the client starts downloading the stream at the moment and it will exit this procedure only after the download is finished, i.e. never. Who knows, maybe there are some ways around this problem? ---------------------------------------------------------------------- Fred vS · 2023-04-08 13:35 Hello. You may try uos: https://github.com/fredvs/uos In uos_define.inc, uncomment the line {.$DEFINE shout} // uncomment to enable IceCast-Shout audio web server. There is a demo: /uos/examples/simplewebserver_fpGUI.pas. Here "how-to" from fpgui mailinglist: Sadly the files of the demo were deleted but, afaik, you may try with the uos simplewebserver_fpGUI demo. ------------------------------------------- Icecast is a audio stream server. http://icecast.org It can deal Opus files encapsulated in Ogg format. https://opus-codec.org Opus files can be encoded for voip (voice over ip) or for web-radios (sound over ip). To communicate with IceCast, libshout and his fpc header will be used. https://github.com/xiph/Icecast-libshout Today we will install and test the server on Unix 64 bit systems. 1) Installing IceCast + libshout.so. - Linux :   # sudo apt-get install icecast2   # sudo apt-get install libshout3 - FreeBSD :   # sudo pkg install icecast2   # sudo pkg install shout 2) Downloading libshout fpc header + demo from here:    https://sites.google.com/site/fredvsbinaries/shout_demo.tar.xz      Uncompress it somewhere. 3) Testing the audio server on localhost.     # cd /directory/of/shout_demo   # sudo uos_icecast2 start If connection is ok, you may check it that way: In your favorite web-browser, enter as url: http://localhost:8000 Enter login: admin          password: hackme This should load the IceCast Status page. Now run the fpc demo opus_shout_demo.pas to assign a mount-point on the server:    # cd /directory/of/shout_demo    # fpc opus_shout_demo.pas    # ./opus_shout_demo If all ok, in the IceCast Status web-page, after refresh, a new mount- point will be added. Congratulations, your IceCast server is working and you have assigned your first mount-point. -------------------------- Maybe it could help you. Fre;D [EDIT] If you want to access files from your web server you may try the uos examples: simplewebplayer or conswebstream.