• 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+

  • 相关阅读:
    浅谈对java中锁的理解
    Spring 4 支持的 Java 8 特性
    【转】Java线程面试题 Top 50
    JVM知识点总览-中高级Java工程师面试必备
    [LeetCode] 195. Tenth Line 第十行
    [LeetCode] 281. Zigzag Iterator 之字形迭代器
    [LeetCode] 324. Wiggle Sort II 摆动排序 II
    [LeetCode] 280. Wiggle Sort 摆动排序
    [LeetCode] 167. Fraction to Recurring Decimal 分数转循环小数
    [LeetCode] 187. Repeated DNA Sequences 求重复的DNA序列
  • 原文地址:https://www.cnblogs.com/spaceship9/p/3016547.html
Copyright © 2020-2023  润新知