I?ve successfully implemented IceCast on a Raspberry Pi and can access the stream ONLY if I use an ffmpeg statement to start the stream. Unfortunately, the stream is choppy and the sound quality is poor. I?ve tried using ICES, but I don?t get any sound. Terminal command that works: ffmpeg -ac 2 -f alsa -i hw:0,0 -acodec mp3 -ab 48k -ac 2 -content_type audio/mpeg -f mp3 icecast://source:password at ipaddress:port/stream ICES terminal command that doesn?t work: ices2 /home/pi/ices-2.0.2/conf/ices-alsa.xml What am I missing? Thanks for any help/suggestions.
Hi Rondejavu, El mi?, 27-11-2019 a las 15:57 -0500, Rondejavu escribi?:> I?ve successfully implemented IceCast on a Raspberry Pi and can > access the stream ONLY if I use an ffmpeg statement to start the > stream. Unfortunately, the stream is choppy and the sound quality is > poor. I?ve tried using ICES, but I don?t get any sound. > > Terminal command that works: > ffmpeg -ac 2 -f alsa -i hw:0,0 -acodec mp3 -ab 48k -ac 2 > -content_type audio/mpeg -f mp3 > icecast://source:password at ipaddress:port/stream > > ICES terminal command that doesn?t work: > ices2 /home/pi/ices-2.0.2/conf/ices-alsa.xml > > What am I missing? Thanks for any help/suggestions.Take a look at the logs, at ices-alsa.xml and also start Icecast2 firstly. Regards. Jos? Luis> > _______________________________________________ > Icecast mailing list > Icecast at xiph.org > http://lists.xiph.org/mailman/listinfo/icecast
I may be wrong, but looking at your ffmpeg command, it looks as though you are trying to stream mp3 files.? Ices2 is no longer compatible with mp3 files, and instead has moved to ogg.? For an ices version that handles mp3 files, you will need to compile ices0.4. Good luck, Michael J. Brenegan USAR, Retired Clinical Engineering Yale/New Haven Hospital On Wednesday, November 27, 2019, 3:57:26 PM EST, Rondejavu <rondejavu at gmail.com> wrote: I?ve successfully implemented IceCast on a Raspberry Pi and can access the stream ONLY if I use an ffmpeg statement to start the stream. Unfortunately, the stream is choppy and the sound quality is poor.? I?ve tried using ICES, but I don?t get any sound. Terminal command that works: ffmpeg -ac 2 -f alsa -i hw:0,0 -acodec mp3 -ab 48k -ac 2 -content_type audio/mpeg -f mp3 icecast://source:password at ipaddress:port/stream ICES terminal command that doesn?t work: ices2 /home/pi/ices-2.0.2/conf/ices-alsa.xml What am I missing?? Thanks for any help/suggestions. _______________________________________________ Icecast mailing list Icecast at xiph.org http://lists.xiph.org/mailman/listinfo/icecast -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/icecast/attachments/20191128/7544885a/attachment.htm>
On Thu, Nov 28, 2019 at 11:39:56AM +0000, Michael Brenegan wrote:> I may be wrong, but looking at your ffmpeg command, it looks as > though you are trying to stream mp3 files. Ices2 is no longer > compatible with mp3 files, and instead has moved to ogg. For an > ices version that handles mp3 files, you will need to compile > ices0.4.One alternative is to use liquidsoap, but its configuration is not for the faint-hearted. With appropriate libraries, you can get liquidsoap to do simultaneous encoding to pretty much any current format (Vorbis, MP3, FLAC, Opus, AAC), and clever things like failover to a standby feed or file on silence detection. An example configuration, very close to the one I'm using: #!/usr/bin/liquidsoap # Enable telnet server for on-the fly metadata changes set("server.telnet", true) # Logging. Very useful for debugging problems. set("log.file.path", "/tmp/liquid.log") # ALSA audio source, at 48kHz sampling # Many consumer sound cards work at 48kHz natively and resample # for any other rate. set("frame.audio.samplerate", 48000) source = mksafe(input.alsa()) # Allow telnet server to override metadata source = server.insert_metadata(id="ID", source) # Metadata used when silence detected def fault_meta(m) [ ("title", "There is a fault"), ("artist", "My Radio") ] end # Add metadata to emergency stream. # The file can be any supported type. emergency= map_metadata( fault_meta, mksafe(single("/srv/audio/birdsong.opus")) ) # Detect 30 seconds of silence on ALSA source source = strip_blank( max_blank=30.0, threshold=-60.0, source ) # Switch over to emergency stream on silence, and switch back automatically source = fallback(track_sensitive=false, [source, emergency]) # Icecast server common parameters ice_host = "127.0.0.1" ice_port = 8000 ice_pass = "hunter2" station = "My Radio" # A FLAC feed output.icecast( %ogg(%flac(samplerate=48000, compression=5)), host = ice_host, port = ice_port, password = ice_pass, mount = "radio.flac", name = "My Radio FLAC", description = station, url="", encoding="UTF-8", source ) # An Ogg Vorbis feed output.icecast( %ogg(%vorbis(quality=0.0, samplerate=48000)), host = ice_host, port = ice_port, password = ice_pass, mount = "radio.ogg", name = "My Radio Vorbis", description = station, url="", encoding="UTF-8", source ) # An Opus feed # Be aware that Opus always uses 48kHz sampling internally. output.icecast( %ogg(%opus(bitrate=128, samplerate=48000, application="audio", complexity=5)), host = ice_host, port = ice_port, password = ice_pass, mount = "radio.opus", name = "My Radio Opus", description = station, url="", encoding="UTF-8", source ) # An MP3 feed output.icecast( %mp3(bitrate=128, samplerate=48000), host = ice_host, port = ice_port, password = ice_pass, mount = "radio.mp3", name = "My Radio MP3", icy_metadata = "true", description = station, url="", encoding="UTF-8", source ) -- Paul Martin <pm at nowster.me.uk>
Hi Pete, El jue, 28-11-2019 a las 09:51 -0500, Rondejavu escribió:> I am starting IceCast first. The log indicates that everything is > working. Maybe I need to change something in my HTML code? > > audio controls > Source src=“ipaddress:port/stream” > /audio > > -Pete >Not change your HTML code, in fact, it is already working ok. You must solve the problem on the source side. As Paul said, try some audio format supported by Ices2, such as ogg, opus ... The log of *Ices2* should be similar to: [2019-11-24 23:04:10] INFO ices-core/main IceS 2.0.2 started... [2019-11-24 23:04:10] INFO input-alsa/alsa_open_module Opened audio device default [2019-11-24 23:04:10] INFO input-alsa/alsa_open_module using 2 channel(s), 44100 Hz, buffer 341 ms [2019-11-24 23:04:10] INFO input-alsa/alsa_open_module Starting metadata update thread [2019-11-24 23:04:10] INFO signals/signal_usr1_handler Metadata update requested [2019-11-24 23:04:10] DBUG metadata/metadata_thread_signal reading metadata from "/etc/ices2/metadata" [2019-11-24 23:04:10] INFO encode/encode_initialise Encoder initialising in VBR mode: 2 channel(s), 44100 Hz, quality [2019-11-24 23:04:11] INFO metadata/metadata_thread_signal tag 1 is TITLE[2019-11-24 23:04:11] INFO metadata/metadata_thread_signal tag 2 is ARTIST[2019-11-24 23:04:11] INFO metadata/metadata_thread_signal tag 3 is ALBUM[2019-11-24 23:04:11] INFO metadata/metadata_thread_signal tag 4 is CONTACT[2019-11-24 23:04:11] INFO metadata/metadata_thread_signal Updating metadata [2019-11-24 23:04:11] INFO stream/ices_instance_stream Connected to server: localhost:6666/entzun.opus [2019-11-24 23:04:11] DBUG encode/encode_clear Clearing encoder engine [2019-11-24 23:04:11] INFO encode/encode_initialise Encoder initialising in VBR mode: 2 channel(s), 44100 Hz, quality Best regards. José Luis> > On Nov 27, 2019, at 7:08 PM, Jos� Luis Artuch <artuch at speedy.com.ar > > > wrote: > > > > Hi Rondejavu, > > > El mié, 27-11-2019 a las 15:57 -0500, Rondejavu escribió: > > > I’ve successfully implemented IceCast on a Raspberry Pi and can > > > access the stream ONLY if I use an ffmpeg statement to start the > > > stream. Unfortunately, the stream is choppy and the sound quality > > > is > > > poor. I’ve tried using ICES, but I don’t get any sound. > > > > > > Terminal command that works: > > > ffmpeg -ac 2 -f alsa -i hw:0,0 -acodec mp3 -ab 48k -ac 2 > > > -content_type audio/mpeg -f mp3 > > > icecast://source:password at ipaddress:port/stream > > > > > > ICES terminal command that doesn’t work: > > > ices2 /home/pi/ices-2.0.2/conf/ices-alsa.xml > > > > > > What am I missing? Thanks for any help/suggestions. > > Take a look at the logs, at ices-alsa.xml and also start Icecast2 > > firstly. > > Regards. > > José Luis > > > _______________________________________________ > > > Icecast mailing list > > > Icecast at xiph.org > > > http://lists.xiph.org/mailman/listinfo/icecast