![]() |
#1 |
Guest
Posts: n/a
|
ShoutCast connect socket
Hi!
I write application in C++ to broadcasting on ShoutCast server and I have a problem with socket connect to ShoutCast server. How can I do it? I mean mainly the password authorization because I browsed sources applications a eg. streamTranscoderV3 to cut connect line, but the combination never seen sent password. Thanks for help. |
![]() |
![]() |
#2 |
Forum King
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,290
|
for DNAS 2 : http://wiki.winamp.com/wiki/SHOUTcas...otocol_Details
for old DNAS .. streamtranscodervV3 (and all shoutcast v1 protocol sources) DO send a password - it's the very first thing sent after connection if my memory serves me correctly "If you don't like DNAS, write your own damn system" So I did |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Dec 2012
Posts: 2
|
Hi all,
I am also writing a c++ application to broadcast to a shoutcast server, but don't know if i'm on the right track. I want to send a MP3 or wave file to the shoutcast server, so it can broadcast it to winamp and/or itunes I have my shoutcast server running in a terminal and i can visit the shoutcast website using http://myshoutcastserver:8000. I also can connect to the server, using the folowing code: PHP Code:
I tried to build the lame encoder on osx, but have some troubles compiling. Is there another way? And, how do i send the stream? I came up with a possible method, but is this the right way to go? PHP Code:
Henk de Fries ps. compiling on osx xcode Last edited by henkdefries; 27th December 2012 at 20:29. Reason: PHP has better color coding than CODE, update |
![]() |
![]() |
![]() |
#4 | |
Junior Member
Join Date: Dec 2012
Posts: 3
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Join Date: Sep 2003
Posts: 27,873
|
the audio has to be MP3 encoded, sending the raw wav file will not work. as for what to do, you're best having a look at other projects which already do it (and provide code) like libshout or B.U.T.T.
-daz |
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: Dec 2012
Posts: 2
|
Thank you for your response, but I don't think i fully understand.
My audio file is allready MP3. Do i need to encode/decode it to something else to upload? I read that shoutcast doesn't mind. Butt uses the stream from the soundcard, and allready is a stream. But how do I make a stream from the MP3? I included LAME in my application, but I only found out how to make mp3 from other formats. Greetings, Henk de Fries |
![]() |
![]() |
![]() |
#7 |
Join Date: Sep 2003
Posts: 27,873
|
you need to have the encoded MP3 frame data and then that is put in the packet which is sent to the DNAS from your source.
with the case of BUTT if it's sampling from line-in then it would be encoding to MP3 and then sending that. if you're only doing MP3 files then you just need to implement / use a parser which will get you the frame data so you can then send it on. as such you wouldn't need to have LAME, that's only useful if you're taking PCM input and then want to create MP3 output (like the official Source DSP does). -daz |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|