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

Icecast2 and sc_trans 2.5 вещание на нескольких потоках.

 

81
MonoLog @MonoLog
Я не могу понять почему у меня формат aac идёт на оба порта , а mp3 никуда. Настройки такие.

sc_trans:


;; VU Images
;vuimagedirectory=C:\Documents and Settings\nradisch\My Documents\programming\shoutcast\current\sc_trans\vuimages\

;; ENCODER OPTIONS 0
encoder_0=aacp
bitrate_0=64000
samplerate_0=44100
channels_0=2

;; ENCODER OPTIONS 1
encoder_1=mp3
bitrate_1=128000
samplerate_1=44100
channels_1=2

;;; NETWORK OPTIONS 0
outprotocol_0=1
serverip_0=fm.asterios.tm
serverport_0=8700
password_0=******

;;; NETWORK OPTIONS 1
outprotocol_1=1
serverip_1=fm.asterios.tm
serverport_1=9000
password_1=******

;;;; LOGGING OPTIONS:
;where does the log file go
logfile=/root/radio/sc/sc_trans.log
; 1 to do screen logging else 0
screenlog=1

;;;;;; METADATA CONTROL
; my stream name
streamtitle=Radio Asterios
; url related to my stream
streamurl=http://radio.asterios.tm
; my genre
genre=game
; other assorted stuff
;aim=myaimaddr
;irc=myirc
;icq=myicq
; register with yp
public=1

;;;; PLAYLIST CONTROL
; your playlist
playlistfile=/root/radio/playlist.txt
; by default we shuffle the playlist. Lets turn that off
shuffle = 1
; set our crossfade time to 2 seconds. zero means no xfade
xfade=2
; file must be at least 20 seconds or we don't crossfade
xfadethreshold=20
; drop folder for priority playlists
playlists=/root/radio/non/
; where finished priority playlists get copied
;archive=/root/radio/sc/archive

;;; LIVE CAPTURE:
; don't capture
capture=0
; set capture parameters
;capturedevice=Sound Blaster
;captureinput=Line-In
;capturesamplerate=44100
;capturechannels=2

calendarfile=/root/radio/sc/calendar.xml
calendarrewrite=0

;;;; DJ SUPPORT:
; dj listen port
djport=8900
; dj password
djlogin=оо
djpassword=****
djpriority=1
djcapture=0
; idle time until auto-dump
autodumpsourcetime=30
; record dj broadcasts here
;djbroadcasts=c:\sc_trans\recorded\


;; REPLAY GAIN CONTROL:
applyreplaygain=0
calculatereplaygain=0

;;; OTHER:
adminport=5555
adminuser=admin
adminpassword=448355


icecast2:

<icecast>
<limits>
<clients>700</clients>
<sources>2</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>10</client-timeout>
<header-timeout>10</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>20535</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>oo</admin-user>
<admin-password>*******</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>//Asterios</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>fm.asterios.tm</hostname>

<!-- You may have multiple <listener> elements -->
<!-- <bind-address>fm.asterios.tm</bind-address> -->
<listen-socket>
<port>8700</port>
<shoutcast-mount>/128</shoutcast-mount>
</listen-socket>

<listen-socket>
<port>8701</port>
<shoutcast-compat>1</shoutcast-compat>
</listen-socket>

<listen-socket>
<port>9000</port>.
<shoutcast-mount>/64</shoutcast-mount>
</listen-socket>

<listen-socket>
<port>9001</port>
<shoutcast-compat>1</shoutcast-compat>
</listen-socket>
-->

<!--<master-server></master-server>-->
<!--<master-server-port></master-server-port>-->
<!--<master-update-interval></master-update-interval>-->
<!--<master-password></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>-->

<!--
<relay>
<server>fm.asterios.tm</server>
<port>8700</port>
<mount>/64</mount>
<local-mount>/64</local-mount>
<on-demand>0</on-demand>

<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
-->

<!-- Only define a <mount> section if you want to use advanced options,
like alternative usernames or passwords
<mount>
<mount-name>/example-complex.ogg</mount-name>

<username>othersource</username>
<password>hackmemore</password>

<max-listeners>1</max-listeners>
<dump-file>/tmp/dump-example1.ogg</dump-file>
<burst-size>65536</burst-size>
<fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<intro>/example_intro.ogg</intro>
<hidden>1</hidden>
<no-yp>1</no-yp>
<authentication type="htpasswd">
<option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="0"/>
</authentication>
<on-connect>/home/icecast/bin/stream-start</on-connect>
<on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
</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>

<!-- 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> -->

<!-- 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="/foo" dest="/bar"/>
-->
<!-- 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>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>1000</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>root</user>
<group>nogroup</group>
</changeowner>
-->
</security>
</icecast>

Отредактировано MonoLog - 14.09.2010
81
MonoLog @MonoLog
При запуске транса выдаёт следующее
2010-09-13 19:07:37Imsg:[shoutcastmetadata] Sending metadata
2010-09-13 19:07:39Imsg:[shoutcastmetadata] Sending metadata
2010-09-13 19:07:45Imsg:[STREAM] 1687040899 Creating stream socket
2010-09-13 19:07:45Imsg:[STREAM] 1687040899 Resolving stream host
2010-09-13 19:07:45Imsg:[STREAM] 1687040899 Connected to host server
2010-09-13 19:07:45Imsg:[STREAM] 1687040899 Host server gave success (OK2)
2010-09-13 19:07:45Imsg:[STREAM] 1687040899 Stream to fm.asterios.tm established
2010-09-13 19:07:45Imsg:[STREAM] 1687040899 Sending stream information
2010-09-13 19:07:46Wmsg:[STREAM] 1687040899 Disconnecting from stream host [waiting 10s]

6245
Тарас @tarasian666
полный лог в студию

Добавлено спустя 2 минуты 4 секунды:
<listen-socket>
        <port>9001</port>
        <shoutcast-compat>1</shoutcast-compat>
    </listen-socket>
    -->

убери -->
после изменений конфига айс перезапускал?

6245
Тарас @tarasian666
MonoLog пишет:

<listen-socket>
     <port>9000</port>.
     <shoutcast-mount>/64</shoutcast-mount>
    </listen-socket>

убери "." после </port>

81
MonoLog @MonoLog
Убрал. По прежнему аас на оба патока даёт. Полные логи транса:

fm:/etc/init.d# ./sc_trans ./sc_trans.conf
2010-09-14 10:34:20Imsg:<***>Logger startup
2010-09-14 10:34:20Imsg:<***>version 0.2.0.0 build 0.0.25.0
2010-09-14 10:34:20Dmsg:<***>
2010-09-14 10:34:20Imsg:[calendarMgr] Adding DJ event m_djName=atata m_archive=0 m_id=1 m_sta
rtDate=year:0,mon:0,mday:0,hour:0,min:0,sec:0,isdst:0,wday:0,yday:0 m_endDate=year:0,mon:0,mday:0,hour:0,min:
0,sec:0,isdst:0,wday:0,yday:0 m_duration=0 m_timeOffset=year:1432317541,mon:-175104560,mday:-175104572,hour:-
175104584,min:-175104596,sec:-175104608,isdst:1432317541,wday:1414868563,yday:3681606 m_hasStartDate=0 m_hasE
ndDate=0 m_hasDuration=0 m_hasTimeOffset=0 m_repeat=0
2010-09-14 10:34:20Imsg:[VUPush] 0 VU images loaded
2010-09-14 10:34:20Imsg:[VUPush] 0 VU images loaded
2010-09-14 10:34:20Imsg:[playlistMgr] playlist load from file /root/radio/playlist.txt
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/gnarls_barkley-crazy_[dab
est.ru].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/blue_affair_&_sasha_dith_
ft._carlprit-РЇ_odna_[dabest.ru].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/ronald_jenkees-disorganiz
ed_fun_[dabest.ru].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/prodigy-voodoo_people_[da
best.ru].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/birdman_lil_wayne_rick_ro
ss_t-pain-know_what_im_[dabest.ru].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/ЦЕНТР_&_cj_mozart-Л
egko_li_byt_molodym_(drum_and_bass_remix)_[dabest.ru].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/03-Alter Mann [Special Ve
rsion].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/03-Rammstein In The House
[Timewriter RMX].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/fort_minorremember_[_mp3e
x.net].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/outcast-ms._jackson_[dabe
st.ru].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/akon_feat_nasri__click_cl
ick_clup_new_2oo9mp3._[mp3ex.net].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/Рљino-Р“ruppa_krovi_[dabe
st.ru].mp3 generated no entries
2010-09-14 10:34:20Wmsg:[playlistMgr]The playlist entry /root/radio/non/drowning_pool-bodies_[dab
est.ru].mp3 generated no entries
2010-09-14 10:34:20Imsg:[playlistMgr] Caching playlist /root/radio/playlist.txt
2010-09-14 10:34:20Imsg:[MAIN] broadcast thread 0 starting
2010-09-14 10:34:20Imsg:[STREAM] 1521847084 giving replay gain calculator a head start
2010-09-14 10:34:20Imsg:[resampler] deactivated 44100/2 == 44100/2
2010-09-14 10:34:20Imsg:[MAIN] Encoder thread 1 starting
2010-09-14 10:34:20Imsg:[MAIN] broadcast thread 1 starting
2010-09-14 10:34:20Imsg:[mp3enc] 833554435/44100/2/128000 Fraunhofer IIS MP3s Encoder V04.01.00 (
build 2007-03-15)
2010-09-14 10:34:20Imsg:[STREAM] 623507183 giving replay gain calculator a head start
2010-09-14 10:34:20Imsg:[MAIN] Playlist decoder thread starting
2010-09-14 10:34:20Imsg:[rgCalc] thread running
2010-09-14 10:34:20Imsg:Using internal encoder sample rate of 44100 Hz, bandwidth 15804 Hz, MDCT
low pass active

2010-09-14 10:34:20Imsg:[microServer] Listening for connection on port 8901
2010-09-14 10:34:20Imsg:[STREAM] 1521847084 running
2010-09-14 10:34:20Imsg:[STREAM] 1521847084 Creating stream socket
2010-09-14 10:34:20Imsg:[STREAM] 623507183 running
2010-09-14 10:34:20Imsg:[decode] giving replay gain calculator a head start
2010-09-14 10:34:20Imsg:[decode] begin decoding
2010-09-14 10:34:20Imsg:[STREAM] 1521847084 Resolving stream host
2010-09-14 10:34:20Imsg:[MAIN] Broadcast Receiver thread starting
2010-09-14 10:34:20Imsg:[STREAM] 623507183 Creating stream socket
2010-09-14 10:34:20Imsg:[STREAM] 623507183 Resolving stream host
2010-09-14 10:34:20Imsg:[STREAM] 1521847084 Connected to host server
2010-09-14 10:34:20Imsg:[STREAM] 623507183 Connected to host server
2010-09-14 10:34:20Imsg:[mp3enc] 833554435/44100/2/128000 mp3 setup complete
2010-09-14 10:34:20Imsg:[decode] next file is /root/radio/non/12.Eurythmics - Sweet Dreams 2009 (
Patto remix).mp3
2010-09-14 10:34:20Imsg:[AAC] encoder config: sample rate=44100 channelMode=Stereo sbrMode=Normal
bitRate=64000 signalType=Default
2010-09-14 10:34:20Imsg:[AAC] aac setup complete
2010-09-14 10:34:20Imsg:[STREAM] 623507183 Host server gave success (OK2)
2010-09-14 10:34:20Imsg:[STREAM] 623507183 Stream to fm.asterios.tm established
2010-09-14 10:34:20Imsg:[STREAM] 1521847084 Host server gave success (OK2)
2010-09-14 10:34:20Imsg:[STREAM] 1521847084 Stream to fm.asterios.tm established
2010-09-14 10:34:20Imsg:[STREAM] 623507183 Sending stream information
2010-09-14 10:34:20Imsg:[STREAM] 1521847084 Sending stream information
2010-09-14 10:34:20Imsg:[ID3V2] version 3.0 tagsize=4086 unsync=0 xheader=0
2010-09-14 10:34:20Imsg:[decode] 12.Eurythmics - Sweet Dreams 2009 (Patto remix).mp3::9165766::45
8.288
2010-09-14 10:34:21Wmsg:[STREAM] 623507183 Disconnecting from stream host [waiting 10s]
2010-09-14 10:34:22Imsg:[shoutcastmetadata] Sending metadata
2010-09-14 10:34:24Imsg:[shoutcastmetadata] Sending metadata
2010-09-14 10:34:24Imsg:[djmgr] No DJ currently active. Run permission granted for atata
2010-09-14 10:34:24Imsg:[broadcastStallManager] timed content set to TRUE
2010-09-14 10:34:24Imsg:[djProtocolShoutcast] Connected
2010-09-14 10:34:31Imsg:[STREAM] 623507183 Creating stream socket
2010-09-14 10:34:31Imsg:[STREAM] 623507183 Resolving stream host
2010-09-14 10:34:31Imsg:[STREAM] 623507183 Connected to host server
2010-09-14 10:34:31Imsg:[STREAM] 623507183 Host server gave success (OK2)
2010-09-14 10:34:31Imsg:[STREAM] 623507183 Stream to fm.asterios.tm established
2010-09-14 10:34:31Imsg:[STREAM] 623507183 Sending stream information
2010-09-14 10:34:32Wmsg:[STREAM] 623507183 Disconnecting from stream host [waiting 10s]

Как я понимаю тут проблема где то в настройках транса , потому что он шлёт только или аас если его поставить первым на оба потока , либо мп3 если же он первый.
З.Ы. Естественно айс рестартую после каждых изменений его конфига. При этом на обоих портах стоит маунт /stream , не сомтря на то что прописаны /64 и /128

Отредактировано MonoLog - 14.09.2010
6245
Тарас @tarasian666
он просто не может приконектится к айсу, проблема скорее в настройках айса

Добавлено спустя 35 секунд:
MonoLog пишет:

З.Ы. Естественно айс рестартую после каждых изменений его конфига. При этом на обоих портах стоит маунт /stream , не сомтря на то что прописаны /64 и /128

значит он не захавал конфиг, есть ошибки

81
MonoLog @MonoLog
Хм , ну я хотя бы этих ошибок не вижу. Если бы мне кто от показал свои настройки айса у кого это работает , тогда было бы легче.

81
MonoLog @MonoLog
Почитал еще раз гайд ********** , заинтересовали строчки
<fileserve>1</fileserve>
<shoutcast-mount>/live.nsv</shoutcast-mount>
в Misc Server Settings , так и не понял для чего они.

6245
Тарас @tarasian666
проблема может быть в том что порты заняты

6245
Тарас @tarasian666
только что пробовал у себя
так работает
Показать текст

81
MonoLog @MonoLog
Сейчас попробую так как ты отписал , а так заметил фишку что транс шлёт на все порты которые указаны даже так в конфигах айса
<listen-socket>
<port>8000</port>
<shoutcast-mount>/test</shoutcast-mount>
</listen-socket>
свой поток с маунтом /stream
При этом эти порты вообще не прописаны в конфигах транса.

6245
Тарас @tarasian666
тоже появлялся stream но когда в обоих портах прописал <shoutcast-mount>/128</shoutcast-mount> сразу стал маунт 128
но все ровно он только назывался по другому, потокы шли разные

81
MonoLog @MonoLog
Разобрался , спасибо большое. Теперь уже побочные вопросы. Видел темы мельком где обсуждалось как сделать так что через транс теги читались айсом , хотелось бы узнать нашли ли какой то способ и есть ли какая либо система защиты от ддос атак радио , та защита которая сейчас у нас стоит на порты она просто блокирует конекты.

6245
Тарас @tarasian666
MonoLog пишет:

Видел темы мельком где обсуждалось как сделать так что через транс теги читались айсом

в sc_trans 2.6 вроди идут нормально теги

81
MonoLog @MonoLog
У меня 1 поток мп3 ... так что 2.6 не катит.

81
MonoLog @MonoLog
А 2.5 тарнс на айс каст у меня у одного теги не шлёт? Я бы оплатил 2.6 мп3 , но чет не могу разобраться.

6245
Тарас @tarasian666
у меня 2.5 тоже теги не слал
**********