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+

  • 相关阅读:
    五分钟搞懂Vuex
    vue 背景图片 backgroundImage background-image vue的style方式绑定行内样式-background-image的方式等~
    VUE2.0 vue-cli构建项目中使用Less
    ES6如何引入图片
    Vue+Gojs实现流程图demo
    vue自定义指令要点
    vue cli中token验证
    linux服务器上配置多个svn仓库
    vue-cli(vue脚手架)超详细教程
    node学习第一天:nvm使用
  • 原文地址:https://www.cnblogs.com/spaceship9/p/3016547.html
Copyright © 2011-2022 走看看