I did see this question but not much on .NET…
I want to write .NET code to connect to a web server streaming SHOUTcast (Winamp) audio content (if anyone is interested, the URL is http://live.radiotrinitas.ro:8000/) and record it.
But I don’t know much how to do it.
Just open the HTTP connection, and stream it off to a file on the disk?
There are some headers that appear to be in the content (or so it seems to me) and I don’t know what the format is so how to name the extension of the file (MP3?)
Update1 :
I did try to connect using HttpWebRequest but it throws up saying ProtocolViolation.
Then I tried connecting using TcpClient and it doesn’t send back anything. I guess it awaits some starting command. I don’t know this, apparently proprietary (?), protocol…
Well it seems someone over CodeProject posted something useful and working!
http://www.codeproject.com/KB/audio-video/SHOUTcastRipper.aspx
To run the code snippet you need to set the following configuration :