Download Links
Source code oddcastv2 -> oddcastv2_wa2_xmms-0.9.2.tar.gz
Source code xmms effect plugin -> dsp_oddcast_xmms-0.0.3.tar.gz
What is it ?
OddcastV2 - XMMS is a combination of a few different products. The purpose is to provide a method of using XMMS
for broadcasting. XMMS is a fairly decent media player with alot of potential opportunities for broadcast plugins.
This is my attempt at one.
It should be noted that there existed a previous version of oddcast that functioned as a XMMS effect plugin, however
the following caused me to ditch it and start fresh :
I was constantly having trouble with GTK and XMMS behaving well together. This could have been my ignorance with GTK (my UI programming abilies are limited to win32).
it was built using old oddcast code which has been significantly improved and enhanced for the stream transcoder, I wanted to use that engine.
it was unstable as all hell, and a nightmare to maintain...
As a result I decided to re-do the whole thing. For the UI I decided to go with wxWindows (www.wxwindows.org) an incredibly good and
(mostly) stable UI product. In doing the UI portion of oddcastv2 I wanted to use wxWindows also in part so that I could have the same UI code for both XMMS and the winamp2
oddcastv2 plugin (which will also be based on the streamTranscoder core).
IMPORTANT STUFF STARTS HERE
OddcastV2 - XMMS is made up of two separate programs. The first is an XMMS effect plugin does the very simple task of taking the audio data from XMMS and sending it to the
second program which is a standalone program called (aptly enough) "oddcastv2". "oddcastv2" is the wxWindow UI standalone program which is responsible for taking the raw
audio data (fed to it via the effect plugin) and converting it to the appropriate compressed audio codec (MP3 and Vorbis supported) and then sending it out to the
appropriate streaming server (Shoutcast, Icecast1.x, Icecast2 supported). "oddcastv2" will also perform things like resampling (going from 44kHz to 22kHz or to 32kHz)
as well as channel down/upmixing (converting from Mono to Stereo and vice-versa).
The XMMS effect plugin sends the data to "oddcastv2" via a defined named pipe. The Effect plugin has only one configuration option and that is for the name of this named
pipe. "oddcastv2" has a *ton* of options, and is, in general, kinda difficult to configure, but not overly-so (hopefully).
so visually it works like :
XMMS ----> oddcast Effect Plugin --(audio data)---> /named/pipe --(audio data)---> oddcastv2 --(encode)--> --(resample,etc.)--> shoutcast,icecast,icecast2
Ok, that's all well and good, but can you give me some step by step instructions on setting it up ?
Why sure.
Step One
Download and install both the XMMS effect plugin (oddcastv2_xmms_effect) and oddcastv2 (oddcastv2_wa2_xmms).
Step Two
Run oddcastv2 :
% oddcastv2
At this point, you should see the following displayed :
Click the "config" button (give it a second, sometimes wxWindow is slow to display the config screen)
You should see the following screen :
General Settings
Bitrate (Min/Nom/Max) - If you are using VBR, set these to your VBR desired values, if not using VBR, then you should set the Nominal value to the bitrate desired. In the case of using vorbis, if you are using bitrate management, then these are significant, if using quality settings, then these are ignored.
Samplerate - e.g. 44100, 32000, 22050, 11025 (experiment with all sorts of samplerates)
Channels - 1 = Mono, 2 = Stereo
Encoder type - OGG = Ogg vorbis, LAME = Lame mp3 encoder
Encoder Settings
(this section will be filled in later - it's kinda obvious though)
Server Settings
Named pipe - set this to whatever the Effect plugin is set to
Record from /dev/dsp (live recording, i.e. not from XMMS)
Server Type - (Shoutcast/Icecast/Icecast2) - note : Icecast and Icecast2 are different!
Server - machine running the broadcast server
Port - port of the broadcast server
Encoder Password - duh!
Genre - Used for yp listing
Mountpoint - only if using Icecast/Icecast2. If broadcasting in vorbis, then this must end in .ogg (i.e. /stream.ogg) otherwise make it something like /stream, if using shoutcast, leave it blank
Stream URL - used for YP listing
Server Desc - used for YP listing
Reconnect secs - if the encoder loses connection to the broadcast server, wait this many seconds before retrying the connection.
Live Rec Device - where to read from line -in.
Live rec Samplerate - probably best to leave this at 44100, but if you are daring you can try 48000.
Public Server - list on a YP directory
Reconnect - automatically attempt reconnections if the encoder gets disconnected.
Note that you can also hand-edit the configuration file (transcoder.cfg - yeah, I know, stupid name) and skip the who config screen...Although this is not recommended.
Step Three
Run XMMS :
Make sure you have the oddcast effect plugin selected

start playing (note if XMMS starts playing and then immediately stops, make sure that you have started oddcastv2 and the named pipes are configured the same)
you should now see the description in oddcastv2 change to "Reading but not broadcasting". This means that audio data is communicating over the named pipe and oddcastv2 is
just sitting there waiting for you to connect it to the broadcasting server. If you don't see this description, then check to make sure you did steps 1 and 2 correctly.
Step Four
Connect oddcastv2 to the broadcast server :
Click the "Connect" button on oddcastv2 and start broadcasting!
FAQ
Why are they separate programs ?
Well, wxWindows and XMMS really did not like each other, and as a result I decoupled the UI portion and made it a standlone program.
When I play music in XMMS it stops after I click play...What's up with that ?
This means you don't have oddcastv2 running and nothing is reading from the pipe that the effect plugin is writing to (hence it's blocked). You will have to disable the effect plugin if you want to play songs and not broadcast.
I can't compile your code....
yeah, well, I did my best at making it as multi-platform as possible, and personally going thru my own autoconf-hell, so if you have a specific platform problem, please provide a patch that fixes it..
What platform did you test this on ?
RedHat 7.2 and 7.3, gcc 2.96