zoukankan      html  css  js  c++  java
  • 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 once again in the main webcam screen (Video4linux). If you want to have more control, you can access several settings, including resolution, by clicking the Advanced options button. 

    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. 

    vlc v4l2:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/audio2" :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=640 :v4l-height=480 :v4l-brightness=-1 :v4l-colour=-1 :v4l-hue=-1 :v4l-contrast=-1 :no-v4l-mjpeg :v4l-decimation=1 :v4l-quality=100

    The recording instructions will similarly need to be appended. Copy the contents of the 'Stream Output MRL' box under 'Settings' and change ":sout=" to "--sout " and append it to your vlc command:, e.g.

    vlc v4l2:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/audio2" :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=640 :v4l-height=480 :v4l-brightness=-1 :v4l-colour=-1 :v4l-hue=-1 :v4l-contrast=-1 :no-v4l-mjpeg :v4l-decimation=1 :v4l-quality=100 --sout "#transcode{vcodec=mp1v,vb=1024,scale=1,acodec=mpga,ab=192,channels=2}:duplicate{dst=std{access=file,mux=mpeg1,dst=/tmp/test.mpg}}"

    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+

  • 相关阅读:
    VB程序破解常用函数
    去VB程序NAG窗口方法-4C法
    error LNK2005: _DllMain@12 已经在 XXXX.obj 中定义
    汇编中的test和cmp指令
    OD保存修改后的数据到EXE
    C++ 异常捕获 try 和 __try的区别
    CListCtrl选中行
    WindowsAPI解析IAT地址
    Usaco 4.3.1 Buy Low, Buy Lower 逢低吸纳详细解题报告
    全国青少年信息学奥林匹克分区联赛(N)竞赛大纲
  • 原文地址:https://www.cnblogs.com/spaceship9/p/3016547.html
Copyright © 2011-2022 走看看