Webcam Streaming Desktop Recording on Linux for ubuntu or its destros

How to record your desktop and webcam, or stream them?

Here's the solution:

Go visit:

https://help.ubuntu.com/community/Webcam#VLC

Here's some key references:

VLC is neat

It's better to use the VLC GUI interface to operate.

3.2. VLC

3.2.1. Using the GUI

In VLC, choose 'Open capture device' from the file menu and enter the video and audio device files (see above) in video device name and audio device name, respectively. If you just want a 'mirror' (to see what the webcam is showing), click 'OK' and you're done. If you wish to record, tick off 'Stream/save' in the 'Advanced options' section. Click the settings button right next to it. Tick 'File' off under 'Outputs' and enter a filename. Encapsulation method can be left at the default (MPEG TS). Under 'Transcoding options', tick 'Audio codec' and 'Video codec'. These can also safely be left the defaults (obviously greater compression results in lower file sizes, so experiment). Click 'OK' in the Settings screen and

3.2.2. Using the Command Line

A simple test of just the video from your webcam can be done as follows. This assumes the webcam is installed as '/dev/video0'.

$ vlc v4l2:///dev/video0

If you wish to be able to quickly start a video session with your webcam, the resulting vlc command is printed in the Customize line at the bottom. You simply need to prepend 'vlc', e.g.


The recording instructions will similarly need to be appended. Copy the contents of the 'Stream Output MRL' box under 'Settings' and

To simple take a few snapshots, open the webcam without recording and choose 'Snapshot' under the 'Video' menu.



Those are also good.

Mplayer

ffmpeg (for main linux destros)

avconv for ubuntu 12.04+