LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 06-14-2012, 04:47 PM   #1
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch, Lubuntu 18.04 OpenSUSE Leap 15.x
Posts: 518

Rep: Reputation: 24
sox, arecord both produce blank recordings


I stream my local radio with
Code:
mpg123 -b 2048 -C -@ http://war.str3am.com:8250/listen.pls
It plays fine but both
Code:
rec -c 2 radio.wav trim 0 00:15
arecord -f cd -d 15 radio.wav
produce blank recordings.

I've also tried recording from my mp3 player feeding into Front Mic and Line-In, with the same result.

My sound card settings are
Code:
~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
~ $
In alsamixer I have set both columns that would toggle to CAPTURE, and both are set to 81

I made some progress when I added the line
Code:
amixer -c 0 sset Line,0 80%,80% unmute cap
Now, instead of getting a blank recording, I get a noisy recording of static.
I tried
Code:
amixer contents
and decided that the problem must lie with these items that it listed
Quote:
numid=17,iface=MIXER,name='Input Source'
; type=ENUMERATED,access=rw------,values=1,items=3
; Item #0 'Rear Mic'
; Item #1 'Front Mic'
; Item #2 'Line'
: values=0
numid=18,iface=MIXER,name='Input Source',index=1
; type=ENUMERATED,access=rw------,values=1,items=3
; Item #0 'Rear Mic'
; Item #1 'Front Mic'
; Item #2 'Line'
: values=0
so I changed them with
Code:
root@a:/home/g# amixer -c 0 cset numid=17,iface=MIXER,name='Input Source' 2
numid=17,iface=MIXER,name='Input Source'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Rear Mic'
  ; Item #1 'Front Mic'
  ; Item #2 'Line'
  : values=2
root@a:/home/g# amixer -c 0 cset numid=18,iface=MIXER,name='Input Source',index=1 2
numid=18,iface=MIXER,name='Input Source',index=1
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Rear Mic'
  ; Item #1 'Front Mic'
  ; Item #2 'Line'
  : values=2
but nothing changed, still just static

Last edited by porphyry5; 06-15-2012 at 09:24 AM. Reason: Add amixer data
 
Old 06-16-2012, 06:42 AM   #2
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
If you want to record the audio you are playing, I suggest installing pavucontrol, and then using that to select the "Monitor" of your audio device when you record. Fewer and fewer audio devices these days have the ability to record what you hear.

Adam
 
1 members found this post helpful.
Old 06-16-2012, 07:09 AM   #3
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
I don't know exactly the properties of your audio chip, but I have a number of Intel audio chips and none of them allow capturing a playback stream. Best results with capturing for me is using $9.99 SoundBlaster el cheapo clone cards.

However, I would not install Pavucontrol as I also found that pulse usually screws up what you painstakingly got working in Alsa.

What I do with radio streams is recording them to file and play back that file. Much easier.

jlinkels
 
1 members found this post helpful.
Old 06-16-2012, 10:16 AM   #4
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch, Lubuntu 18.04 OpenSUSE Leap 15.x
Posts: 518

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by adamk75 View Post
Fewer and fewer audio devices these days have the ability to record what you hear.

Adam
Quote:
I don't know exactly the properties of your audio chip, but I have a number of Intel audio chips and none of them allow capturing a playback stream. Best results with capturing for me is using $9.99 SoundBlaster el cheapo clone cards.

jlinkels
Aah, thank you both. I'd never thought about the actual process of producing sound on a computer before, but what you're saying means that the player app does not actually produce the sounds, it simply converts the mp3 or wav to a stream format that the sound chip can interpret, so
Quote:
What I do with radio streams is recording them to file and play back that file. Much easier.

jlinkels
Yes indeed, thank you very much.
 
  


Reply



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
sox package, Slackware 13.1, fails on sox 1.wav -e stat burbabro Slackware 1 05-04-2011 02:26 AM
Sox recording command outputs blank files anid.iitk Linux - Newbie 2 05-29-2006 01:09 AM
Can't record with 'arecord' in FC4 Gregory Deal Linux - Software 0 07-29-2005 08:51 PM
Compiled OpenGL programs produce blank screens norfenstein Programming 3 12-04-2004 02:37 PM
Wavrecord and arecord not recording J_Szucs Linux - Software 5 01-13-2004 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:28 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration