mmaxsim.ucoz.ua
Меню сайта
Категории раздела
Ubuntu [69]
Ubuntu
DLE [7]
баги. фиксы и тд
Windows [6]
eyeOS [3]
FreeBSD [5]
FreeBSD
Linux [0]
VMware ESXi [7]
Amazon kindle [0]
Debian [4]
Trimax TR-2012HD [1]
Статистика

Онлайн всего: 2
Гостей: 2
Пользователей: 0
Главная » 2013 » Февраль » 28 » Icecast2 + Darkice (ubuntu 12.04 server)
17:31
Icecast2 + Darkice (ubuntu 12.04 server)
Установка:


на локальной машине:
sudo apt-get update

sudo apt-get install icecast2

sudo apt-get install darkice

sudo apt-get install alsa alsa-tools

cp /usr/share/doc/darkice/examples/
darkice.cfg /etc/darkice.cfg

mcedit /etc/darkice.cfg

# this section describes general aspects of the live streaming session
[general]
duration        = 0        # duration of encoding, in seconds. 0 means forever
bufferSecs      = 5         # size of internal slip buffer, in seconds
reconnect       = yes       # reconnect to the server(s) if disconnected

# this section describes the audio input that will be streamed
[input]
device          = hw:0,0
#device          = /dev/snd  # OSS DSP soundcard device for the audio input
sampleRate      = 44100     # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample   = 16        # bits per sample. try 16
channel         = 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     = abr       # average bit rate
format          = mp3    # format of the stream: ogg vorbis
bitrate         = 128        # bitrate of the stream sent to the server
server          = localhost
                            # host name of the server
port            = 8000      # port of the IceCast2 server, usually 8000
password        = пароль1   # source password to the IceCast2 server
mountPoint      = Zaporizhzhya-FM  # mount point of this stream on the IceCast2 server
name            = Zaporizhzhya FM 103.7 MHz
                            # name of the stream
description     = Запоріжжя-FM
                            # description of the stream
url             = http://192.168.13.221:8000/Zaporizhzhya-FM
                            # URL related to the stream
genre           = social    # genre of the stream
public          = yes       # advertise this stream?
localDumpFile    = dump.ogg  # local dump file

чтобы узнать hw:0,0:

aplay -l

mcedit /etc/icecast2/icecast.xml
<icecast>
    <limits>
        <clients>100</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>

        <burst-on-connect>1</burst-on-connect>
      
        <burst-size>65535</burst-size>
    </limits>

    <authentication>
        <!-- Sources log in with username 'source' -->
        <source-password>пароль1</source-password>
        <!-- Relays log in username 'relay' -->
        <relay-password>пароль2</relay-password>

        <!-- Admin logs in with the username given below -->
        <admin-user>admin</admin-user>
        <admin-password>пароль3</admin-password>
    </authentication>

    <hostname>192.168.13.221</hostname>

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

    <paths>
        <!-- basedir is only used if chroot is enabled -->
        <basedir>/usr/share/icecast2</basedir>

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

       
        <alias source="/" dest="/status.xsl"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <!-- <playlistlog>playlist.log</playlistlog> -->
          <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
          <logsize>10000</logsize> <!-- Max size of a logfile -->
        <!-- <logarchive>1</logarchive> -->
    </logging>

    <security>
        <chroot>0</chroot>

    </security>
</icecast>
mcedit /etc/default/icecast2

# Defaults for icecast2 initscript
# sourced by /etc/init.d/icecast2
# installed at /etc/default/icecast2 by the maintainer scripts

#
# This is a POSIX shell fragment
#

# Full path to the server configuration file
CONFIGFILE="/etc/icecast2/icecast.xml"

# Name or ID of the user and group the daemon should run under
USERID=icecast2
GROUPID=icecast

# Edit /etc/icecast2/icecast.xml and change at least the passwords.
# Change this to true when done to enable the init.d script
ENABLE=true


mcedit /etc/online-fm.sh

#!/bin/sh
sleep 10s
service icecast2 start
sleep 5s
darkice &

cd /etc/
chmod +x online-fm.sh

mcedit /etc/rc.local
добавить перед exit 0:
/etc/online-fm.sh

настройка уровня звука и входа
alsamixer



на сервере:
sudo apt-get update

sudo apt-get install icecast2


mcedit /etc/icecast2/icecast.xml

<icecast>
    <limits>
        <clients>50</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>
       
        <burst-on-connect>1</burst-on-connect>
      
        <burst-size>65535</burst-size>
    </limits>

    <authentication>
        <!-- Sources log in with username 'source' -->
        <source-password>пароль1</source-password>
        <!-- Relays log in username 'relay' -->
        <relay-password>пароль2</relay-password>

        <!-- Admin logs in with the username given below -->
        <admin-user>admin</admin-user>
        <admin-password>пароль3</admin-password>
    </authentication>

  
    <hostname>77.121.81.200</hostname>

    <!-- You may have multiple <listener> elements -->
    <listen-socket>
        <port>8000</port>
        <bind-address>77.121.81.200</bind-address>
        <!-- <shoutcast-mount>/stream</shoutcast-mount> -->
    </listen-socket>
        <listen-socket>
        <port>8001</port>
        <bind-address>77.121.81.200</bind-address>
        <!-- <shoutcast-mount>/stream</shoutcast-mount> -->
    </listen-socket>
   
    <relay>
        <server>192.168.13.221</server>
        <port>8000</port>
        <mount>/Zaporizhzhya-FM</mount>
        <local-mount>/Zaporizhzhya-FM</local-mount>
        <on-demand>0</on-demand>

        <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
    </relay>
   
    <mount>
        <mount-name>/Zaporizhzhya-FM</mount-name>
        <max-listeners>100</max-listeners>
        <burst-size>65536</burst-size>
      
    </mount>

    <mount>
        <mount-name>/auth_example.ogg</mount-name>
        <authentication type="url">
            <option name="mount_add"       value="http://myauthserver.net/notify_mount.php"/>
            <option name="mount_remove"    value="http://myauthserver.net/notify_mount.php"/>
            <option name="listener_add"    value="http://myauthserver.net/notify_listener.php"/>
            <option name="listener_remove" value="http://myauthserver.net/notify_listener.php"/>
        </authentication>
    </mount>

    -->

    <fileserve>1</fileserve>

    <paths>
        <!-- basedir is only used if chroot is enabled -->
        <basedir>/usr/share/icecast2</basedir>

        <logdir>/var/log/icecast2</logdir>
        <webroot>/usr/share/icecast2/web</webroot>
        <adminroot>/usr/share/icecast2/admin</adminroot>

        <alias source="/" dest="/status.xsl"/>
    </paths>

    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <!-- <playlistlog>playlist.log</playlistlog> -->
          <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
          <logsize>10000</logsize> <!-- Max size of a logfile -->
        <!-- <logarchive>1</logarchive> -->
    </logging>

    <security>
        <chroot>0</chroot>
        <!--
        <changeowner>
            <user>nobody</user>
            <group>nogroup</group>
        </changeowner>
        -->
    </security>
</icecast>


mcedit /root/online-fm2.sh

#!/bin/sh
sleep 10s
service icecast2 start

cd /root/
chmod +x online-fm2.sh


mcedit /etc/rc.local
добавить перед exit 0:
/root/online-fm2.sh






Категория: Ubuntu | Просмотров: 11569 | Добавил: Maxs | Рейтинг: 0.0/0
Всего комментариев: 2
2  
здравствуйте...подскажите пожалуйста, мне нужно чтоб ретрансляция потока с звуковой карты шла сразу на Icecast и после него на серверное по Stalker Middle Ware. Пока что на самом Icecast нет потока, хотя я его подаю через звуковой кабель с телефона

1  
Our beliefs are habits of thought-- those things we think about a given subject most consistently and frequently and for the longest time-- and the associated feelings that come with those thoughts. http://www.web-500.co.uk/ - cheap mbt shoes This is why it is imperative that your marketing brings you an immediate return by selling your products an inexpensive marketing system and/or informational product which is related to network marketing. Bentley at USCIS called the accusation "false." He said drafting regulations to deal with the immigrants stranded by the AIS debacle was "a USCIS priority" though he acknowledged "we recognize it has been pending in years prior." http://www.relaxtorevive.co.uk/ - fred perry uk sale there are 4 situations when business creativity is exuded,1When determining strategy whether working in regular strategy meetings or in larger-scale off-site strategy sessions. This can be anyone from staff members to customers but it is important to realise that making safety provisions for disabled and elderly persons is vital as these will be most vulnerable in the event of an evacuation. http://www.senapasin.com/ - red wing online store The sheltered waters of their lagoons would serve the French authorities adequately for the long series of nuclear explosions that would occur before the nuclear programme ended in 1996. a federal judge in Oregon ordered a company registered there to pay $60 million for defrauding a Ukrainian government agency through sham transactions involving shell companies. http://www.apexeducation.co.uk/ - jimmy choo sale outlet How does Attack Theatre manage to create a show that feels like a romp through Kennywood with one's most adventurous and free-spirited friends? For Pittsburgh dance enthusiasts. Are you trying to find the perfect gift to make someone feel special? Have you given thought to giving a handmade gift? Why would a gift that has been handcrafted be so endearing to the receiver? http://www.mediationthatworks.co.uk/ - fred perry outlet store 501 is similar to the classic pub darts game of the same name; throw three darts at a dartboard during eight rounds of play until all 501 points - and not one point more - are cleared.

Добавлять комментарии могут только зарегистрированные пользователи.
[ Регистрация | Вход ]
Форма входа
Поиск
Календарь
«  Февраль 2013  »
ПнВтСрЧтПтСбВс
    123
45678910
11121314151617
18192021222324
25262728
Архив записей
Друзья сайта
  • Официальный блог
  • Сообщество uCoz
  • FAQ по системе
  • Инструкции для uCoz
  • Copyright MyCorp © 2017