Record Only audio from Webcam logitech


Record From webcam’s mic

note some webcams could require -ac 2
note hw:1,0 it’s a parameter that could change to get it … just run this

 cat /proc/asound/pcm 

i get

 00-00: ALC861-VD Analog : ALC861-VD Analog : playback 1 : capture 1
00-06: Si3054 Modem : Si3054 Modem : playback 1 : capture 1
01-00: USB Audio : USB Audio : capture 1

so i need to use -i hw:1,0

the base command it’s this

ffmpeg -f alsa -ac 1 -ar 48000 -i hw:1,0 -acodec pcm_s16le -vn audio_recording.wav 

for mp3 , remember that if you get an error it’s because ffmpeg has not mp3 support … you need to compile it or just install some special packages from repos …

ffmpeg -f alsa -ac 1 -ar 48000 -i hw:1,0   -vn audio_recording.mp3

ffmpeg git kubuntu 13.04


like always if you need to install on the system the new version maybe for kdenlive or for other issues remember to add this to configure line
<pre> –enable-shared and –prefix=/usr/local/

sudo apt-get build-dep ffmpeg ; sudo apt-get install   build-essential git libopencore-amrnb-dev libopencore-amrwb-dev libopenjpeg-dev libx264-dev libxvidcore-dev libx264-dev  libopenjpeg-dev   libasound2-dev   libdc1394-22-dev   libgsm1-dev  libimlib2-dev libraw1394-dev libsdl1.2-dev libschroedinger-dev libspeex-dev  libtheora-dev  libvorbis-dev libx11-dev libxext-dev libxvmc-dev quilt texi2html zlib1g-dev libfaad-dev libdirac-dev libfaac-dev libmp3lame-dev frei0r-plugins-dev libdirac-dev  libfaac-dev ;sudo apt-get install libass-dev libbluray-dev libfontconfig1-dev libcelt-dev libmodplug-dev libopencv-dev librtmp-dev libv4l-dev libvo-aacenc-dev libvo-amrwbenc-dev libass-dev libbluray-dev libmodplug-dev libssl-dev 

this is what i have removed  on configure…

–enable-avisynth  ERROR: vfw32 not found :)
libaacs-dev
–enable-libaacplus
–enable-libcelt
–enable-libilbc
–enable-libnut
–enable-libstagefright-h264
–enable-libutvideo
–enable-libxavs
–enable-runtime-cpudetect
–enable-xmm-clobber-test libswscale/x86/w64xmmtest.c:31: Error: bad register name `%xmm8′
–enable-dxva2 libavcodec/dxva2.h:34:18: fatal error: d3d9.h: No such file or directory

git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg-$(date +"%m-%d-%y");cd  ffmpeg-$(date +"%m-%d-%y") ; ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-gray --enable-avresample --enable-x11grab --enable-vaapi --enable-vda --enable-vdpau  --enable-bzlib --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray  --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-libfreetype --enable-libgsm  --enable-libmodplug --enable-libmp3lame  --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex  --enable-libtheora --enable-libv4l2 --enable-libvo-aacenc --enable-libvo-amrwbenc  --enable-libvorbis --enable-libvpx --enable-libx264  --enable-libxvid --enable-openssl --enable-zlib --enable-pic --enable-sram --enable-hardcoded-tables --enable-memalign-hack  --enable-extra-warnings --enable-random --enable-fontconfig 

 

 

 

 

vlc webcam audio recording and destkop screencast


-..- i got the flu …. so this article is online

first of all you need to know which device you have to use

Audio:

as always :

cat /proc/asound/pcm

you should ge something like this

00-00: ALC861-VD Analog : ALC861-VD Analog : playback 1 : capture 1
00-06: Si3054 Modem : Si3054 Modem : playback 1 : capture 1
01-00: USB Audio : USB Audio : capture 1

so…. you can see here i have the internal audio card … that can caputre (alc861vd) and the usb microfone, which is into the webcam

so to capture my destkop and the audio from the usb microfone i should use

alsa://hw:1,0

if i need instead the audio from your internal audio card

alsa://plughw

or this one

 alsa://hw:0,0

as you can seee the number 0,0 or 1,0 it’s related to this output

00-00: ALC861-VD Analog : ALC861-VD Analog : playback 1 : capture 1
00-06: Si3054 Modem : Si3054 Modem : playback 1 : capture 1
01-00: USB Audio : USB Audio : capture 1

for the webcam it’s the same but you need to configure vlc using this

Capture mode: Video for Linux 2
Video: /dev/video0
Audio: plughw

Follow

Get every new post delivered to your Inbox.