Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem running ices_kh with ices_jack.xml

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Dev Branches
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Thu Apr 26, 2007 2:48 pm    Post subject: Problem running ices_kh with ices_jack.xml Reply with quote

Hi Karl,
Thanks for solving my ices_playlist.xml problem. Now I have an ices_jack.xml problem:

[root@localhost conf]# ices ices-jack.xml
Failed to read config file "ices-jack.xml"


I found an email that said that one cause for this was that the ices exe wasn't linked against the jack library. I looked and that was the case for me. So I installed the development jack package from planet-ccrma, and reran the config script for ices.

The config script failed because it wanted me to have libshout 2.1, which I then installed. Then the ices config script worked OK. I then did a make and make install on ices. And jack was linked against:

gcc -ffast-math -fsigned-char -I/usr/include/libxml2 -pthread -g -O20 -o ices input.o cfgparse.o runner.o ices.o signals.o reencode.o encode.o stream.o metadata.o audio.o resample.o im_pcm.o im_playlist.o playlist_basic.o playlist_script.o im_oss.o im_alsa.o im_jack.o om_shout.o om_file.o log/.libs/libicelog.a thread/.libs/libicethread.a avl/.libs/libiceavl.a timing/.libs/libicetiming.a /usr/lib/libasound.so /usr/lib/libjack.so -ldl /usr/local/lib/libvorbisenc.so -L/usr/local/lib /usr/local/lib/libshout.so /usr/local/lib/libtheora.so /usr/local/lib/libvorbis.so /usr/local/lib/libogg.so -L/usr/lib -lxml2 -lz -lpthread -lm -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib


However, when I tried:

ices ices_jack.xml

it still failed:

[root@localhost conf]# ices ices-jack.xml
Failed to open log file /tmp/ices.log

Any idea what's wrong?


For the record, my ices-jack.xml is given below. My only changes are the names of the stream, and alsa_pcm:capture_1,2 I changed to alsa_pcm:playlist_1,2

And I changed the save duration to 0 to disable it:


<?xml version="1.0"?>
<ices>
<background>0</background> <!-- run in background? (unimplemented) -->
<realtime>0</realtime> <!-- disable realtime, enabled by default -->
<user>ices</user> <!-- user to change to when started as root -->
<logpath>/tmp</logpath> <!-- where log goes. -->
<logsize>2048</logsize> <!-- the size the log has to get to before cycling -->
<logfile>ices.log</logfile>
<loglevel>4</loglevel> <!-- 1=error,2=warn,3=info,4=debug -->
<consolelog>0</consolelog> <!-- logfile is ignored if this is set to 1 -->
<pidfile>/var/ices/ices.pid</pidfile> <!-- file to write process id to -->

<stream>
<!-- global settings for all streams - optional-->
<name>Val Noises</name>
<genre>Baby</genre>
<description>Feed to a mic in 2nd bedroom</description>

<!-- input module -->
<!-- This example uses the 'jack' module. It takes input from the -->
<!-- jack ports and processes it for live -->
<!-- encoding. If metadatafilename is set then at start and on USR1 -->
<!-- the file is read and the comments are added into the stream -->
<input>
<module>jack</module>
<param name="channels">2</param> <!-- number channels that will be available as jack ports-->
<param name="clientname">ices</param> <!-- jackclient name -->
<param name="connect">alsa_pcm:playback_1,alsa_pcm:playback_2</param> <!-- Comma-separated list of ports to connect to at startup.(optional, it is also possible to use tools like jack.plumbing to take care of the connections) -->
<param name="metadatafilename">metadata</param>
</input>
<!-- more input section can be stated here, and can be switched manually -->
<!-- by USR2 or whenever the previous input finishes. The order is -->
<!-- dictated in here and loops aronnd to the first one listed -->

<!-- A runner is a thread that applies the input data to each outgoing -->
<!-- stream instance defined within it. Multiple runners can be stated -->
<!-- for use on multiple processors. -->
<runner>
<!-- stream instance, used to associate a set of encoding settings -->
<!-- with output. At the moment 2 outputs can be used, shout and -->
<!-- savestream. Any number or combination of these outputs can be used -->
<instance>
<!-- per instance setting, overriding the global settings - optional-->
<name>test transmission</name>
<genre>various</genre>
<description>low bandwidth stream</description>

<!-- You define hostname and port for the server here, along with -->
<!-- the source password and mountpoint. If you miss them out -->
<!-- then any processing will still occur but it won't be sent to -->
<!-- icecast, useful for encode to file only -->
<shout>
<hostname>localhost</hostname>
<port>8000</port>
<password>hackme</password>
<mount>/jack.ogg</mount>
</shout>

<!-- resample input to the stated samplerate - optional
the input can change samplerate so this can be used to fix it
at a certain rate -->
<!--
<resample>
<out-rate>22050</out-rate>
</resample>
-->

<!-- stereo->mono downmixing, enabled by setting this to 1 - optional -->
<!--
<downmix>1</downmix>
-->
<!-- Live encoding/reencoding: -->
<encode>
<quality>1.1</quality>
<!-- usual options for encoding, except from samplerate and chanels -->
<!-- they are set from input/resample/downmix setting -->
</encode>
</instance>

<!-- more instances can be defined -->
<instance>
<!-- This instance just writes to file, no connection to icecast -->
<encode>
<quality>1.1</quality>
</encode>

<!-- writing of files, all but the filename have the defaults-->
<!-- listed -->
<savestream>
<!-- filename expansion, look at strftime for details -->
<filename>/home/ices/saved-file/%X/stream-%M.ogg</filename>
<!-- file creation mask, eg 0644 -->
<fmask>0600</fmask>
<!-- directory creation mask -->
<dmask>0700</dmask>
<!-- seconds to record, 0 disables, defaults to 1 hour -->
<duration>0</duration>
<!-- switch file on stream change -->
<on-metadata>1</on-metadata>
<!-- Normally on switchover from a duration timeout, the
timecode is reset, needed for some players, but disabling
this prevents modification -->
<reset-time>0</reset-time>
</savestream>

</instance>

</runner>

<runner>
....
</runner>

</stream>
</ices>



Your help is much appreciated!

By the way, I'm an Englishman living the US...are you British?
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Apr 26, 2007 4:44 pm    Post subject: Reply with quote

The libshout to use is the latest, which is 2.2.2.

"Failed to open log file /tmp/ices.log"

With the above you need to check the logging, your ices is not able to open that log file for appending. I'm guessing it already exists and is not writable by you. Really you shouldn't use /tmp for this file as it could be a symlink.

karl.

(yes I'm British).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Thu Apr 26, 2007 5:25 pm    Post subject: Oops! You're right! Reply with quote

Hi Karl,
I had not noticed that it was the logging which was at fault! I changed the log to /var/log/ices/ices.log, and now I'm seeing:

[2007-04-26 11:57:38] INFO ices-core/main Streamer version IceS 2.0-kh60
[2007-04-26 11:57:38] INFO ices-core/main libshout version 2.2.2
[2007-04-26 11:57:38] INFO ices-core/main Unable to set realtime scheduling
[2007-04-26 11:57:38] DBUG stream/start_runners starting runner
[2007-04-26 11:57:38] DBUG stream/start_runners starting runner
[2007-04-26 11:57:38] INFO stream/ices_runner set priority on runner
[2007-04-26 11:57:38] INFO stream/ices_runner Runner 1 ready
[2007-04-26 11:57:38] INFO stream/ices_runner set priority on runner
[2007-04-26 11:57:38] INFO stream/ices_runner Runner 2 ready
[2007-04-26 11:57:38] INFO input-jack/jack_init_module JACK driver initialised
[2007-04-26 11:57:38] DBUG input/initialise_input_modules Module 1 (JACK) has pre-allocated 30 buffers out of 30
[2007-04-26 11:57:38] DBUG input/open_next_input_module checking module 1
[2007-04-26 11:57:38] EROR input-jack/jack_open_module jack server not running
[2007-04-26 11:57:38] INFO input-jack/jack_shutdown_module Shutdown JACK module
[2007-04-26 11:57:38] DBUG input/input_loop All input stopped, shutting down.
[2007-04-26 11:57:38] DBUG stream/runner_close Runner thread 1 shutting down
[2007-04-26 11:57:38] DBUG stream/runner_close Runner thread 2 shutting down
[2007-04-26 11:57:38] DBUG stream/ices_runner Runner thread 2 cleaning up streams
[2007-04-26 11:57:38] DBUG stream/ices_runner Runner thread 2 finshed
[2007-04-26 11:57:38] DBUG stream/ices_runner Runner thread 1 cleaning up streams
[2007-04-26 11:57:38] DBUG stream/ices_runner Runner thread 1 finshed
[2007-04-26 11:57:38] DBUG input/free_modules freeing up module storage
[2007-04-26 11:57:38] DBUG input/free_modules freeing up module JACK
[2007-04-26 11:57:38] DBUG input/free_modules 30 buffers freed
[2007-04-26 11:57:38] INFO ices-core/main Shutdown in progress


So it claims that jack is not running. But I'm pretty sure it is:

[root@localhost ices]# ps -u root |grep jack
2920 pts/2 00:00:04 jackd


Any ideas?

I started jack with the command:

[root@localhost ~]# jackd -R -d alsa -d hw -r 44100 &
[1] 2920
[root@localhost ~]# jackd 0.100.1
Copyright 2001-2005 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

JACK compiled with System V SHM support.
loading driver ..
apparent rate = 44100
creating alsa driver ... hw|hw|1024|2|44100|0|0|nomon|swmeter|-|32bit
configuring for 44100Hz, period = 1024 frames, buffer = 2 periods
Note: audio device hw doesn't support a 32bit sample format so JACK will try a 2
4bit format instead
Note: audio device hw doesn't support a 24bit sample format so JACK will try a 1
6bit format instead
nperiods = 2 for capture
Note: audio device hw doesn't support a 32bit sample format so JACK will try a 2
4bit format instead
Note: audio device hw doesn't support a 24bit sample format so JACK will try a 1
6bit format instead
nperiods = 2 for playback



I get a few messages like:

**** alsa_pcm: xrun of at least 0.091 msecs

delay of 46812.000 usecs exceeds estimated spare time of 23195.000; restart ...
delay of 33157.000 usecs exceeds estimated spare time of 23186.000; restart ...
delay of 30817.000 usecs exceeds estimated spare time of 23180.000; restart ...





Glad to talk to a Brit, as I'm surrounded by Americans here! I haven't been back since 2003.
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Apr 26, 2007 5:47 pm    Post subject: Reply with quote

I'm guessing it's because jackd is being run as root and ices is not.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Dev Branches All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber