LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-20-2010, 02:07 PM   #1
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Get sound out of a webcam?


I procured me a webcam, get a picture on the screen with:
Code:
mplayer tv:// -tv device=/dev/video1
But it has a built in microphone and have not got anything, *through the computer's speakers*, out of that.

Closest to getting sound so far is:
Code:
lugo@fido:~$ mplayer tv:// -tv device=/dev/video1 ; artsdsp sox -t alsa hw:2 -t alsa hw:0
sox soxio: Can't open input file `hw:2': unknown file type `alsa'
Code:
lugo@fido:~$  cat /proc/asound/cards
 0 [default        ]: USB-Audio - PnP Audio Device
                      PnP Audio Device         at usb-0000:00:02.0-7, full speed
 1 [SAA7134        ]: SAA7134 - SAA7134
                      saa7133[0] at 0xfdffe000 irq 16
 2 [U0x46d0x804    ]: USB-Audio - USB Device 0x46d:0x804
                      USB Device 0x46d:0x804 at usb-0000:00:02.1-2, high speed
0 is the soundcard, 2 is the webcam.

You know any suggestions helpful??

Code:
lugo@fido:~$ lsusb
Bus 002 Device 004: ID 046d:0804 Logitech, Inc. Webcam C250
 
Old 05-23-2010, 07:11 PM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

1) try installing alsa-utils to get the mixer called alsamixer

open a terminal as a non-root user

alsamixer -c 2

.....should show your mixer levels for card 2....unmute the mic and raise the volumes.

2) You did not show your webcam module....pls run
Code:
lsmod | grep snd
3) Yours appears to be uvcvideo compliant as per
http://www.quickcamteam.net/devices/...evice_list.pdf
 
Old 05-24-2010, 12:07 PM   #3
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215

Original Poster
Blog Entries: 2

Rep: Reputation: 49
Great thanks.
Code:
lsmod|grep snd
snd_usb_audio          90352  2            
snd_pcm_oss            37200  0
snd_mixer_oss          15072  1 snd_pcm_oss
snd_pcm                78504  3 saa7134_alsa,snd_usb_audio,snd_pcm_oss
snd_page_alloc          9920  1 snd_pcm
snd_usb_lib            16560  1 snd_usb_audio
snd_hwdep               8152  1 snd_usb_audio
snd_seq_midi            6976  0
snd_rawmidi            23008  2 snd_usb_lib,snd_seq_midi
snd_seq_midi_event      7712  1 snd_seq_midi
snd_seq                51232  2 snd_seq_midi,snd_seq_midi_event
snd_timer              21824  2 snd_pcm,snd_seq
snd_seq_device          7476  3 snd_seq_midi,snd_rawmidi,snd_seq
snd                    63880  16 saa7134_alsa,snd_usb_audio,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_hwdep,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore               7984  1 snd
Already used alsamixer, incidentally there is no mute box but there is a single slider.

This may be unhelpful but tried $ artsdsp mplayer video_recorded_using_cheese.ogg, artsdsp is meant to get it to use the KDE soundserver arts:
Code:
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders          
AUDIO: 44100 Hz, 1 ch, s16le, 80.0 kbit/11.34% (ratio: 10000->88200)      
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)      
==========================================================================
[AO_ALSA] alsa-lib: pcm_hw.c:1132:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy                                                            
[AO_ALSA] alsa-lib: pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave        
[AO_ALSA] Playback open error: Device or resource busy                             
Failed to initialize audio driver 'alsa'                                           
[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy    
[AO_ALSA] alsa-lib: pcm_hw.c:1132:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy                                                            
[AO_ALSA] alsa-lib: pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave        
[AO_ALSA] Playback open error: Device or resource busy                             
mcop warning: user defined signal handler found for SIG_PIPE, overriding           
[AO ARTS] can't connect to aRts soundserver                                        
[AO ESD] esd_open_sound failed: No such file or directory                          
AO: [pulse] Init failed: Connection refused                                        
[JACK] cannot open server                                                          
ao_nas: init(): Can't open nas audio server -> nosound                             
[AO SDL] Samplerate: 44100Hz Channels: Mono Format s16le                           
[AO_ALSA] alsa-lib: pcm_hw.c:1132:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy                                                            
[AO_ALSA] alsa-lib: pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave        
[AO SDL] Unable to open audio: No available audio device                           
[AO_ALSA] alsa-lib: pcm_hw.c:1132:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy                                                            
[AO_ALSA] alsa-lib: pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave        
[AO_ALSA] alsa-lib: pcm_hw.c:1132:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy                                                            
[AO_ALSA] alsa-lib: pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave        
AL lib: alsa.c:344: Could not open playback device 'default': Device or resource busy                                                                                 
mcop warning: user defined signal handler found for SIG_PIPE, overriding           
AL lib: oss.c:179: Could not open /dev/dsp: Device or resource busy                
[OpenAL] could not open device                                                     
DVB card number must be between 1 and 4                                            
AO: [null] 44100Hz 1ch s16le (2 bytes per sample)                                  
Starting playback...                                                               
Ogg : bad packet in stream 10 ct: -0.111  98/ 98  3%  0%  0.3% 0 0
Ogg : bad packet in stream 15 ct: -0.087 112/112  3%  0%  0.3% 0 0
Ogg : bad packet in stream 18 ct: -0.080 114/114  3%  0%  0.3% 0 0
Ogg : bad packet in stream 18 ct: -0.074 116/116  3%  0%  0.4% 0 0
Ogg : bad packet in stream 18 ct: -0.060 120/120  3%  0%  0.4% 0 0
Ogg : bad packet in stream 10 ct: -0.054 122/122  3%  0%  0.4% 0 0
Ogg : bad packet in stream 18 ct:  0.063 157/157  3%  0%  0.4% 0 0
Ogg : bad packet in stream 17 ct:  0.070 159/159  3%  0%  0.5% 0 0
Ogg : bad packet in stream 11 ct:  0.076 161/161  3%  0%  0.6% 0 0
Ogg : bad packet in stream 16 ct:  0.090 165/165  3%  0%  0.6% 0 0
Ogg : bad packet in stream 19 ct:  0.096 167/167  3%  0%  0.7% 0 0
Audio output truncated at end.ct:  0.230 207/207  3%  0%  0.9% 0 0
A:  50.1 V:  58.8 A-V: -8.695 ct:  3.661 1760/1760  3%  0%  0.1% 0 0

Exiting... (End of file)
fido:~/.gnome2/cheese/media#
Quote:
binary packages
It is best to compile the Linux-UVC modules from sources, until the project releases named versions. If your distro already has Linux-UVC modules, just try to make use of your camera. You are lucky if it works out of the box, but expect it to fail. This issue will surely vanish as time passes by.
This from http://openfacts.berlios.de/index-en...itle=Linux_UVCI'm using backport Lenny binary modules.

I'm floundering here, any suggestions valued.

Last edited by lugoteehalt; 05-24-2010 at 12:09 PM.
 
Old 06-01-2010, 07:25 AM   #4
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
sorry been busy

is your module output after you try to build stuff by any chance?

2) according to pdf file...your module should not be saa7134.....which appears to be for a tv capture card

therefore it might be interfering with your webcam....if you don't need it immediately
using root powers....
Code:
rmmod saa7134
then insert webcam if its on separate lead

then run lsmod and see if you can see modules either uvcvideo or spca2211

Now according to my kernel config...I have no spca2211 but I do have uvcvideo

3) if webcam is internal linked....then add saa7134 to your /etc/modprobe.d/blacklist.conf file....sorry if thats not what yours is named and reboot and re-check your lsmod

once you have no saa module and can see uvcvideo or spca2211 module then try out web cam pls
 
Old 06-02-2010, 07:40 PM   #5
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215

Original Poster
Blog Entries: 2

Rep: Reputation: 49
Quote:
Originally Posted by aus9 View Post
is your module output after you try to build stuff by any chance?

2) according to pdf file...your module should not be saa7134.....which appears to be for a tv capture card

therefore it might be interfering with your webcam....if you don't need it immediately
using root powers....
Code:
rmmod saa7134
then insert webcam if its on separate lead
Great thanks.

No, have not built modules, using binaries from distribution.

Bit idiotic perhaps but am unable to remove saa7134, I used to be able to do this in the past using modconf and removing things like saa7134-alsa first. Things cannot be removed because they are in use.

Any road up, I'll keep on trying to do as you say.

In the mean time installed latest Ubuntu and the webcam sound works with recording a video in the program "cheese". But first had to do sort of sytem -> preferences -> sound -> radio button labeled as the webcam id. If that says something. So I could use this but it is slow, the picture jumpy.

Tried fiddling with systems settings thing in KDE in Lenny and put the web cam as the first choice but it still did not work when a video *.ogg file made by cheese was played back.

Thanks again.
 
Old 06-07-2010, 04:56 AM   #6
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
oops its saa7134_alsa

and so that is what is needed to blacklist.

There is something wrong with my eyesight but I can't spot the initial lsmod entry which should show on left hand side....saa7134_alsa
Did you copy and paste a shorter version?
 
  


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
debian problem with sound and webcam RudraB Debian 1 11-01-2008 01:08 AM
Webcam wants to be my sound card. stormrider_may Debian 10 03-08-2008 01:41 PM
recording webcam with sound linuxmandrake Linux - Software 1 06-23-2006 04:39 PM
Webcam breaks sound Tylr Slackware 2 01-16-2006 11:59 AM
Plugged webcam breaks sound i/o Cesar Ocasio Linux - Hardware 3 10-13-2004 05:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:07 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