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 

Ices2 - no audio recorded
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Sun Nov 11, 2007 11:08 pm    Post subject: Ices2 - no audio recorded Reply with quote

I am trying to get IceS2 to record audio using the OSS driver on a gumstix device. I have verified that I can record audio by hooking up an mp3 player to line in on the gumstix audiostix2 and recording the audio with brec. aumix also seems to configured correctly.

My problem arises when ices2 starts. I get no errors from the logs and all I get is silence when I stream to Movie Player on my ubuntu desktop from the icecast homepage running on the device. I tried setting the ices.conf file to also save the output. It saves a file but only records silence as well.

Here is my ices.conf file.
Code:
<?xml version="1.0"?>
<ices>
     <background>0</background>
     <logpath>/tmp/ices</logpath>
     <logfile>ices.log</logfile>
     <logsize>2048</logsize>
     <loglevel>10</loglevel>
     <consolelog>1</consolelog>
     <pidfile>/tmp/ices.pid</pidfile>
     <stream>
         <metadata>
             <name>Monitor</name>
             <genre>Live</genre>
             <description>Monitor audio</description>
             <!--<url>http://localhost</url>-->
         </metadata>
         <input>
             <module>oss</module>
             <param name='device'>/dev/dsp</param>
             <param name='rate'>11025</param>
             <param name='channels'>1</param>
         </input>
         <instance>
             <hostname>localhost</hostname>
             <port>8000</port>
             <password>hackme</password>
             <mount>/bmonitor.ogg</mount>
             <encode>
                 <quality>0</quality>
                 <!--nominal-bitrate></nominal-bitrate>-->
                 <samplerate>11025</samplerate>
                 <channels>1</channels>
             </encode>
         </instance>
     </stream>
</ices>


Recording works, however IceS cannot seem to record anything other than silence. I have not been able to find any other program that may be blocking IceS from recording either.

Any help would be greatly appreciated. If there is any other information I could post, please let me know.

Thanks.[/code]
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Nov 12, 2007 12:35 am    Post subject: Reply with quote

If you are getting silence from the stream then ices is not being blocked. It's more likely that you have the mixer settings not as you want. Use any mixer application to change them to something more suitable.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Mon Nov 12, 2007 12:44 am    Post subject: Reply with quote

Thank you.

I have been trying to adjust the settings with aumix, changing from the microphone to the line in for recording. brec records with both settings active. Should I be looking at something else. It was my impression that if brec records, then ices will used the configured /dev/dsp (in this case).
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Nov 12, 2007 3:17 am    Post subject: Reply with quote

You adjust the capture settings to record whatever you want the application to record. I don't know brec but if that records the audio signal that you want then ices should do that also, but ices will not change any of the mixer settings because it doesn't really care whether the input is from CD, Mic, Line, Mix or anything else.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Mon Nov 12, 2007 2:59 pm    Post subject: Reply with quote

brec is just a command line tool for recording.

I have performed the following:

Code:
brec > foo


and

Code:
brec -w foo.wav


Each produces audio recording from /dev/dsp (by default). I have tried some other settings as well that produce higher quality recordings. However, I do nothing to set the device so it uses /dev/dsp. I have also tried setting the device specifically -d /dev/dsp and that also produces audio.

These methods produces audio every time, but ices does not seem to be honoring these settings or this device.

I have tried to enable as much logging as I am aware of, but it does not produce anything other than a successful startup and no audio.

Did you notice any errors in my ices.conf file?

Thanks again for your help.

Dan
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Nov 12, 2007 4:29 pm    Post subject: Reply with quote

Does brec produce a 11025hz mono stream stream (which is what you are asking of ices) containing the signal you want? There is nothing wrong in the ices xml

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Mon Nov 12, 2007 5:43 pm    Post subject: Reply with quote

Karl,
I have tried to match the sample rate in the ices.conf with the -s flag for brec. It produces a valid audio file that plays through totem. I have also played with other settings like 44100 and 11127 and all have produced valid audio files that I can play in totem.

One thing I did notice was that there was /dev/audio. I tried to set this in the ices.conf but it fails to produce sound as well. I also tried stdinpcm, but that failed to start the stream completely. I am not sure about the last driver, but thought I would give it a shot.

For the gumstix, I had to cross-compile libxml, libxstl, libogg, libvorbis, and lib shout as well as icecast and ices. By any chance, I am not missing any dependencies? Below are the configure commands I used when cross compiling:

Code:
Configure libxml2
=================
CC=arm-linux-gcc CFLAGS='-fPIC' ./configure --host=arm-linux --build=i686-linux --prefix=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr --disable-static --enable-shared

Configure libxslt
=================
CC=arm-linux-gcc CFLAGS='-fPIC' ./configure --host=arm-linux --build=i686-linux --prefix=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr --with-libxml-prefix=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr --with-libxml-libs-prefix=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr/lib --with-libxml-include-prefix=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr/include --disable-static --enable-shared


Configure libogg
================
CC=arm-linux-gcc CFLAGS='-fPIC' ./configure --host=arm-linux --build=i686-linux --prefix=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr --disable-static --enable-shared


Configure libvorbis
===================
CC=arm-linux-gcc CFLAGS='-fPIC' PKG_CONFIG_PATH=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr/lib/pkgconfig/ ./configure --host=arm-linux --build=i686-linux --prefix=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr --with-ogg=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr/ --disable-oggtest --disable-static --enable-shared


Configure lame
==============
CC=arm-linux-gcc CFLAGS='-fPIC' ./configure --host=arm-linux --build=i686-linux --prefix=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr --disable-static --enable-shared


Configure libshout
==================
CC=arm-linux-gcc CFLAGS='-fPIC' PKG_CONFIG_PATH=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr/lib/pkgconfig ./configure --host=arm-linux --build=i686-linux --prefix=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr --disable-static --enable-shared


Configure icecast
=================
CC=arm-linux-gcc CFLAGS='-fPIC' PKG_CONFIG_PATH=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr/lib/pkgconfig XMLCONFIG=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr/bin/xml2-config XSLTCONFIG=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr/bin/xslt-config ./configure --host=arm-linux --build=i686-linux --prefix=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr --sysconfdir=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/etc


Configure ices
==============
CC=arm-linux-gcc PKG_CONFIG_PATH=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr/lib/pkgconfig XMLCONFIG=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr/bin/xml2-config OGG_PREFIX=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr VORBIS_PREFIX=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr ./configure --host=arm-linux --build=i686-linux --prefix=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/usr --sysconfdir=/home/dmfrey/dev/embedded/gumstix-buildroot/build_arm_nofpu/root/etc



Thanks,
Dan
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Nov 12, 2007 6:59 pm    Post subject: Reply with quote

You are not missing any dependencies if you are getting a stream shown in icecast. You keep thinking there is a problem within ices but from your description, ices is getting silence and encoding it, which means it's working as it should. I cannot comment on brec or your mixer because I don't see any information on it. Have you tried using rec (part of sox) or arecord if using alsa.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Mon Nov 12, 2007 7:52 pm    Post subject: Reply with quote

Karl,

I have not tried either of those apps to record. Alsa is not installed on my gumstix.

When I get home tonight, I will post the mixer query. I am using aumix -q to output the mixer settings. For the most part Volume, Line In, Mic, and Input Gain (input boost) are all set to 100. However, only the Mic or Line In is set for recording at any given time. Setting one input to record automatically removes it from the existing input.

Dan
Back to top
Anonymous
Guest





PostPosted: Tue Nov 13, 2007 12:13 pm    Post subject: Reply with quote

Here is the output from aumix:

Code:
# aumix -q
vol 0, 0, P
bass 0, 0
treble 0, 0
line 100, 100, P
mic 100, 100, R
cd 100, 100, P
pcm2 100, 100
igain 100, 100
line1 100, 100, P
phin 100, 100, P
phout 100, 100, P
video 100, 100, P


The 'P' is for playback and the 'R' is for recording. Note that the Mic is currently set to Record.
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Nov 13, 2007 1:39 pm    Post subject: Reply with quote

You have not said what are you want to record from /dev/dsp. If you really want to capture the audio going to the Mic input of this soundcard then that setting is fine although 100% will probably distort the signal. If the audio feed goes to say line-in, then a capture of Mic will just result in silence.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Tue Nov 13, 2007 2:18 pm    Post subject: Reply with quote

My intention is to record from a microphone.

This is the board that I am using:
http://gumstix.com/store/catalog/product_info.php?products_id=158

The way I have been testing this by connecting my Nokia N800 through the headphone output to the mic input on the board and running the media player. This is how I was producing the output from brec.

I did play with some of the settings and found that 100% was required on the mic, as well as the input gain, because the audio sounded too faint. Setting the input gain to 100% gave the audio a boost.

Dan
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Nov 13, 2007 2:55 pm    Post subject: Reply with quote

You are sure that /dev/dsp is the right device, eg /dev/dsp does not refer to some on-board audio device instead of the one you want. Did rec (sox or other oss recording tools) record the correct audio signal?

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Wed Nov 14, 2007 12:45 pm    Post subject: Reply with quote

I tried to locate some other application on my gumstix image for recording. I found arecord, however alsa is not getting loaded so arecord just fails. rec and sox are not loaded.

I tried to do some more recording with brec. With -d I specifically stated /dev/audio and /dev/dsp. Both record without issue from the command line.

I also added the following options -S, -s 44100, -b 16. and -w (for wave output). This records from 2 channels at 44100. bplay then plays this file right from the sound card.

I am in the process of building a new image for the gumstix with the most current release, but I want to see if I can get ices working correctly before I re-image it. In this image, I will see if there are any other tools in the gumstix packages to add, if not, i will build them into the image manually.

Thanks for all your help.

Dan
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Nov 14, 2007 3:00 pm    Post subject: Reply with quote

We've not had any issues like this reported for the OSS input for ices2 before, so I can't see there being any particular problem wrt ices. At the moment you have only been able to show it working with brec which is an unknown and haven't managed to confirm with any other oss capture application. You could get an strace of brec so that we can see the system calls that brec is doing to get the capture.

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 -> Source Clients All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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