LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-29-2005, 08:51 PM   #1
Gregory Deal
LQ Newbie
 
Registered: Sep 2004
Posts: 5

Rep: Reputation: 0
Can't record with 'arecord' in FC4


I want to record sound that is being played. I'm listening live to a streaming internet radio station with 'realplayer <some URL>'. In FC2, I had this working by executing a script that was in the crontab that used the following line :

arecord -f cd -d 10800 | lame -h - /share/blues_$date.mp3

I now have FC4 installed and am trying to set this up again, so I tried playing the stram and then doing the line above to make sure everything was working. Well, it runs without errors, but the file is just silence when I play the mp3 file.

Trying it :

[root@localhost scripts]# arecord -f cd | lame -h - junk
Recording WAVE 'stdout' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
LAME version 3.96.1
CPU features: MMX (ASM used), SSE
Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz
Encoding <stdin> to junk
Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=2
Aborted by signal Interrupt...

Backing up, I just ran arecord and tried to play the result back with aplay. Same story. Looking at the arecord output (a WAV file), I see all the same values :

[root@localhost scripts]# od -c junk1|more
0000000 R I F F 324 0 001 \0 W A V E f m t
0000020 020 \0 \0 \0 001 \0 001 \0 @ 037 \0 \0 @ 037 \0 \0
0000040 001 \0 \b \0 d a t a 260 0 001 \0 177 177 177 200
0000060 200 177 177 200 200 177 177 177 177 177 177 177 177 177 177 177
0000100 177 177 177 177 177 177 177 177 177 177 177 200 200 177 177 177
0000120 177 177 177 177 177 200 200 177 177 177 177 177 177 177 177 177

So, it looks like arecord is not grabbing the sound I hear. Searching with Google and LinuxQuestions forums, I reviewed many postings. None seem to help me get arecord to grab the input. Using the "Volume Control" toolbar icon, and selecting the Ensoniq AudioPCI (Alsa Mixer) selection, I made sure that the Capture selection has the voulme high and not muted (although I couldn't mute it anyway). Looks the same in command line AlsaMixer. Any thoughts on what I need to do, or can try, to get arecord to get some input? More sound/card details below. Thanks for any help.

Other attempts that didn't work :

arecord -D hw:0,0 > junk1
arecord -D plug > junk1
arecord -D plughw > junk1
arecord -D hw > junk1

[root@localhost scripts]# lsmod
Module Size Used by
parport_pc 28933 1
lp 13001 0
parport 40585 2 parport_pc,lp
autofs4 29253 2
rfcomm 42333 0
l2cap 30661 5 rfcomm
bluetooth 56133 4 rfcomm,l2cap
sunrpc 167813 1
video 15941 0
button 6609 0
battery 9413 0
ac 4805 0
md5 4033 1
ipv6 268097 8
uhci_hcd 35152 0
shpchp 94405 0
i2c_i801 8781 0
i2c_core 21569 1 i2c_i801
snd_ens1371 31649 1
gameport 18633 1 snd_ens1371
snd_rawmidi 30305 1 snd_ens1371
snd_ac97_codec 75961 1 snd_ens1371
snd_seq_dummy 3653 0
snd_seq_oss 37057 0
snd_seq_midi_event 9153 1 snd_seq_oss
snd_seq 62289 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device 8781 4 snd_rawmidi,snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss 51185 0
snd_mixer_oss 17857 2 snd_pcm_oss
snd_pcm 100169 3 snd_ens1371,snd_ac97_codec,snd_pcm_oss
snd_timer 33605 2 snd_seq,snd_pcm
snd 57157 10 snd_ens1371,snd_rawmidi,snd_ac97_codec,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss, snd_pcm,snd_timer
soundcore 10913 2 snd
snd_page_alloc 9669 1 snd_pcm
3c59x 45033 0
mii 5441 1 3c59x
floppy 65269 0
dm_snapshot 17413 0
dm_zero 2113 0
dm_mirror 26029 0
ext3 132553 2
jbd 86233 1 ext3
dm_mod 58101 6 dm_snapshot,dm_zero,dm_mirror

[root@localhost scripts]# cat /etc/modprobe.conf
alias eth0 3c59x
alias snd-card-0 snd-ens1371
options snd-card-0 index=0
options snd-ens1371 index=0
remove snd-ens1371 { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-ens1371
alias usb-controller uhci-hcd

[root@localhost scripts]# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: AudioPCI [Ensoniq AudioPCI], device 0: ES1371/1 [ES1371 DAC2/ADC]
Subdevices: 1/1
Subdevice #0: subdevice #0

[root@localhost scripts]# arecord -L
PCM list:
hw {
@args.0 CARD
@args.1 DEV
@args.2 SUBDEV
@args.CARD {
type string
default {
@func getenv
vars {
0 ALSA_PCM_CARD
1 ALSA_CARD
}
default {
@func refer
name 'defaults.pcm.card'
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars {
0 ALSA_PCM_DEVICE
}
default {
@func refer
name 'defaults.pcm.device'
}
}
}
@args.SUBDEV {
type integer
default {
@func refer
name 'defaults.pcm.subdevice'
}
}
type hw
card $CARD
device $DEV
subdevice $SUBDEV
}
plughw {
@args.0 CARD
@args.1 DEV
@args.2 SUBDEV
@args.CARD {
type string
default {
@func getenv
vars {
0 ALSA_PCM_CARD
1 ALSA_CARD
}
default {
@func refer
name 'defaults.pcm.card'
}
}
}
@args.DEV {
type integer
default {
@func igetenv
vars {
0 ALSA_PCM_DEVICE
}
default {
@func refer
name 'defaults.pcm.device'
}
}
}
@args.SUBDEV {
type integer
default {
@func refer
name 'defaults.pcm.subdevice'
}
}
type plug
slave.pcm {
type hw
card $CARD
device $DEV
subdevice $SUBDEV
}
}
plug {
@args.0 SLAVE
@args.SLAVE {
type string
}
type plug
slave.pcm $SLAVE
}
shm {
@args.0 SOCKET
@args.1 PCM
@args.SOCKET {
type string
}
@args.PCM {
type string
}
type shm
server $SOCKET
pcm $PCM
}
tee {
@args.0 SLAVE
@args.1 FILE
@args.2 FORMAT
@args.SLAVE {
type string
}
@args.FILE {
type string
}
@args.FORMAT {
type string
default raw
}
type file
slave.pcm $SLAVE
file $FILE
format $FORMAT
}
file {
@args.0 FILE
@args.1 FORMAT
@args.FILE {
type string
}
@args.FORMAT {
type string
default raw
}
type file
slave.pcm null
file $FILE
format $FORMAT
}
null {
type null
}
cards 'cards.pcm'
front 'cards.pcm.front'
rear 'cards.pcm.rear'
center_lfe 'cards.pcm.center_lfe'
side 'cards.pcm.side'
surround40 'cards.pcm.surround40'
surround41 'cards.pcm.surround41'
surround50 'cards.pcm.surround50'
surround51 'cards.pcm.surround51'
surround71 'cards.pcm.surround71'
iec958 'cards.pcm.iec958'
spdif 'cards.pcm.iec958'
modem 'cards.pcm.modem'
default 'cards.pcm.default'
dmix 'cards.pcm.dmix'
dsnoop 'cards.pcm.dsnoop'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
microphone not working with arecord/aplay shengchieh Linux - Newbie 7 06-15-2009 08:09 AM
Could not record any sound from mic using audacity in FC4 sedibr Linux - Software 1 08-11-2006 07:56 PM
FC4 CD record rogere Fedora 3 09-18-2005 09:16 PM
Unable to record mic-in with SoundBlaster Live! while able to record other sources max76230 Linux - Newbie 2 03-14-2005 04:31 AM
Wavrecord and arecord not recording J_Szucs Linux - Software 5 01-13-2004 08:41 PM


All times are GMT -5. The time now is 12:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration