ОсновноеRadiotalkПользовательское
Технологии вещания, софт, скрипты
3   •   Посмотреть все темы

IceCast - кракозябры вместо русских букв.

 

1
pavelepif @pavelepif
День добрый!

Проблема следующая - стоит IceCast последней версии, вещает SAM, но вместо русских букв в названиях песен - кракозябры. С латиницей проблем нет. Как поправить?

Спасибо.

2605
Александр @AlexIT
В винампе все ок будет, поверьте.
А если выводить на страницу скриптом - то кодировку тоже подправить можно.

332
Игорь @JamStyle
А как ее подправить-то?Ясное дело в айсе,а вот где именно?Алекс не подскажешь?

1400
Pheoru @Pheoru
В маунте ставим параметр <charset>cp-1251</charset>

332
Игорь @JamStyle
Оооо...спасибо огромное помогло:))))

2605
Александр @AlexIT
Это только в последней версии айскаста работает.

332
Игорь @JamStyle
Дык последняя и стоит:)

12
ramms @ramms
[quote=Nick Pheomotion]В маунте ставим параметр <charset>cp-1251</charset>[/quote]
Ребят а можно по подробнее про это?
Где этот Маунтин находиться?
И куда там конкретно вставлять?

1400
Pheoru @Pheoru
Конфигурация маунта в конфиге айскаста (прошу прощение за тафтологию) :)

12
ramms @ramms
<!-- This config file contains a minimal set of configurable parameters,
and mostly just contains the things you need to change. We created
this for those who got scared away from the rather large and heavily
commented icecast.xml.dist file. -->
<icecast>
<limits>
<sources>2</sources>
</limits>
<authentication>
<source-password>311272</source-password>
<relay-password>311272</relay-password>
<admin-user>ramms</admin-user>
<admin-password>311272</admin-password>
</authentication>

<hostname>localhost</hostname>
<listen-socket>
<port>8000</port>
</listen-socket>
<fileserve>1</fileserve>
<paths>
<logdir>./logs</logdir>
<webroot>./web</webroot>
<adminroot>./admin</adminroot>
<alias source="/" dest="/status.xsl"/>
</paths>
<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
</logging>
</icecast>


Вот конфиг айси каста маунта я там не вижу
Ну можете написать по подробнее плиз

2605
Александр @AlexIT
**********

Одна из моих любимых ссылок...

1400
Pheoru @Pheoru
Подробнее в поиске по слову mount.

12
ramms @ramms
Блин ребят, добавил я все что написанно про маунт в конфиг и ничего не могу понять как это работает
У меня радио только локальное(в инет вещания нет)
Прописал туда логин пароль а вот дальше не понял

КОД
<!-- This config file contains a minimal set of configurable parameters,
and mostly just contains the things you need to change. We created
this for those who got scared away from the rather large and heavily
commented icecast.xml.dist file. -->
<icecast>
<limits>
<clients>100</clients>
<sources>2</sources>
</limits>
<authentication>
<source-password>311272</source-password>
<relay-password>311272</relay-password>
<admin-user>ramms</admin-user>
<admin-password>311272</admin-password>
</authentication>

<hostname>localhost</hostname>
<listen-socket>
<port>8000</port>
</listen-socket>
<fileserve>1</fileserve>
<paths>
<logdir>./logs</logdir>
<webroot>./web</webroot>
<adminroot>./admin</adminroot>
<alias source="/" dest="/status.xsl"/>
</paths>

<mount>
<mount-name>/MuzFm.m3u</mount-name>
<username>ramms</username>
<password>311272</password>
<max-listeners>100</max-listeners>
<max-listener-duration>3600</max-listener-duration>

Дальше не понимаю что и за чем
<dump-file>/tmp/dump-example1.ogg</dump-file>
<intro>/intro.ogg</intro>
<fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<charset>cp-1251</charset>
<public>1</public>
<stream-name>My audio stream</stream-name>
<stream-description>My audio description</stream-description>
<stream-url>http://some.place.com</stream-url>
<genre>classical</genre>
<bitrate>64</bitrate>
<type>application/ogg</type>
<subtype>vorbis</subtype>
<hidden>1</hidden>
<burst-size>65536</burst-size>
<mp3-metadata-interval>4096</mp3-metadata-interval>
<authentication type="htpasswd">
<option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="0"/>
</authentication>
<on-connect>/home/icecast/bin/source-start</on-connect>
<on-disconnect>/home/icecast/bin/source-end</on-disconnect>
</mount>

<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
</logging>
</icecast>

1400
Pheoru @Pheoru
Зачем Вам тогда айскаст? Используйте шоуткаст, если Вам не нужно многопоточное радио.
P.S. Мы уже не раз давали объяснение к каждому параметру конфига.

12
ramms @ramms
Просто на айси каст вешь рульная вот я и хочу на ней научиться!
И хочу что бы вы мне в этом помогли
Мне нужно просто чтобы русские буквы отображались в скрипте который выводит титл на сайт
Ну помогите...
можно по аське?

2605
Александр @AlexIT
Тогда вам стоит разобраться в Вашем скрипте, а не в Айскасте.

12
ramms @ramms
<?php
///////////////////////////////////////////////////
//icecast2 status refined v1.1 xsl refined
// Author: that dude over there at casterclub.com
// Bugs: post in the forums at casterclub
//////////////////////////////////////////////////
//start the madness already
//////////////////////////////////////////////////
//start the configurations
$ip = "10.0.0.2"; //your server address in the form of mydomain.com or 192.161.1.1
$port = "8000"; //the port of your server
$ice2_station = "MuzFm"; // your station or stream name






////////////////start the parsin action\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//opening socket
$fp = fsockopen("$ip", $port, &$errno, &$errstr, 30); //open connection
if(!$fp) {
$success=2; //set if no connection



//edit html to fit your stations site, this display is for offline status
echo'<table>
<tr>
<td width="100%" colspan="2">
<img border="0" src="images/offline.gif" width="22" height="22">
<b><font face="Arial" size="2" color="#FF0000">'.$ice2_station.' is currently offline</font></b></td>
</tr>
</table>';
}




if($success!=2){ //if connection
fputs($fp,"GET /status2.xsl HTTP/1.0\r\nUser-Agent: Icecast2 XSL Parser (Mozilla Compatible)\r\n\r\n"); //get status2.xsl
while(!feof($fp)) {
$page .= fgets($fp, 1000);
}
fclose($fp); //close connection
$page = ereg_replace(".*<pre>", "", $page); //extract data
$page = ereg_replace("</pre>.*", ",", $page); //extract data

$numbers = explode(",",$page); //bomb it and extract data
$mount = $numbers[0];
$connections = $numbers[1];
$stream_n = $numbers[2];
$listeners = $numbers[3];
$desc = $numbers[4];
$cur_song = $numbers[5];
$str_url = $numbers[6];
$client_info = $numbers[7];
$test1 = $numbers[8]; //set vars that where empty and still dont know what the heck those values are ;-)
$test2 = $numbers[9]; //set vars that where empty and still dont know what the heck those values are ;-)
$test3 = $numbers[10]; //set vars that where empty and still dont know what the heck those values are ;-)
$mount = $numbers[11];
$connections = $numbers[12];
$station =$numbers[13];
$listeners = $numbers[14];
$description = $numbers[15];
$cur_song = $numbers[16];
$www_url = $numbers[17];


//edit html to fit your stations site, this display is for online status
echo'
<table width="100%" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td width="100%"><b><font face="Arial" size="2">
<img border="0" src="images/ice2_status/icecast.gif" width="22" height="22">
Powered By Icecast2</font></b></td>
</tr>
<tr>
<td width="100%"><b><font face="Arial" size="1"><a href="'.$www_url.'">
'.$station.'</a> - '.$description.'</font></b></td>
</tr>
<tr>
<td width="100%"><b><font face="Arial" size="1">
<img border="0" src="images/ice2_status/listeners.gif" width="22" height="18">
Слушателей: '.$listeners.'</font></b></td>
</tr>
<tr>
<td width="100%"><b><font face="Arial" size="1">
<img border="0" src="images/ice2_status/tunes.gif" width="21" height="21">
Сейчас в эфире: '.$cur_song.'</font></b></td>
</tr>
<tr>
<td width="100%"><b><font face="Arial" size="2">
<img border="0" src="images/ice2_status/play.gif" width="15" height="15">
<a target="_blank" href="http://'.$ip.':'.$port.''.$mount.'.m3u">Слушать радио</a></font></b></td>
</tr>
</table>';
}


?>

Вот такой код
И когда русские буквы вылетают крякозябры

1400
Pheoru @Pheoru
На статус странице айскаста русский некорректно отображается? Если да - то ставите в маунт codepage и самостоятельно ищите информацию по этому форуму насчет каждого непонятного параметра в конфиге.
Если все там нормально, то в страницу, на которой этот скрипт отображается, вставляете:
<meta content="charset=Windows-1251">

12
ramms @ramms
Ребят, все перепробывал и в скрипте уже пробывал всякие функции писать, не могу сделать русский язык
Дело в том, что в самом ice cast тоже русский не показывает...
Стоит Sam
Маунта у меня нет сервер настроен вот так:
<!-- This config file contains a minimal set of configurable parameters,
and mostly just contains the things you need to change. We created
this for those who got scared away from the rather large and heavily
commented icecast.xml.dist file. -->

<icecast>
<limits>
<clients>100</clients>
<sources>2</sources>
</limits>

<authentication>
<source-password>311272</source-password>
<relay-password>311272</relay-password>
<admin-user>ramms</admin-user>
<admin-password>311272</admin-password>
</authentication>

<hostname>10.0.0.4</hostname>
<listen-socket>
<port>8000</port>
</listen-socket>
<fileserve>1</fileserve>





<paths>

<logdir>./logs</logdir>
<webroot>./web</webroot>
<adminroot>./admin</adminroot>
<alias source="/" dest="/status.xsl"/>
</paths>


<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
</logging>

</icecast>

Очень прошу помочь!

Отредактировано ramms - 18.09.2009
1400
Pheoru @Pheoru
Создаете маунт, в нем указываете параметр <charset>windows-1251</charset>, и будет Вам счастье.