rwfitzy
rwfitzy

Reputation: 423

Icecast intro file

Running Icecast 2.4.99.2 on Ubuntu 16.04 just file and would like to add an intro file. With a working source mounted from Darkice default audio card input, when I add the <intro> tag to the Icecast configuration file for the mount, it plays but nothing follows.

<mount>
        <mount-name>/archive</mount-name>
        <max-listeners>5</max-listeners>
        <fallback-mount>/high_quality.mp3</fallback-mount>
        <intro>/high_quality.mp3</intro>
        <fallback-override>1</fallback-override>
        <hidden>0</hidden>
</mount>

File permissions for mp3 file:

user@stream:~/StationIDs$ sudo ls -lah /usr/share/icecast2/web/high_quality.mp3
-rwxr--r-- 1 root root 138K Nov 14 17:20 /usr/share/icecast2/web/high_quality.mp3

I have read the format needs to match, so I have darckice.cfg using 128kps bitrate using lame to encode from wav format.

user@stream:~/StationIDs$ mediainfo high_quality.mp3
General
Complete name                            : high_quality.mp3
Format                                   : MPEG Audio
File size                                : 138 KiB
Duration                                 : 8s 777ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 128 Kbps
Writing library                          : LAME3.99r

Audio
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Duration                                 : 8s 803ms
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 137 KiB (100%)
Writing library                          : LAME3.99r
Encoding settings                        : -m m -V 4 -q 3 -lowpass 20.5 -b 128

And from darkice.cfg...

[icecast2-1]
format          = mp3
bitrateMode     = cbr
bitrate         = 128
quality         = 0.9
server          = localhost
mountPoint      = archive
port            = 8000
password        = changeme
name            = Archiver Stream
description     = Dedicated archiving stream
url             = archive
genre           = Eclectic
public          = no

With this config, the intro file plays okay with nothing else and the source stream plays without an intro file. Have a missed something?

Upvotes: 4

Views: 1739

Answers (1)

rwfitzy
rwfitzy

Reputation: 423

Well, of course, I answered my own question after writing this and resolved. I spotted the 1 channel in the file format. I had to use sox to convert the original wav file to 2 channel, then use lame again to convert to mp3...

user@stream:~/StationIDs$ sox high_quality.wav -c 2 high_quality-2.wav
user@stream:~/StationIDs$ lame -b 128 -F high_quality-2.wav high_quality.mp3

Upvotes: 5

Related Questions