Find the answer to your Linux question:
Results 1 to 7 of 7
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! Techitone's Avatar
    Join Date
    Jul 2010
    Exeter, Devon, UK

    Lightbulb looking for streaming audio software

    I've been looking for some streaming audio software too.

    I'm looking for something a bit simpler than Icecast and Shoutcast.

    Basically I want to send a single stream of audio from the 'mic in' socket on a laptop (running Xubuntu). The broascast/streaming software will be on this laptop. The broadcast will need to be sent wirelessly using a Mobile Internet dongle or wirelessly to a WiFi router connected to the Internet. This laptop will be sited in various locations and probably will not be using a static IP address.

    I then want to be able to receive/play this audio on another laptop (running Xubuntu).

    So basically I need to know what software to install on each laptop to achive this.

    I've tried Skype but it very often stops working and I need the broadcast to run consistantly for 2 to 4 hours.

    Many thanks in advance

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    The Sovereign State of South Carolina
    Shoutcast in my opinion is about as easy as streaming gets with Linux. It takes some learning but all you do is download the transcoder (sc_trans_40) and the server (scserver), set up the configuration files and start both. I use Shoutcast for sending and receiving audio at my radio station all the time and it does a good job. You might want to have another look at it. I'd be glad to help as I can if you do. If I can figure it out I'm sure you can.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  3. #3
    Just Joined! Techitone's Avatar
    Join Date
    Jul 2010
    Exeter, Devon, UK
    Thanks Dapper Dan

    I've downloaded the links you kindly provided and extracted them to my home folder. Can you please tell me how to configure both and how do I start them?

    btw, what's the link to your radio station

  4. $spacer_open
  5. #4
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    The Sovereign State of South Carolina
    You can use sc_trans to transcode to scserver on the same machine or different machines. You can put both into a directory in your home directory called "shoutcast."

    With your favourite editor, configure sc_trans.conf for the transcoder and sc_serv.conf for the server. I don't know your particular situation but perhaps you'll figure your way through by seeing mine...

    ; Sample sc_trans/0.35-j config file
    ; j.frankel 12/05/00
    ; t.pepper 10/31/00
    ; (relays not supported, yo)
    ; sc_trans operates in one of two modes, either reading mp3s off disk, decoding,
    ; re-encoding, and then broadcasting them, or relaying from a shoutcast server,
    ; transcoding to a lower bitrate, and broadcasting to a new server.
    ; sc_trans accepts the following signals:
    ; HUP - flush logfiles (close and reopen) -- will make console logging stop
    ; WINCH - jump to next song
    ; USR1 - reload playlist off disk (will not interrupt current playing stream)
    ; USR2 - toggle shuffle on/off
    ; TERM - normal sc_trans shutdown (clean)
    ; PlaylistFile (required EVEN IF RELAYING) - playlist file (to create, use
    ; find...
    ; ServerIP/ServerPort are the target server to send to
    ServerIP= (if on same machine, this can be localhost or   
    ; Password is the password on the sc_serv you're sending to.
    ; StreamTitle/URL/Genre define the data that appears on the directory and in the
    ; stream info.
    StreamTitle=Dapper Dans radio!
    Genre=chainsaw cocktail
    ; Logfile optionally denotes a text file to log sc_trans to.  a kill -HUP
    ; will force a close and re-open of this file (but will also cease logging to
    ; the console)
    ; Shuffle the playlist
    ; Bitrate/SampleRate/Channels recommended values:
    ; 8kbps 8000/11025/1  
    ; 16kbps 16000/11025/1
    ; 24kbps 24000/22050/1
    ; 32kbps 32000/22050/1
    ; 64kbps mono 64000/44100/1    
    ; 64kbps stereo 64000/22050/2  
    ; 96kbps stereo 96000/44100/2  
    ; 128kbps stere0 128000/44100/2
    ; Quality is from 1-10. 1 is best, 10 is fastest.
    ; Mode=0 for none, 1 for 100/100->100/0, 2 for 0/100->100/0
    ; Length is ms.
    ; Public determines whether or not this station will show up in the directory
    ; Put stuff here for user interaction (AOL IM, ICQ, IRC)
    In the transcoder directory, you'll see a file called "examle.lst." Here's mine:
    # this is a sample playlist file.
    # the playlist contains one line per song file you wish to stream.  the paths
    # should be absolute.
    # if shuffle is off, the songs will play in order.
    # the playlist is read once at startup, and cached to memory.  you may update
    # the playlist in a running process by sending a kill -USR1.  The next track
    # to play after the one currently playing will be from the new playlist.
    # on linux, you may specify a playlist item of DSP:/dev/soundcard, where soundcard
    # is the name of your audio device.  It's usually /dev/audio.  doing so will allow
    # you to broadcast from a line input feed instead of mp3s on disk.
    # the playlist ignores the first valid line.  Don't ask why.
    # Your playlist must have at least 2 entries.  if you only want to stream one file
    # over and over again, then list it twice, including DSP sources.
    # the following 2 lines are sample playlist lines.  you should replace them with
    # actual mp3 files, being sure to adhere to all the content guidelines set forth in
    # the .conf file!
    * /dev/audio or /dev/dsp or whatever the sound device is on your machine.

    And for the server:

    ; SHOUTcast Distributed Network Audio Server configuration file
    ; Copyright (C) 1998-2004 Nullsoft, Inc.
    ; All Rights Reserved.
    ; Last modified Mar 17 2004
    ; If you want to manage multiple configurations, just copy
    ; this file to another name, and run sc_serv with that name
    ; such as:
    ; sc_serv.exe sc_leet.conf
    ; ***************************
    ; Required stuff
    ; ***************************
    ; MaxUser.  The maximum number of simultaneous listeners allowed.
    ; Compute a reasonable value for your available upstream bandwidth (i.e. if
    ; you have 256kbps upload DSL, and want to broadcast at 24kbps, you would
    ; choose 256kbps/24kbps=10 maximum listeners.)  Setting this value higher
    ; only wastes RAM and screws up your broadcast when more people connect
    ; than you can support.
    ; Password.  While SHOUTcast never asks a listener for a password, a
    ; password is required to broadcast through the server, and to perform
    ; administration via the web interface to this server.  This server should
    ; consist of only letters and numbers, and is the same server your broadcaster
    ; will need to enter in the SHOUTcast Source Plug-in for Winamp.  THIS VALUE
    ; PortBase. This is the IP port number your server will run on.  The
    ; value, and the value + 1 must be available.  If you get a fatal error when
    ; the DNAS is setting up a socket on startup, make sure nothing else on the
    ; machine is running on the same port (telnet localhost portnumber -- if you
    ; get connection refused then you're clear to use that port).  Ports < 1024
    ; may require root privledges on *nix machines.  The default port is 8000.
    ; ***************************
    ; Optional Parameters
    ; ***************************
    ; ***************************
    ; Logging configuration
    ; ***************************
    ; LogFile: file to use for logging. Can be '/dev/null' or 'none'
    ; or empty to turn off logging. The default is ./sc_serv.log
    ; on *nix systems or sc_serv_dir\sc_serv.log on win32.
    ; Note: on win32 systems if no path is specified the location is
    ; in the same dir as the executable, on *nix systems it is in the
    ; current directory.
    ; RealTime displays a status line that is updated every second
    ; with the latest information on the current stream (*nix and win32
    ; console systems only)
    ; ScreenLog controls whether logging is printed to the screen or not
    ; on *nix and win32 console systems. It is useful to disable this when
    ; running servers in background without their own terminals. Default is 1
    ; ShowLastSongs specifies how many songs to list in the /played.html
    ; page.  The default is 10.  Acceptable entries are 1 to 20.
    ; TchLog decides whether or not the DNAS logfile should track yp 
    ; directory touches.  Adds and removes still appear regardless of
    ; this setting. 
    ; Default is yes
    ; TchLog=yes
    ; WebLog decides whether or not hits to http:// on this DNAS will
    ; be logged.  Most people leave this off because the DSP plug-in 
    ; uses http:// calls to update titles and get the listener count,
    ; which takes up a lot of log space eventually.  If you want to  
    ; see people making hits on your admin.cgi or index pages, turn  
    ; this back on.  Note that this setting does NOT affect XML stats
    ; counters for hits to http:// pages.
    ; Default is no.
    ; WebLog=no
    ; W3CEnable turns on W3C Logging.  W3C logs contain httpd-like accounts
    ; of every track played for every listener, including byte counts those listeners
    ; took.  This data can be parsed with tools like Analog and WebTrends, or given
    ; to third parties like Arbitron and Measurecast for their reporting systems.
    ; Default is Yes (enabled).
    ; W3CLog describes the name of the logfile for W3C logging.  Default logfile is
    ; sc_w3c.log, in the same directory wherever the DNAS gets started from.
    ; ***************************
    ; Network configuration
    ; ***************************
    ; SrcIP, the interface to listen for source connections on (or to make relay
    ; connections on if relaying). Can and usually will be ANY or
    ; (Making it will keep other machines from being able to
    ; broadcast using your shoutcast server )
    : SrcIP=
    ; DestIP, IP to listen for clients on (and to contact
    ; can and usually will be be ANY. If your machine has multiple IP addresses,
    ; set this to the one you want it to be accessed by.
    ; Yport, port to connect to on. For people behind caching   
    ; webproxies, change this to the alternate port (666 is what it might be,    
    ; check if you have problems). Otherwise, leave this at 80.
    ; We're actively working on re-opening port 666, but as of release the only
    ; working port is port 80.
    ; NameLookups.  Specify 1 to perform reverse DNS on connections.
    ; This option may increase the time it takes to connect to your
    ; server if your DNS server is slow.  Default is 0 (off).
    ; RelayPort and RelayServer specify that you want to be a relay server.
    ; Relay servers act as clients to another server, and rebroadcast.
    ; Set RelayPort to 0, RelayServer to empty, or just leave these commented
    ; out to disable relay mode.
    ; RelayPort=8000
    ; RelayServer=
    ; ***************************
    ; Server configuration
    ; ***************************
    ; AdminPassword.  This password (if specified) changes the
    ; behavior of Password to be a broadcast-only password, and
    ; limits HTTP administration tasks to the password specified
    ; here.  The broadcaster, with the password above, can still
    ; log in and view connected users, but only the AdminPassword  
    ; will grant the right to kick, ban, and specify reserve hosts.
    ; The default is undefined (Password allows control for both   
    ; source and admin)
    ; AdminPassword=Dapper_Dans_Admin_password
    ; AutoDumpUsers controls whether listeners are disconnected if the source
    ; stream disconnects. The default is 0.
    ; AutoDumpSourceTime specifies how long, in seconds, the source stream is
    ; allowed to be idle before the server disconnects it. 0 will let the source
    ; stream idle indefinately before disconnecting. The default is 30.
    ; ContentDir specifies the directory location on disk of where to stream
    ; on-demand content from.  Subdirectories are supported as of DNAS 1.8.2.
    ; Default is ./content, meaning a directory named content in the same directory
    ; as where sc_serv was invoked from.
    ; ContentDir=./content
    ; IntroFile can specify a mp3 file that will be streamed to listeners right
    ; when they connect before they hear the live stream.
    ; Note that the intro file MUST be the same samplerate/channels as the
    ; live stream in order for this to work properly. Although bitrate CAN
    ; vary, you can use '%d' to specify the bitrate in the filename
    ; (i.e. C:\intro%d.mp3 would be C:\intro64.mp3 if you are casting at 64kbps).
    ; The default is no IntroFile
    ; IntroFile=c:\intro%d.mp3   
    ; BackupFile can specify a mp3 file that will be streamed to listeners over
    ; and over again when the source stream disconnects. AutoDumpUsers must be 
    ; 0 to use this feature. When the source stream reconnects, the listeners  
    ; are rejoined into the live broadcast.
    ; Note that the backup file MUST be the same samplerate/channels as the
    ; live stream in order for this to work properly. Although bitrate CAN 
    ; vary, you can use '%d' to specify the bitrate in the filename
    ; (i.e. C:\backup%d.mp3 would be C:\backup32.mp3 if you are casting at 32kbps).
    ; The default is no BackupFile
    ; BackupFile=C:\intro%d.mp3   
    ; TitleFormat specifies a format string for what title is sent to the listener.
    ; For example, a string of 'Justin Radio' forces the title 'Justin Radio' even 
    ; when the source changes the title. You can use up to one '%s' in the string  
    ; which lets you contain the title from the source. For example, if your 
    ; TitleFormat is 'Justin Radio: %s', and the source plug-in's title is   
    ; 'Billy plays the blues', then the net title is 
    ; 'Justin Radio: Billy plays the blues'. Note: only works on non-relay servers.
    ; The default is no format string. 
     TitleFormat=Dapper Dans radio station: %s
    ; URLFormat specifies a format string for what url is sent to the listener.
    ; Behaves like TitleFormat (see above).
    ; The default is no format string.
    ; URLFormat=
    ; PublicServer can be always, never, or default (the default, heh)
    ; Any setting other than default will override the public status
    ; of the source plug-in or of a SHOUTcast server that is being relayed.
    ; AllowRelay determines whether or not other SHOUTcast servers will be
    ; permitted to relay this server.  The default is Yes.
    ; AllowPublicRelay, when set to No, will tell any relaying servers not
    ; to list the server in the SHOUTcast directory (non-public), provided
    ; the relaying server's Public flag is set to default.  The default is
    ; Yes.
    ; MetaInterval specifies how often, in bytes, metadata sent.
    ; You should really leave this at the default of 8192, but the option is
    ; provided anyway.
    ; *****************************
    ; Access Control
    ; *****************************
    ; ListenerTimer is a value in minutes of maximum permitted time for  
    ; a connected listener.  If someone is connected for longer than this
    ; amount of time, in minutes, they are disconnected.  When undefined,
    ; there is no limit defined.  Default is undefined.
    ; BanFile is the text file sc_serv reads and writes to/from
    ; for the list of clients prohibited to connect to this
    ; server.  It's automatically generated via the web
    ; interface.
    ; RipFile is the text file sc_serv reads and writes to/from
    ; for the list of client IPs which are *ALWAYS* permitted
    ; to connect to this server (useful for relay servers).
    ; This file is automatically generated via the web
    ; interface.  Note that if your server is FULL, and someone  
    ; from a Reserved IP connects, the DNAS will force the person
    ; listening for the longest time off to make room for the new
    ; connection.
    ; RIPOnly, when set to Yes, will only allow IP addresses listed in the Reserved
    ; IP list to connect and relay.  All other connections for listening will be denied.
    ; This is really only useful for servers whose sole purpose is to provide the  
    ; primary feed to all public relays.  Setting this value to Yes also forces the
    ; server into Private mode, since listing this server in the directory would
    ; be pointless.  Default is No.
    ; RIPOnly=No
    ; *****************************
    ; Extended Logging 
    ; *****************************
    ; The old features previously at this location, HistoryLog and CurrentLog, are
    ; no longer used and succeded by W3C Logging and XML, respectively.
    ; ***************************
    ; Mass Configuration
    ; ***************************
    ; Unique: assigns a variable name for use in any config item which points to a
    ; file.  Useful for servers running lots of SHOUTcast servers that have similar
    ; configuration parameters, excepting logfile names, banfile names, etc.  Any  
    ; parameter that takes a pathname can include the character $, which will
    ; substitute $ for the variable assigned here.  Keep in mind that the unique
    ; variable can only be used after it is defined, so don't try to use a unique
    ; variable substitution in a path before you define it.  For example, you    
    ; could set:
    ; Unique=my_server
    ; and then define Log=/usr/local/shoutcast/$.log in an included configuration
    ; file.  Default is Unique=$, so that by default any file with $ in the name 
    ; won't substitute anything at all.
    ; Include: instructs the sc_serv to read from the named configuration file,
    ; *at the point of insertion of the Include statement*, and process as though
    ; the included file was part of itself.  Note that all configuration parameters
    ; in the DNAS config file are processed first to last, so if an item is defined
    ; twice in a configuration, the last item to process will be the one that takes
    ; effect.  For this reason, it's usually a good idea to use the Includes first 
    ; in a config file.
    ; example:
    ; Include=/usr/local/shoutcast/common.conf
    ; Default is not applicable.
    ; *****************************
    ; Tweaks
    ; *****************************
    ; CpuCount is used to explicitly limit the DNAS to dominating a finite
    ; amount of processors in multiprocessor systems.  By default, 
    ; SHOUTcast creates one thread for every processor it detects in the
    ; host system, and assigns listeners equally across all the threads.
    ; In the event SHOUTcast doesn't correctly determine the number of  
    ; CPUs in your host, or if you for whatever reason want to force    
    ; the DNAS to not use other processors, you can say so here.
    ; Default behavior is to use as many processors as the DNAS detects on
    ; your system.
    ; CpuCount=1  
    ; Sleep defines the granularity of the client threads for sending data.
    ; DNAS 1.7.0, per client thread, will send up to 1,024 bytes of data   
    ; per socket (or less depending on the window available), and then     
    ; sleep for the provided duration before repeating the whole process.  
    ; Note that making this value smaller will vastly increase CPU usage on
    ; your machine.  Increasing reduces CPU, but increasing this value too far
    ; will cause skips.  The value which seems most optimal for 128kbps 
    ; streaming is 833 (833 microseconds per client poll) on our test labs.
    ; We wouldn't recommend setting it any lower than 100, or any higher than
    ; 1,024.  If you have a slower machine, set this number lower to fix
    ; skips.
    ; Default value is 833.
    ; Sleep=833
    ; CleanXML strips some whitespace and linefeeds from XML output which
    ; confuses some (poorly written) XML parsers.  If you get XML rendering errors,
    ; try turning this on.  Default is No (off).
    ; CleanXML=No
    Notice that certain lines are "uncommented." That means the ";" or "#" is taken away so the line will be read.

    Hopefully this will clue you in on how to set up yours.
    Last edited by Dapper Dan; 07-19-2010 at 03:37 PM.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  6. #5
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    The Sovereign State of South Carolina
    I forgot to add... To test what you have, open two terminals. In the first, "cd" to inside the transcoder directory. In the second, cd to the server directory. Then in the first terminal do:
    In the other:
    * These may be different depending on the version you are running.

    Opening the terminals side by side will enable you to better see if the two are getting along.

    If on the same machine, open a browser and go to this link:
    If you see the Shoutcast admin page and it says the "Server is currently up and public," you have been successful.
    Last edited by Dapper Dan; 07-19-2010 at 02:22 PM.
    Linux Mint + IceWM Registered: #371367 New Members: click here

  7. #6
    Just Joined! Techitone's Avatar
    Join Date
    Jul 2010
    Exeter, Devon, UK
    Dapper Dan you're a real star for posting so much info. Thank you so much.

    I'm still having some difficulty getting everything set up and running. The download links on the Shoutcast website seem to be for newer/beta versions of both the server ( SHOUTcast DNAS 2.0 Beta ) and transcoder software ( Latest Release: SC_TRANS 2.6 ). I've found a link to an older version of sc_serv ( SHOUTcast Linux server ( glibc ) v1.9.8 ) here,

    shoutcast . com/download-files

    I download sc_serv v1.9.8 and with the info you posted I think I've got it running in terminal. In terminal it shows this,

    Event log:
    <07/23/10@14:xx:xx> SHOUTcast] DNAS/Linux v1.9.8……starting up.. ( xx:xx = the time )
    <07/23/10@14:xx:xx> [Main] pid: 1367
    <07/23/10@14:xx:xx> [Main] loaded config from sc_serv.conf
    <07/23/10@14:xx:xx> [Main] initializing (usermax:10 portbase:8000)
    <07/23/10@14:xx:xx> [Main] No ban file found
    <07/23/10@14:xx:xx> [Main] No rip file found
    <07/23/10@14:xx:xx> [Main] opening source socket
    <07/23/10@14:xx:xx> [Main] source thread starting
    <07/23/10@14:xx:xx> [Main] Client Stream thread [0] starting
    <07/23/10@14:xx:xx> [Main] client main thread starting
    <07/23/10@14:xx:xx> [Source] listening for connection on port 8001
    <07/23/10@15:05:21> [Sleeping] 0 listeners (0 unique) **THE TIME ON THIS LINE IS COUNTING UP IN SECONDS**

    When I look up : 8000 in Firefox it shows the SHOUTcast DNAS Server page but says 'server status: Server is currently down'. Is this because I haven't got any audio streaming to it from the same machine or is something wrong with the config setup?

    I've tried using the new version of sc_trans but I'm not having much luck with it. When I try and start it ( ./sc_trans ) in Terminal it say's "Permission Denied". Is their any other transcoding software I could run with sc_serv or is their an older version of the transcoder software to play audio to the Shoutcast Server on the same machine?

    Thanks :)

  8. #7
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    The Sovereign State of South Carolina
    Your server is running but the reason it is saying it is down is because the transcoder is not up and running and sending to the server. I think maybe you just need to change ownership of the transcoder directory and its contents. Try:
    chown -R yourusrname:yourusergroup sc_trans*
    *or whatever the name of the transcoder directory is. If it still gives you a permission error, you could change its permissions. Stick with it! It appears you are very close! Once it all comes together and you can hear the stream, all this will be worth it!
    Linux Mint + IceWM Registered: #371367 New Members: click here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts