PDA

Click to See Complete Forum and Search --> : VB6 - Shoutcast Server using Blade Encoder


CVMichael
Jul 26th, 2006, 02:35 PM
I modified this project MP3 Encoder with Blade encoder (http://www.vbforums.com/showthread.php?t=281650), to broadcast the MP3 sound.

First of all, make sure you put the BLADEENC.DLL in the system32 folder, you will find it in BladeDLL-082-intel.zip file. If you don't put the DLL there, your VB will crash.

This is where I got the Blade Encoder DLL ZIP: http://home.swipnet.se/~w-82625/skeleton/DL.html

If the DLL included in my ZIP does not work, find the correct one for your system in the link above.

Also make sure the BladeEncVB.dll is either in your project folder, or in the sytem32 folder.

I also included files to show how to start listening to your radio station:
my radio station.pls and My Radio Station.htm

The HTML file has a link to the PLS file, and the PLS file has a link to where the Shoutcast Server is, and it's port.
This will open WinAmp (hopefully you have it), and WinAmp will start playing from your radio station.

If the sound cuts out, it means that your internet connection is too slow.
To calculate how much data the socket has to send, follow this formula:
KBytes / Second = (Bitrate / 8) * clients_connected

So, if your bitrate is 128, and one person is connected:
128 / 8 * 1 = 16 KBytes / Sec

So your internet connection has to be able to upload at least 16 KBytes / Second

To fix the problem, lower the bitrate.
Usually for modem connections, you should use 56 Bitrate, for DSL ~128 Bitrate, and Cable connection, 128 - 190 Bitrate.

DigiRev
Nov 18th, 2006, 08:11 PM
Really nice code, Michael. :thumb:

I've been thinking of using MP3 encoding in a voice chat program I'm making. Better quality at a (usually) smaller size (than downsampled WAV).

:thumb:

Vntalk
Nov 20th, 2006, 10:15 PM
i want to know if is it possible to make it play with windows media player

CVMichael
Nov 21st, 2006, 07:03 AM
Yes it is possible.

The streamming is the same, so you don't have to make any changes to the program, but the way you open the stream is diferent.

You have to change the .PLS file to the format that WMP uses (though I don't remember what format is that)

Do you know of any radio station that plays in WMP (windows media player) ?

Instead of opening the stream, right click on the link and choose "Save As...", then open the file in Notepad, and you can see the format.

Then you can use the same file type and change the contents to your radio station, and that's it, then you can open it in windows media player...

CVMichael
Nov 21st, 2006, 07:13 AM
I searched on the net for radio WMP stations, and found one, this is the html code in that page:

<object id="MediaPlayer" width="600" height="56" border=0 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft¬ Windows¬ Media Player components..." type="application/x-oleobject">
<param name="FileName" value="http://www.abc.net.au/streaming/RN.asx">
<param name="TransparentatStart" value="true">
<param name="AutoStart" value="true">
<param name="ShowControls" value="1">
<param name="autosize" value="0">
<param name="allowchangedisplaysize" value="1">
<param name="autorewind" value="0">
<param name="displaysize" value="0">
<param name="showstatusbar" value="1">
<param name="videoborderwidth" value="0">
<param name="videobordercolor" value="0">
<param name="videoborder3d" value="0">
<param name="animationatstart" value="1">
<param name="volume" value="1">
<embed type="application/x-mplayer2" id=radio pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&"
src="http://www.abc.net.au/streaming/RN.asx" align="top"
showcontrols=1
width=600
height=40></embed></object>

I think you just have to replace the link in colored in RED, with the stream of your radio station (from the program I made)

I can't try it right now (I'm at work)

Vntalk
Nov 21st, 2006, 07:08 PM
I try This

<object id="MediaPlayer" width="600" height="56" border=0 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft¬ Windows¬ Media Player components..." type="application/x-oleobject">
<param name="FileName" value="my radio station.pls">
<param name="TransparentatStart" value="true">
<param name="AutoStart" value="true">
<param name="ShowControls" value="1">
<param name="autosize" value="0">
<param name="allowchangedisplaysize" value="1">
<param name="autorewind" value="0">
<param name="displaysize" value="0">
<param name="showstatusbar" value="1">
<param name="videoborderwidth" value="0">
<param name="videobordercolor" value="0">
<param name="videoborder3d" value="0">
<param name="animationatstart" value="1">
<param name="volume" value="1">
<embed type="application/x-mplayer2" id=radio pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&"
src="my radio station.pls" align="top"
ShowControls="1"
width="600"
height="56" TransparentatStart="true" AutoStart="true" autosize="0" allowchangedisplaysize="1" autorewind="0" displaysize="0" showstatusbar="1" videoborderwidth="0" videobordercolor="0" videoborder3d="0" animationatstart="1" volume="1"></embed></object>


didn't work :(

DigiRev
Nov 22nd, 2006, 12:06 AM
If your URL has spaces in it, you might have to put %20 where the spaces go. ie:

src="my radio station.pls"

to

src="my%20radio%20station.pls"

Not sure if you do or not, but it might work.

Vntalk
Nov 22nd, 2006, 08:45 AM
no it doesn't

Al42
Nov 29th, 2006, 09:47 AM
Try<OBJECT>
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
Name=MediaPlayer
src="http://<your url here>:<your port here>/<your stream name here>"
AutoStart=1 ShowStatusBar=1 volume=-1
HEIGHT=50 WIDTH=350>
</embed>
</OBJECT>The src should be formatted without braces:
http://yourURL:8000/stream

JamieWarren09
Apr 30th, 2011, 10:57 AM
Hi guys,

is there a way i can make this code so that rather than the users machine being turnt into a shoutcast server, it will let them stream to a external shoutcast server?

I.e one thats hosted online,

Is there a way so they put in the servers IP Address, PORT AND PASSWORD and click start, then it would encode to the external server?

Thanks,
Jamie

aarslan1
May 1st, 2011, 02:59 AM
You really had to bump that old thread? huh?
Look at the date - 2006

Nightwalker83
May 2nd, 2011, 12:49 AM
@CVMichael,

Cool! I will have to try this.

Edit:

You really had to bump that old thread? huh?
Look at the date - 2006

Um, bumping threads is considered "Acceptable" in the codebank because it allows people to comment on the code that has been provided. There no time limit in replying to codebank threads.