ОсновноеRadiotalkПользовательское
Общие вопросы по интернет радио вещанию
6   •   Посмотреть все темы

Помогите установить IceCast2

 

21
val @val
Используемая система: Sent OS

1) Скачал **********
2) Установил rpm -ivv icecast-2.3.2-0.src.rpm.
3) Получил на выходе два пути, куда скопировались файлы
- /usr/src/redhat/SOURCES/
- /usr/src/redhat/SPECS/
В папке SOURCES/ нашел icecast-2.3.2.tar.gz. Распаковал его, зашел в папку icecast-2.3.2. Выполнил ./configure

./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking for unistd.h... (cached) yes
checking for __func__... yes
checking for localtime_r... yes
checking for poll... yes
checking for library containing nanosleep... none required
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for socklen_t... yes
checking for va_copy... va_copy
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking for library containing sethostent... none required
checking for library containing getnameinfo... none required
checking for endhostent... yes
checking for getaddrinfo... yes
checking for inet_aton... yes
checking for writev... yes
checking for struct sockaddr_storage.ss_family... yes
checking for inet_pton... yes
checking for xslt-config... no
configure: error: XSLT configuration could not be found

Я так понял не хватает XSLT configuration. Подскажите что делать дальше?

1400
Pheoru @Pheoru
На сайте icecast.org есть список нужных для установки библиотек. Вот их и устанавливайте.

21
val @val
проблема в том, что XSLT убран из 5 версии php и php надо компилировать с какой-то опцией хитрой. А я купил сервер уже с настроенным php. Вот и хотелось бы узнать, сталкивался ли кто нить с подобными проблемами. Возможно ли установить эту библиотеку или аналог ее без перекомпеляции php?

1400
Pheoru @Pheoru
XSLT - это отдельная библиотека, которая к php не относится (по крайней мере в данном случае).
********** - вот здесь все, что Вам нужно поставить.

21
val @val
Большое спасибо за ссылку.
Все, сервер запущен!

2605
Александр @AlexIT
Вот на будущее очень хороший мануальчик:
**********

21
val @val
Спасибо, как раз по этому мануальчику и настраивался.

Ну и чтобы не заводить другую тему, спрошу о таком вопросе:

Это кусок кода из конфига icecast:
...
<mount-name>/listen.pls</mount-name>
...
<fallback-mount>/rezerv</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>0</fallback-when-full>
<public>1</public>

Правильно ли я понял из описания. Что при отключении диДжея от основного потока /listen.pls, всех перекинет на резервный поток /rezerv а при подключении ДиДжея обратно, к основному потоку, всех слушателей перекинет на основной?

И такой момент еще, чтобы не было отключения мне придется транслировать другое радио на /rezerv ?

P.S> Просто сейчас используется SHOUTCast server и у всех слушателей стоит ссылка .../listen.pls Я поставил IceCast 2 и хочу незаметно для слушателей поменять сервер.

2605
Александр @AlexIT
Вы поняли правильно.

21
val @val
Спасибо большое все настроил.
Но вот столкнулся с такой проблемой.

Подскажите пожалуйста, как запустить на 1 машине 2 сервера IceCast? Если можно пример запуска.
Уже все настроил, но споткнулся на вещании с разным качеством через streamTranscoder
не хотят 2 маунта в одном конфиге работать, т.е. один другого транслировать в новый маунт.

1400
Pheoru @Pheoru
Просто два раза запускаете с разными конфигами.
Например:
icecast -b -c /etc/icecast.xml
icecast -b -c /etc/icecast2.xml

Хотя, по-моему, Вы стримтранскодер просто неправильно настроили.
Выложите конфиг, посмотрим.

21
val @val
Я пробовал так запускать, вот что он пишет
по этому вам и написал, версия icecast последняя

Starting icecast2
Detaching from the console
Server startup failed. Exiting

Выкладываю конфиги, может быть другую схему посоветуете

icecast.xml
<icecast>
<limits>
<clients>500</clients>
<sources>2</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<!-- If enabled, this will provide a burst of data when a client
first connects, thereby significantly reducing the startup
time for listeners that do substantial buffering. However,
it also significantly increases latency between the source
client and listening client. For low-latency setups, you
might want to disable this. -->
<burst-on-connect>1</burst-on-connect>
<!-- same as burst-on-connect, but this allows for being more
specific on how much to burst. Most people won't need to
change from the default 64k. Applies to all mountpoints -->
<burst-size>65535</burst-size>
</limits>

<authentication>
<!-- Sources log in with username 'source' -->
<source-password>ххх</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>ххх</relay-password>

<!-- Admin logs in with the username given below -->
<admin-user>val</admin-user>
<admin-password>xxx</admin-password>
</authentication>

<!-- set the mountpoint for a shoutcast source to use, the default if not
specified is /stream but you can change it here if an alternative is
wanted or an extension is required
<shoutcast-mount>/live.nsv</shoutcast-mount>
-->

<!-- Uncomment this if you want directory listings -->

<directory>
<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
</directory>


<!-- This is the hostname other people will use to connect to your server.
It affects mainly the urls generated by Icecast for playlists and yp
listings. -->
<hostname>xxx</hostname>

<!-- You may have multiple <listener> elements -->
<listen-socket>
<port>8012</port>
<!-- <bind-address>127.0.0.1</bind-address> -->
<!-- <shoutcast-mount>/stream</shoutcast-mount> -->
</listen-socket>
<!--
<listen-socket>
<port>8001</port>
</listen-socket>
-->

<!--<master-server>127.0.0.1</master-server>-->
<!--<master-server-port>8001</master-server-port>-->
<!--<master-update-interval>120</master-update-interval>-->
<!--<master-password>hackme</master-password>-->

<!-- setting this makes all relays on-demand unless overridden, this is
useful for master relays which do not have <relay> definitions here.
The default is 0 -->
<!--<relays-on-demand>1</relays-on-demand>-->

<mount>
<mount-name>/listen</mount-name>
<charset>cp-1251</charset>
<max-listeners>1000</max-listeners>
<!-- <dump-file>/tmp/dump-example1.ogg</dump-file> -->
<burst-size>65536</burst-size>
<stream-name>Non-stop music</stream-name>
<stream-description>The Best Of Reality FM!</stream-description>
<fallback-mount>/rezerv</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>0</fallback-when-full>
<hidden>0</hidden>
<public>1</public>
</mount>
<mount>
<mount-name>/rezerv</mount-name>
<charset>cp-1251</charset>
<max-listeners>1000</max-listeners>
<!-- <dump-file>/tmp/dump-example1.ogg</dump-file> -->
<burst-size>65536</burst-size>
<stream-description>The Best Of Reality FM!</stream-description>
<stream-name>Non-stop music ICQ 4190075</stream-name>
<hidden>1</hidden>
</mount>

<relay>
<server>scfire-mtc-aa03.stream.aol.com</server>
<port>80</port>
<mount>/stream/1024</mount>
<local-mount>/rezerv</local-mount>
<on-demand>1</on-demand>
<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>

<relay>
<server>xxx</server>
<port>8020</port>
<mount>/</mount>
<local-mount>/listen</local-mount>
<on-demand>1</on-demand>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>

<fileserve>1</fileserve>

<paths>
<!-- basedir is only used if chroot is enabled -->
<basedir>/home/icecast</basedir>

<!-- Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root -->
<logdir>/home/icecast/logs</logdir>
<webroot>/home/icecast/web</webroot>
<adminroot>/home/icecast/admin</adminroot>
<pidfile>/home/icecast/icecast.pid</pidfile>

<!-- Aliases: treat requests for 'source' path as being for 'dest' path
May be made specific to a port or bound address using the "port"
and "bind-address" attributes.
-->

<!-- <alias source="/" dest="/status.xsl"/> -->

<!-- Aliases: can also be used for simple redirections as well,
this example will redirect all requests for ********** to
the status page
-->
<alias source="/" dest="/status.xsl"/>
</paths>

<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<!-- <playlistlog>playlist.log</playlistlog> -->
<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
<!-- If logarchive is enabled (1), then when logsize is reached
the logfile will be moved to [error|access|playlist].log.DATESTAMP,
otherwise it will be moved to [error|access|playlist].log.old.
Default is non-archive mode (i.e. overwrite)
-->
<!-- <logarchive>1</logarchive> -->
</logging>

<security>
<chroot>0</chroot>
<changeowner>
<user>icecast</user>
<group>icecast</group>
</changeowner>
</security>
</icecast>

и конфиг streamTranscodera myconfig.cfg

#
#The source URL for the broadcast. It must be in the form ********** For those servers without a mountpoint (Shoutcast) use ********** To record from line in, use 'linein' for this entry
#
SourceURL=http://x.x.x.x:80x0/

#
#The server to which the stream is sent. It can be a hostname or IP (example: www.stream.com, 192.168.1.100)
#
Server=x.x.x.x

#
#The port to which the stream is sent. Must be a number (example: 8000)
#
Port=80xx

#
#This is the encoder password for the destination server (example: hackme)
#
ServerPassword=xxxxxxx

#
#This setting tells the destination server to list on any available YP listings. Not all servers support this (Shoutcast does, Icecast2 doesn't) (example: 1 for YES, 0 for NO)
#
ServerPublic=1

#
#This is used in the YP listing, I think only Shoutcast supports this (example: #mystream)
#
ServerIRC=N/A

#
#This is used in the YP listing, I think only Shoutcast supports this (example: myAIMaccount)
#
ServerAIM=N/A

#
#This is used in the YP listing, I think only Shoutcast supports this (example: 332123132)
#
ServerICQ=xxxxx

#
#The URL that is associated with your stream. (example: **********
#
ServerStreamURL=xxx

#
#A short description of the stream (example: Stream House on Fire!)
#
ServerDescription=xxx

#
#Genre of music, can be anything you want... (example: Rock)
#
ServerGenre=xxx

#
#Used for Icecast/Icecast2 servers, The mountpoint must end in .ogg for Vorbis streams and have NO extention for MP3 streams. If you are sending to a Shoutcast server, this MUST be blank. (example: /mp3, /myvorbis.ogg)
#
ServerMountpoint=/xxx

#
#Wether or not oddcast will reconnect if it is disconnected from the destination server (example: 1 for YES, 0 for NO)
#
AutomaticReconnect=1

#
#How long it will wait (in seconds) between reconnect attempts. (example: 10)
#
AutomaticReconnectSecs=10

#
#What format to encode to. Valid values are (OGG, LAME) (example: OGG, LAME)
#
Encode=LAME

#
#The port used for WMA stream (example: 8200)
#
WMAPort=8200

#
#Number of clients to support WMA encoding. (example: 1, 10)
#
WMAClients=5

#
#Number of clients to support WMA encoding. (example: 1, 10)
#
WMAMode=Stereo

#
#Bitrate. This is the mean bitrate if using VBR.
#
BitrateNominal=64

#
#Minimum Bitrate. Used only if using Bitrate Management (not recommended) or LAME VBR(example: 64, 128)
#
BitrateMin=48

#
#Maximum Bitrate. Used only if using Bitrate Management (not recommended) or LAME VBR (example: 64, 128)
#
BitrateMax=64

#
#Number of channels. Valid values are (1, 2). 1 means Mono, 2 means Stereo (example: 2,1)
#
NumberChannels=2

#
#Vorbis Quality Level. Valid values are between -1 (lowest quality) and 10 (highest). The lower the quality the lower the output bitrate. (example: -1, 3)
#
OggQuality=8

#
#Sample rate for the stream. Valid values depend on wether using lame or vorbis. Vorbis supports odd samplerates such as 32kHz and 48kHz, but lame appears to not.feel free to experiment (example: 44100, 22050, 11025)
#
Samplerate=44100

#
#This flag specifies if you want Vorbis Quality or Bitrate Management. Quality is always recommended. Valid values are (Bitrate, Quality). (example: Quality, Bitrate Management)
#
OggBitrateQualityFlag=Quality

#
#This LAME flag indicates that CBR encoding is desired. If this flag is set then LAME with use CBR, if not set then it will use VBR (and you must then specify a VBR mode). Valid values are (1 for SET, 0 for NOT SET) (example: 1)
#
LameCBRFlag=1

#
#A number between 1 and 10 which indicates the desired quality level of the stream. The higher the number, the higher the quality. Also, the higher the number, the higher the CPU utilization. So for slower CPUs, try a low quality number (example: 5)
#
LameQuality=8

#
#Copywrite flag. Not used for much. Valid values (1 for YES, 0 for NO)
#
LameCopywrite=0

#
#Original flag. Not used for much. Valid values (1 for YES, 0 for NO)
#
LameOriginal=0

#
#Strict ISO flag. Not used for much. Valid values (1 for YES, 0 for NO)
#
LameStrictISO=0

#
#Disable Reservior flag. Not used for much. Valid values (1 for YES, 0 for NO)
#
LameDisableReservior=0

#
#This specifies the type of VBR encoding LAME will perform if VBR encoding is set (CBRFlag is NOT SET). See the LAME documention for more on what these mean. Valid values are (vbr_rh, vbr_mt, vbr_mtrh, vbr_abr)
#
LameVBRMode=vbr_abr

#
#Use LAMEs lowpass filter. If you set this to 0, then no filtering is done.
#
LameLowpassfreq=0

#
#Use LAMEs highpass filter. If you set this to 0, then no filtering is done.
#
LameHighpassfreq=0

#
#The destination server type. You must set this correctly otherwise you will get problems connecting the encoder. Please make sure you are using the correct one. Valid values are (Shoutcast, Icecast, Icecast2) (example: Icecast2)
#
ServerType=Icecast2

#
#If recording from linein, what device to use (not needed for win32) (example: /dev/dsp)
#
AdvRecDevice=/dev/dsp

#
#If recording from linein, what sample rate to open the device with. (example: 44100, 48000)
#
LiveInSamplerate=44100

#
#Used for any window positions (X value)
#
lastX=0

#
#Used for any window positions (Y value)
#
lastY=0

#
#Used for plugins that show the VU meter
#
showVU=0

#
#Flag which indicates we are recording from line in
#
LineInFlag=0

#
#Locked Metadata
#
LockMetadata=

#
#Flag which indicates if we are using locked metadata
#
LockMetadataFlag=0

#
#Save directory for archive streams
#
SaveDirectory=

#
#Flag which indicates if we are saving archives
#
SaveDirectoryFlag=0

#
#Log Level 1 = LOG_ERROR, 2 = LOG_ERROR+LOG_WARNING, 3 = LOG_ERROR+LOG_WARNING+LOG_DEBUG
#
LogLevel=1

#
#Log File
#
LogFile=oddcastv2.log

#
#Save Archives in WAV format
#
SaveAsWAV=0

#
#AAC Quality Level. Valid values are between 10 (lowest quality) and 500 (highest).
#
AACQuality=400

#
#AAC Cutoff Frequency.
#
AACCutoff=44100

1400
Pheoru @Pheoru
Я же говорю, что неправильно настроили.
Все параметры, касающиеся AAC, WMP, VBR, сигналов с Line-In и прочее - убрать.

21
val @val
Спасибо, конфиг подправил, но и так все работало со СтреамТранскодером.
Загвоздка была в том, что 2 копия айс-каста не запускалась.
Оказывается, это было из-за того, что я под одним PID пытался запустить 2 процесса.

Теперь другая проблема, СтреамТранскодер иногда завершает свою работу.

У меня система такая:
- первый сервер IceCast для подключения ДиДжеев и у него есть точка fallback - которая транслирует звук
- второй сервер ICE Cast транслирует первый и к этому же серверу привязан СтреамТранскодер, который берет поток со второго и перекодируя, делает точку /listen.ogg

СтреамТранскодер отрубается, видимо при смене ДиДжея. Пробовал запускать его кроном, так он запускает его несколько процессов подряд ((

Вот я теперь не знаю что делать, либо пробовать запускать каждую минуту проверочный скрипт, мол есть процесс или нет и если нет то запускать новый (но это тоже неудачный вариант потому как скрипт может пропустить момент, когда отрубается СтреамТранскодер и всех выкинет)

Либо есть какие-то настройки в конфиге или в особенности запуска, которые я не знаю.
Посоветуйте пожалуйста, как лучше поступить?

21
val @val
И еще момент заметил, когда ДиДжеи меняються, информация почему-то остается от старого диДжея на индексной странице. Хотя названия песен меняются.