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+

  • 相关阅读:
    报表选型应该知道的
    报表工具——开源还是商用
    地图报表怎么做?
    关于报表在移动端展现需你需要知道哪些?
    报表怎样实现滚动的公告效果?
    加速JDBC的快捷方法
    百万级分组大报表开发与呈现
    秒级展现的百万级大清单报表怎么做
    润乾集算器技术文档汇总
    报表使用相关知识及技巧汇总
  • 原文地址:https://www.cnblogs.com/spaceship9/p/3016547.html
Copyright © 2011-2022 走看看