| View previous topic :: View next topic |
| Author |
Message |
Anonymous Guest
|
Posted: Sat Mar 04, 2006 12:56 am Post subject: Please help with streamtranscoderv3 + icecast2 |
|
|
Hello!
I setup icecast to relay number of radio stations for my treo. It works great! Now, I need to take a public 48kbps stream and down sample it to 24kbsp or 32kbps (speed of GPRS) and relay it as well.
I am having troubles in getting streamtranscoder to work with icecast properly. Streamtranscoder seems to start up fine and connect to both, the source and icecast, but icecast doesn't relay the stream.
Thank You !
Please see my config and log files below:
*******************************************************************
*****************streamTranscoder_0.cfg****************************
*******************************************************************
# The source URL for the broadcast. It must be in the form http://server:port/mountpoint. For those servers without a mountpoint (Shoutcast) use http://server:port.
SourceURL=http://ware.catv.ext.ru:8000/moscowecho48.mp3
AutomaticReconnectSecs=10
AutoConnect=0
# Log Level 1 = LOG_ERROR, 2 = LOG_ERROR+LOG_INFO, 3 = LOG_ERROR+LOG_INFO+LOG_DEBUG
LogLevel=3
# Log File
LogFile=streamTranscoder
# Number of encoders to use
NumEncoders=1
*******************************************************************
*****************streamTranscoder_1.cfg****************************
*******************************************************************
# Destination server details (to where you are encoding). Valid server types : Shoutcast, Icecast, Icecast2
ServerType=Icecast2
Server=localhost
Port=25
ServerPassword=n21east
ServerMountpoint=/echomoscvi32.ogg
# YP (Stream Directory) Settings
ServerPublic=1
ServerIRC=
ServerAIM=
ServerICQ=
ServerStreamURL=http://localhost:25/echomoscvi32.ogg
ServerName=myhost
ServerDescription=Echo Moscow
ServerGenre=News
AutomaticReconnectSecs=10
AutoConnect=1
# Output codec selection (Valid selections : MP3, OggVorbis, Ogg FLAC, AAC, AAC Plus)
Encode=OggVorbis
# General settings (non-codec related). Note : NumberChannels = 1 for MONO, 2 for STEREO
BitrateNominal=32
BitrateMin=32
BitrateMax=32
NumberChannels=2
Samplerate=24000
# Ogg Vorbis specific settings. Note: Valid settings for BitrateQuality flag are (Quality, Bitrate Management)
OggQuality=0
OggBitrateQualityFlag=Bitrate
# LAME specific settings. Note: Setting the low/highpass freq to 0 will disable them.
LameCBRFlag=1
LameQuality=1
LameCopywrite=0
LameOriginal=0
LameStrictISO=0
LameDisableReservior=0
LameVBRMode=vbr_abr
LameLowpassfreq=0
LameHighpassfreq=0
LAMEPreset=0
# AAC (FAAC) specific settings.
AACQuality=100
AACCutoff=
# Log Level 1 = LOG_ERROR, 2 = LOG_ERROR+LOG_INFO, 3 = LOG_ERROR+LOG_INFO+LOG_DEBUG
LogLevel=2
# Log File
LogFile=streamTranscoder_1
*******************************************************************
***************** icecast.xml ****************************
*******************************************************************
<icecast>
<limits>
<clients>100</clients>
<sources>10</sources>
<threadpool>5</threadpool>
<queue-size>819200</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>
<source-password>PASSWORD</source-password>
<admin-user>NAME</admin-user>
<admin-password>PASSWORD</admin-password>
</authentication>
<hostname>myhostname.com</hostname>
<port>25</port>
<relay>
<server>141.217.119.35</server>
<port>8005</port>
<mount>/</mount>
<local-mount>/detroit_npr.mp3</local-mount>
<on-demand>1</on-demand>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>
<relay>
<server>66.225.205.60</server>
<port>80</port>
<mount>/</mount>
<local-mount>/new_york_npr.mp3</local-mount>
<on-demand>1</on-demand>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>
<relay>
<server>67.168.205.74</server>
<port>8000</port>
<mount>/</mount>
<local-mount>/radio_kino.mp3</local-mount>
<on-demand>1</on-demand>
<relay-shoutcast-metadata>1</relay-shoutcast-metadata>
</relay>
<relay>
<server>localhost</server>
<port>25</port>
<mount>/echomoscvi32.ogg</mount>
<local-mount>/echo_moscvi_32.ogg</local-mount>
<on-demand>0</on-demand>
</relay>
<fileserve>1</fileserve>
<paths>
<basedir>/usr/local/icecast2</basedir>
<logdir>/usr/local/icecast2/logs</logdir>
<webroot>/usr/local/icecast2/web</webroot>
<adminroot>/usr/local/icecast2/admin</adminroot>
<pidfile>/usr/local/icecast2/icecast.pid</pidfile>
</paths>
<logging>
<accesslog>icecast_access.log</accesslog>
<errorlog>icecast_error.log</errorlog>
<loglevel>3</loglevel>
</logging>
<security>
<chroot>0</chroot>
<changeowner>
<user>iceuser</user>
</changeowner>
</security>
</icecast>
*******************************************************************
***************** error.log ****************************
*******************************************************************
[2006-03-03 20:04:17] WARN client/client_read_bytes source connection has died
[2006-03-03 20:04:17] INFO source/get_next_buffer End of Stream /echomoscvi32.ogg
[2006-03-03 20:04:17] INFO source/source_shutdown Source "/echomoscvi32.ogg" exiting
[2006-03-03 20:04:17] INFO source/get_next_buffer End of Stream /echo_moscvi_32.ogg
[2006-03-03 20:04:17] INFO source/source_shutdown Source "/echo_moscvi_32.ogg" exiting
[2006-03-03 20:04:25] INFO sighandler/_sig_die Caught signal 15, shutting down...
[2006-03-03 20:04:25] INFO main/main Shutting down
[2006-03-03 20:04:25] INFO fserve/fserve_shutdown file serving thread stopped
[2006-03-03 20:04:26] INFO slave/_slave_thread Slave thread shutdown complete
[2006-03-03 20:04:26] INFO auth/auth_run_thread Authenication thread shutting down
[2006-03-03 20:04:26] INFO auth/auth_shutdown Auth thread has terminated
[2006-03-03 20:04:26] INFO yp/yp_shutdown YP thread down
[2006-03-03 20:04:27] INFO stats/stats_shutdown stats thread finished
[2006-03-03 20:04:48] INFO main/main Icecast 2.3.1 server started
[2006-03-03 20:04:48] INFO yp/yp_update_thread YP update thread started
[2006-03-03 20:04:48] INFO auth/auth_run_thread Authentication thread started
[2006-03-03 20:04:49] INFO slave/start_relay_stream Starting relayed source at mountpoint "/echo_moscvi_32.ogg"
[2006-03-03 20:04:49] INFO fserve/fserve_client_create checking for file /echomoscvi32.ogg (/usr/local/icecast2/web/echomoscvi32.ogg)
[2006-03-03 20:04:49] WARN fserve/fserve_client_create req for file "/usr/local/icecast2/web/echomoscvi32.ogg" No such file or directory
[2006-03-03 20:04:49] EROR slave/start_relay_stream Error from relay request: File Not Found
[2006-03-03 20:04:57] INFO connection/_handle_source_request Source logging in at mountpoint "/echomoscvi32.ogg"
[2006-03-03 20:04:57] INFO format-vorbis/initial_vorbis_page seen initial vorbis header
[2006-03-03 20:06:51] INFO slave/start_relay_stream Starting relayed source at mountpoint "/echo_moscvi_32.ogg"
[2006-03-03 20:06:51] INFO source/source_main listener count on /echomoscvi32.ogg now 1
[2006-03-03 20:06:52] INFO format-vorbis/initial_vorbis_page seen initial vorbis header
*******************************************************************
***************** streamTranscoder_1.log ****************************
*******************************************************************
03/03/06 20:04:57 Info(streamTranscoderv3.cpp:131): Encoder 1: Vorbis: 32kbps/Stereo/24000
03/03/06 20:04:57 Info(streamTranscoderv3.cpp:65): Encoder 1: Disconnected
03/03/06 20:04:57 Info(streamTranscoderv3.cpp:65): Encoder 1: Connecting
03/03/06 20:04:57 Info(streamTranscoderv3.cpp:65): Encoder 1: Socket connected
03/03/06 20:04:57 Info(streamTranscoderv3.cpp:65): Encoder 1: Success
03/03/06 20:04:57 Info(streamTranscoderv3.cpp:65): Encoder 1: Connected
Last edited by Anonymous on Sat Mar 04, 2006 3:31 am; edited 3 times in total |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sat Mar 04, 2006 3:03 am Post subject: |
|
|
based on what you posted it looks to be running as expected.
| Quote: |
[2006-03-03 20:04:57] INFO connection/_handle_source_request Source logging in at mountpoint "/echomoscvi32.ogg"
[2006-03-03 20:04:57] INFO format-vorbis/initial_vorbis_page seen initial vorbis header
[2006-03-03 20:06:51] INFO slave/start_relay_stream Starting relayed source at mountpoint "/echo_moscvi_32.ogg"
[2006-03-03 20:06:51] INFO source/source_main listener count on /echomoscvi32.ogg now 1
[2006-03-03 20:06:52] INFO format-vorbis/initial_vorbis_page seen initial vorbis header |
BTW interesting choice of port to run icecast on. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Sat Mar 04, 2006 3:13 am Post subject: |
|
|
Icecast logs the error below:
[2006-03-03 20:04:49] INFO fserve/fserve_client_create checking for file /echomoscvi32.ogg (/usr/local/icecast2/web/echomoscvi32.ogg)
[2006-03-03 20:04:49] WARN fserve/fserve_client_create req for file "/usr/local/icecast2/web/echomoscvi32.ogg" No such file or directory
[2006-03-03 20:04:49] EROR slave/start_relay_stream Error from relay request: File Not Found
[2006-03-03 20:04:57] INFO connection/_handle_source_request Source logging in at mountpoint "/echomoscvi32.ogg"
Port 25 is e-mail related port. It is one of the 6 ports open in my Tmobile T-zones plane. I exploit those ports to run radio and other apps. Radio was not something Tmobile had in mind when they sold me $5 a month email plan(unlimited data)  |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sat Mar 04, 2006 3:45 am Post subject: |
|
|
If you relay another stream on the same icecast then that other stream needs to be there or else you get a Not found type message. 8 seconds after that error is returned to the relay, a source client connects and streams on that mountpoint. After 2 mins the relay is tried again and from the looks of it succeeds.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Sun Mar 05, 2006 1:16 am Post subject: |
|
|
| karlH wrote: |
If you relay another stream on the same icecast then that other stream needs to be there or else you get a Not found type message. 8 seconds after that error is returned to the relay, a source client connects and streams on that mountpoint. After 2 mins the relay is tried again and from the looks of it succeeds.
karl. |
HA! you are right! I tried to connect just a bit later after restarting the services and it works! I always tried to connect immidiately after, but I just needed to give it a few seconds....
After getting this to work, I want streamtranscoder to start and stop automatically upon client connect. I put in the following script, but no luck. Icecast doesn't execute the script when client tries to connect.
<relay>
<server>localhost</server>
<port>25</port>
<mount>/echomoscvi32.mp3</mount>
<local-mount>/echo_moscvi_32.mp3</local-mount>
<on-demand>1</on-demand>
</relay>
<mount>
<mount-name>/echomoscvi32.mp3</mount-name>
<on-connect>/usr/local/icecast2/coder_1/start_transcoder_1</on-connect>
<on-disconnect>/usr/local/icecast2/coder_1/stop_transcoder_1</on-disconnect>
</mount>
*******************************************************************
***************** error.log ****************************
*******************************************************************
[2006-03-04 20:36:46] INFO main/main Icecast 2.3.1 server started
[2006-03-04 20:36:46] INFO fserve/fserv_thread_function file serving thread started
[2006-03-04 20:36:46] INFO yp/yp_update_thread YP update thread started
[2006-03-04 20:36:46] INFO auth/auth_run_thread Authentication thread started
[2006-03-04 20:37:02] INFO slave/start_relay_stream Starting relayed source at mountpoint "/echo_moscvi_32.mp3"
[2006-03-04 20:37:02] INFO fserve/fserve_client_create checking for file /echomoscvi32.mp3 (/usr/local/icecast2/web/echomoscvi32.mp3)
[2006-03-04 20:37:02] WARN fserve/fserve_client_create req for file "/usr/local/icecast2/web/echomoscvi32.mp3" No such file or directory
[2006-03-04 20:37:02] EROR slave/start_relay_stream Error from relay request: File Not Found
[2006-03-04 20:37:18] INFO slave/start_relay_stream Starting relayed source at mountpoint "/echo_moscvi_32.mp3"
[2006-03-04 20:37:18] INFO fserve/fserve_client_create checking for file /echomoscvi32.mp3 (/usr/local/icecast2/web/echomoscvi32.mp3)
[2006-03-04 20:37:18] WARN fserve/fserve_client_create req for file "/usr/local/icecast2/web/echomoscvi32.mp3" No such file or directory
[2006-03-04 20:37:18] EROR slave/start_relay_stream Error from relay request: File Not Found
[2006-03-04 20:37:32] INFO slave/start_relay_stream Starting relayed source at mountpoint "/echo_moscvi_32.mp3"
[2006-03-04 20:37:32] INFO fserve/fserve_client_create checking for file /echomoscvi32.mp3 (/usr/local/icecast2/web/echomoscvi32.mp3)
[2006-03-04 20:37:32] WARN fserve/fserve_client_create req for file "/usr/local/icecast2/web/echomoscvi32.mp3" No such file or directory
[2006-03-04 20:37:32] EROR slave/start_relay_stream Error from relay request: File Not Found
[2006-03-04 20:37:45] INFO slave/start_relay_stream Starting relayed source at mountpoint "/echo_moscvi_32.mp3"
[2006-03-04 20:37:45] INFO fserve/fserve_client_create checking for file /echomoscvi32.mp3 (/usr/local/icecast2/web/echomoscvi32.mp3)
[2006-03-04 20:37:45] WARN fserve/fserve_client_create req for file "/usr/local/icecast2/web/echomoscvi32.mp3" No such file or directory
[2006-03-04 20:37:45] EROR slave/start_relay_stream Error from relay request: File Not Found |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Mar 05, 2006 2:37 am Post subject: |
|
|
on-[dis]connect scripts are not triggered on listener connections, only when a stream starts/stops
If you really want to trigger a source client connection on-demand then you'll have to use listener authentication via url. You don't have to check any listener details (like user/pass) but you can make the script start the source client (if it is not running already), returning the authenticated header to pass the listener. You'll have to allow for the source client to make it's connection before passing the first listener and you'll have to keep a tally of the listeners so that you know when to shutdown the source client when the last listener disconnects.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Sun Mar 05, 2006 4:12 am Post subject: |
|
|
| karlH wrote: |
on-[dis]connect scripts are not triggered on listener connections, only when a stream starts/stops
If you really want to trigger a source client connection on-demand then you'll have to use listener authentication via url. You don't have to check any listener details (like user/pass) but you can make the script start the source client (if it is not running already), returning the authenticated header to pass the listener. You'll have to allow for the source client to make it's connection before passing the first listener and you'll have to keep a tally of the listeners so that you know when to shutdown the source client when the last listener disconnects.
karl. |
Having this startup on-demand feature would save me some bandwidth and allow me to relay multiple transcoded streams ( my server is to slow to concurrently relay multiple transcoded streams). Still I don't think going authentication route worth the trouble. My whole setup now works whole lot better then my previous shoutcast setup. So, I will wait for this ( as well as relay of transcoded real and mss streams ) to become standart features
Thanks for your help Karl!!!! |
|
| Back to top |
|
 |
|