top of page

How To Set Up Icecast2 On Debian

  • Writer: tuftaicomlenethkat
    tuftaicomlenethkat
  • Aug 12, 2023
  • 6 min read


Apr 11 11:37:17 SV-XEON1 icecast2[2121]: Starting icecast2: [2020-04-11 11:37:17] WARN cfgfile/_parse_alias incomplete alias definitionApr 11 11:37:17 SV-XEON1 icecast2[2121]: [2020-04-11 11:37:17] EROR main/fatal_error FATAL: error parsing config file (/etc/icecast2/icecast.xml)Apr 11 11:37:17 SV-XEON1 icecast2[2121]: [2020-04-11 11:37:17] EROR main/fatal_error XML config parsing error


The first step in the process is to install the Icecast server itself. The recommended way to do this is using the distro packages, or in case of Win32 download the binary package or installer. How to do this is not contained within this documentation.After installation there is placed a sample config file named icecast.xml in either /usr/local/etc, /etc/ or /etc/icecast2/ (for UNIX) or in the current working directory, in a folder called etc, in case you are using the Window binary package.




How To Set Up Icecast2 On Debian



Next is what I think is an easier way to encrypt the icecast stream (compared to proxying via apache). The trick is that icecast certificates must be in the form of one pem file which contains the certificate, intermediate certificates and the private key. Letsencrypt does not supply this format in one file. But the Letsencrypt automatic certificate renewal process allows us to add a little post-renewal command which concatenates the certs+key, replaces the old one and restarts icecast2.


The touch command simply creates some blank files that icecast2 can then write to. Now I find that Icecast works fine. If you get a text editor and alter this password etc while Icecast2 is already running then you will need to stop Icecast2 (press ctrl and c simultaneously to do this) and then restart Icecast2 with the original command you used.


I tested both solutions and they most certainly do solve the problem. One can easily test by setting up icecast2, connecting a source client, then creating a loop with wget to generate a lot of connect/disconnect noise.


The verification of the Stable Release Update for icecast2 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.


Hi Ben,mainly you have two buffers which need to get filled:1) Darkice buffer, configured with "bufferSecs" (5 seconds in my example cfg)2) Icecast2 buffer aka "queue-size" and eventually "burst-size>", which need some time to getfilled.Not sure about how much delay is caused by resampling, but mpeg is not designed for low latencytransport/transition. Maybe aac or ogg perform better here. I would be glad if you'd try and report backhere.If you have both Darkice and icecast2 on one host, you can reduce the Darkice buffer. not sure if 0 is agood choice, but you could also try and frankly report here.However, if you want to provide a stable stream for clients on the network, you should not turn officecast2 buffers completely.


J@y and Guilherme Rambo,please have a look at the ALSA docs, I referred to at -streaming-mp3-audio-with-darkice-and-icecast2-on-raspberry-pi/#comment-2You could also get in touch with the ALSA community via Mailinglists, Newsgroups etc. I am not reallyexperienced with ALSA and can't help you out.


Hi Pedro,using arecord is not necessary here. Darkice directly fetches the input signal and streams it toicecast2.Can you see your stream in icecast2 when you open :8000/raspi in yourbrowser? (as shown in the article screenshot above)If so, then make sure, you have configured the correct device in darkice.cfg as given from arecord-l[input]device = hw:1,0Maybe you setting hw:1,0 instead of plughw:1,0 helps.If your stream is not shown up in icecast2 at all, then check if mountpoint, password and url in thedarkice AND icecast2 configuration match.icecast2 configuration can be found in /etc/icecast2/icecast.xmlAlso have a look at the log from icecast2. could be that the logging needs to be turned on first. Thisis also configured in the config file mentioned above.


Hi teratech,seems like Darkice is not able to connect with your Icecast2 server. Check server and port settings inthe [icecast2-0] section of the Darkice config file.And also test if icecast2 is running and accepting incoming TCP connections on the specified hostaddress/port.$ sudo netstat -ltpn grep icecast2Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program nametcp 0 0 xx.xx.xx.xx:8000 0.0.0.0:* LISTEN 1751/icecast2


Thanks for this guide, definitely saved me a ton of time.I just wanted to comment that the single snafu I ran into was in creating the debian/rules file.If you copy and paste the provided code into the file, there's the danger of the tabs being convertedinto spaces, which results in a "missing separator" error when you go to compile the source, which willprobably look like this:debian/rules:4: *** missing separator. Stop.To remedy, you just need to delete all spaces at the beginning of lines, but make sure there is a singletab at the front of every line that follows a colon.I'm mentioning this so that this page will be searchable for that error and so people will know how todeal with it. :)Cheers and thanks again.


I've been trying to install icecast2 to no avail. I've used sudo apt-get install icecast2 and sudoinstall aptitude icecast2 and they both return no packages. I'm running raspbian wheezy. Has somethingchanged?


I found the reason: no tab nor space before the dh_auto_configure statement in debian/rules!That was clearly not allowed. But right now it has recompiled (with the tab in debian/rules), and I expect it to work now. Buildinggives way more output than the first try.Builds successful, and after dpkg -i there is a /usr/bin/darkice and even an example.cfg !Thanks for your time,ArnoldBtw: dpkg -L darkice yielded this (without the tab):/./etc/defaults/etc/defaults/darkice/etc/init.d/etc/init.d/darkice/usr/usr/bin/usr/share/usr/share/doc/usr/share/doc/darkice/usr/share/doc/darkice/changelog.gz/usr/share/doc/darkice/copyright/usr/share/doc/darkice/changelog.Debian.gz/usr/share/doc/darkice/README.Debian$That was all.


pi@raspberry /src/darkice-1.0 $ dpkg-buildpackage -rfakeroot -uc -bdpkg-buildpackage: source package darkicedpkg-buildpackage: source version 1.0-999mp3+1dpkg-buildpackage: source changed by dpkg-buildpackage: host architecture armhfdpkg-source --before-build darkice-1.0fakeroot debian/rules cleandebian/rules:4: *** missing separator. Stop.dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2So how do i fix this?


Hello. When I try to start darkice with aacp as format, I get the following error: "DarkIce not compiledwith AAC+ support, thus can't aacp stream: icecast2-0 [0]"How can I compile it with aac+ support?


Hi Michael M,could be that this is a bug in darkice. I found the following issue which seems to be related: =41Can you please rebuild the package and have a look, if the output of the "configure" partcontains: "build with aacplus library"If you this output, than I'd say it's a bug which needs to be fixed in darkice and then backported tothe debian src package.If you get "building without aacplus" or "not found, building without aacplus", thenyou probably miss some package dependency. If you'd post the corresponding aacplus lines (please NOT thecomplete output) I could have a look.


Hi Thierry,did you set "format" in your /etc/darkice.cfg file as shown in the example?[icecast2-0]...format = mp3...If setting format does not fix your issue, please post your darkice.cfg file to or the like and add the link here.


Hello Steffen,And thank's for your speed respond,my .cfg is :# this section describes general aspects of the live streaming session[general]duration = 0 # duration of encoding, in seconds. 0 means foreverbufferSecs = 5 # size of internal slip buffer, in secondsreconnect = yes # reconnect to the server(s) if disconnected# this section describes the audio input that will be streamed[input]device = hw:1,0 # OSS DSP soundcard device for the audio inputsampleRate = 44100 # sample rate in Hz. try 11025, 22050 or 44100bitsPerSample = 16 # bits per sample. try 16channel = 2 # channels. 1 = mono, 2 = stereo# this section describes a streaming connection to an IceCast2 server# there may be up to 8 of these sections, named [icecast2-0] ... [icecast2-7]# these can be mixed with [icecast-x] and [shoutcast-x] sections[icecast2-0]bitrateMode = vbr # average bit rateformat = mp3 # format of the stream: ogg vorbisbitrate = 128 # bitrate of the stream sent to the serverserver = yp.yourserver.com# host name of the serverport = 8490 # port of the IceCast2 server, usually 8000password = ******* # source password to the IceCast2 servermountPoint = stream # mount point of this stream on the IceCast2 servername = DarkIce trial# name of the streamdescription = This is only a trial# description of the streamurl = # URL related to the streamgenre = my own # genre of the streampublic = no # advertise this stream?localDumpFile = recording.mp3 # local dump fileThank's Thierry


@ThierryIt seems your darkice.cfg is incomplete or wrong. Your posted configuration does not cause the error youmentioned before:DarKice: configSection.ccp 117: format missing in section icecast-0 [0]In your post, you have [icecast2-0] instead of icecast-0Please double check is you use the coorect cfg file. You could try to explicitly set it with:darkice -c /path/to/your/darkice.cfgAlso you the bitrateMode requires you to set bitrate or quality: If you use bitrateMode = vbrthen you have to set quality instead of bitrate. So either you switch to something like:bitrateMode = cbrformat = mp3bitrate = 128or:bitrateMode = vbrformat = mp3quality = 0.6 2ff7e9595c


 
 
 

Recent Posts

See All
box baixar apk

Box Download APK: como obter o melhor aplicativo de armazenamento em nuvem para o seu dispositivo Android Se você está procurando uma...

 
 
 

Comments


@2023 by U.C. Clear. Proudly created with Wix.com

VISIT US

500 Terry Francois St.

San Francisco, CA 94158

Call and schedule a FREE LASIK consultation today!

123-456-7890

CALL

Tel: 123-456-7890

Fax: 123-456-7890

  • Wix Facebook page
  • Wix Twitter page
  • Wix Google+ page
bottom of page