It’s as simple as cool as linux… the “player” software VLC is also a recorder or a streaming-station 😀

vlc record webcam linux debian1

vlc record webcam linux debian2

vlc record webcam linux debian3

vlc record webcam linux debian4

vlc record webcam linux debian5

vlc record webcam linux debian6

vlc record webcam linux debian7

vlc record webcam linux debian8

you can try to automate this process:

This one-liner worked for me, with audio and video:

[cc lang=”bash” escaped=”true” width=”600″]
cvlc v4l2:// :input-slave=alsa:// :v4l-vdev=”/dev/video0″ :v4l-norm=3 :v4l-frequency=-1 :v4l-caching=300 :v4l-chroma=”” :v4l-fps=-1.000000 :v4l-samplerate=44100 :v4l-channel=0 :v4l-tuner=-1 :v4l-audio=-1 :v4l-stereo :v4l-width=480 :v4l-height=360 :v4l-brightness=-1 :v4l-colour=-1 :v4l-hue=-1 :v4l-contrast=-1 :no-v4l-mjpeg :v4l-decimation=1 :v4l-quality=100 –sout=”#transcode{vcodec=theo,vb=2000,fps=12,scale=0.67,acodec=vorb,ab=90,channels=1,samplerate=44100}:standard{access=file,mux=ogg,dst=output.ogg}”
[/cc]

You could also try this one:

[cc lang=”bash” escaped=”true” width=”600″]

cvlc v4l2:// :v4l-vdev=”/dev/video0″ :v4l-adev=”/dev/pcm” :v4l-norm=3 :v4l-frequency=-1 :v4l-caching=300 :v4l-chroma=”” :v4l-fps=-1.000000 :v4l-samplerate=44100 :v4l-channel=0 :v4l-tuner=-1 :v4l-audio=-1 :v4l-stereo :v4l-width=480 :v4l-height=360 :v4l-brightness=-1 :v4l-colour=-1 :v4l-hue=-1 :v4l-contrast=-1 :no-v4l-mjpeg :v4l-decimation=1 :v4l-quality=100 –sout=”#transcode{vcodec=theo,vb=2000,fps=12,scale=0.67,acodec=vorb,ab=90,channels=1,samplerate=44100}:standard{access=file,mux=ogg,dst=output.ogg}”
[/cc]

but modifying this examples failed for me 🙁

good webcams

ain’t cheap… one i can recommend (good video (not HD but almost) and sound (stereo-mic):

HD Pro Webcam C920

[cc lang=”bash” escaped=”true” width=”600″]
[ 6973.605554] usb 2-1.1: new high-speed USB device number 9 using ehci-pci
[ 6974.808734] usb 2-1.1: New USB device found, idVendor=046d, idProduct=082d
[ 6974.808741] usb 2-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=1
[ 6974.808746] usb 2-1.1: Product: HD Pro Webcam C920
[ 6974.808749] usb 2-1.1: SerialNumber: 2D7825AF
[ 6974.809337] uvcvideo: Found UVC 1.00 device HD Pro Webcam C920 (046d:082d)
[ 6974.810322] input: HD Pro Webcam C920 as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/input/input19
[ 6975.078553] usbcore: registered new interface driver snd-usb-audio
[/cc]

you can also try

ffmpeg

but is a little cumbersome and it failed me to install under debian linux:

[cc lang=”bash” escaped=”true” width=”600″]

ffmpeg: relocation error: /usr/local/lib/libswresample.so.1: symbol av_calloc, version LIBAVUTIL_54 not defined in file libavutil.so.54 with link time reference
Failed to read /etc/mplayer/mplayer.conf.local: No such file or directory
Warning unknown option include at line 177
MPlayer SVN-r37375 (C) 2000-2013 MPlayer Team
Can’t open joystick device /dev/input/js0: No such file or directory
Can’t init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing -.
Reading from stdin…

[/cc]

recording your webcam would then look like this:

[cc lang=”bash” escaped=”true” width=”600″]
ffmpeg -b 100K -an -f video4linux2 -s 320×240 -r 10 -i /dev/audio2 -i /dev/video0 -b 100K -f ogg – | mplayer – -idle -demuxer ogg
[/cc]

Installing Ffmpeg and mplayer on Debian GNU/Linux Version 8.0 (Jessie)

mplayer is easy:
[cc lang=”bash” escaped=”true” width=”600″]
apt-get update;
apt-get install mplayer;
[/cc]

Support » Installing Ffmpeg on Debian GNU/Linux Version 8.0 (Jessie)

For Asset Bank to be able to create thumbnails and previews for video and audio files Asset Bank uses Ffmpeg (http://ffmpeg.mplayerhq.hu).

The following instuctions explain how to install Ffmpeg from source (and so they require a compiler such as gcc). Please note:

Ffmpeg will be installed into /usr/local/bin
These instructions are specifically for version 8.0 (Jessie) of Debian GNU/Linux. Use these instructions instead if you are using another GNU/Linux distribution.

1. Configure APT to use the deb-multimedia repository

Note: the commands in this section must be run as root

1.1) Add the following to the bottom of /etc/apt/sources.list:

[cc lang=”bash” escaped=”true” width=”600″]

deb http://www.deb-multimedia.org jessie main non-free
deb-src http://www.deb-multimedia.org jessie main non-free
[/cc]

1.2) Refresh apt’s package database, by typing:

[cc lang=”bash” escaped=”true” width=”600″]

apt-get update
[/cc]

1.3) Allow apt to trust deb-multimedia’s key, by typing:

[cc lang=”bash” escaped=”true” width=”600″]
apt-get install deb-multimedia-keyring

[/cc]

1.4) Refresh apt’s package database again, by typing:

[cc lang=”bash” escaped=”true” width=”600″]
apt-get update
[/cc]

2. Remove ffmpeg Debian packge

Note: the commands in this section must be run as root

2.1) Remove the ffmpeg package, if it is installed, to avoid confusion caused by having two versions of ffmpeg installed and potential conflicts with the packages that will be installed in the next step:

[cc lang=”bash” escaped=”true” width=”600″]
apt-get remove ffmpeg
[/cc]

3. Install Libraries

Note: the commands in this section must be run as root

3.1) Install library packages and build tools:

[cc lang=”bash” escaped=”true” width=”600″]
apt-get install build-essential libmp3lame-dev libvorbis-dev libtheora-dev libspeex-dev yasm pkg-config libfaac-dev libopenjpeg-dev libx264-dev
[/cc]

4. Install Ffmpeg

Note: we recommend that the commands in this section are run as a non-root user (although they should still work if run as root)

4.1) Download and extract the ffmpeg source code:

[cc lang=”bash” escaped=”true” width=”600″]
mkdir software
cd software
wget http://ffmpeg.org/releases/ffmpeg-2.7.2.tar.bz2
tar xvjf ffmpeg-2.7.2.tar.bz2
[/cc]

4.2) Move into the source directory:

[cc lang=”bash” escaped=”true” width=”600″]
cd ffmpeg-2.7.2
[/cc]

4.3) Configure, build and install:

[cc lang=”bash” escaped=”true” width=”600″]
./configure –enable-gpl –enable-postproc –enable-swscale –enable-avfilter –enable-libmp3lame –enable-libvorbis –enable-libtheora –enable-libx264 –enable-libspeex –enable-shared –enable-pthreads –enable-libopenjpeg –enable-libfaac –enable-nonfree

make

sudo make install

[/cc]

4.4) Run

[cc lang=”bash” escaped=”true” width=”600″]
sudo /sbin/ldconfig
[/cc]

as root.

forget about:

[cc lang=”bash” escaped=”true” width=”600″]

apt-get -y remove QtCAM;
apt-get -y remove kino;
apt-get -y remove Shotcut;
apt-get -y remove Flowblade;
apt-get -y remove OpenShot;

apt-get -y purge QtCAM;
apt-get -y purge kino;
apt-get -y purge Shotcut;
apt-get -y purge Flowblade;
apt-get -y purge OpenShot;
apt-get -y autoremove;

[/cc]

Creditz:

https://www.assetbank.co.uk/support/documentation/install/ffmpeg-debian-squeeze/ffmpeg-debian-jessie/

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin