基于vlc进行摄像头推流的细节

Stream with DirectShow (Windows) 基于DirectShow的流(Windows)

Install your peripheral drivers

You need to install your peripherals under Windows with the appropriate drivers. Nothing else is necessary.

安装您的外围驱动程序

你需要给Windows下的外设安装适当的驱动程序。没有其他必要的事情。【注:遵循UVC的设备则无需安装驱动】


Stream unicast/multicast with VLC in command line

使用命令行基于vlc进行流单播/多播
% C:\Program Files\VideoLAN\VLC\vlc.exe -I rc --ttl 12 dshow:// vdev="VGA USB Camera" adev="USB Camera" size="640x480" --sout=#rtp{mux=ts,dst=239.255.42.12,port=5004}

Note: You either need to provide the full path to the vlc.exe executable or add its location to the Windows Path variable.

注意:你要么提供vlc.exe的全路径,要么将其所在位置添加到windows的path环境变量中。

  • -I rc is to activate the remote control interface (MS/DOS console) 激活远程控制接口(MS/ DOS控制台)
  • 12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers),
    你的IP数据包的TTL(生存时间)值(设为12,就意味着流将能够跨越11台路由器),
  • vdev="VGA USB Camera" is the name of the video peripheral that DirectShow will use (this is only an exemple),
    DirectShow将使用的视频外设的名称(这只是一个例子),
  • adev="USB Camera" is the name of the audio peripheral, 音频外设的名称
  • size="640x480" is the resolution (you can also put the standard size like subqcif (128x96), qsif (160x120), qcif

(176x144), sif (320x240), cif (352x288) or vga (640x480)).

    分辨率(你也可以设置标准尺寸,如subqcif(128 x96),qsif(160 x120),qcif (176 x144),sif(320 x240),cif(352 x288)或vga(640 x480))。


  • 239.255.42.12 is either:
    • the IP address of the machine you want to unicast to; 单播的IP地址
    • or the DNS name the machine you want to unicast to;  单播的DNS名称
    • or a multicast IP address.                   多播的IP地址

Stream to file(s) with VLC in command line

% C:\Path\To\vlc.exe -I rc dshow:// :dshow-vdev="Osprey-210 Video Device 1" :dshow-adev="Unbalanced 1 (Osprey-2X0)"  :dshow-caching=200 --sout="#duplicate{dst='transcode{vcodec=h264,vb=1260,fps=24,scale=1,width=640,height=480,acodec=mp4a,ab=96,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=C:\\Path\\To\\File-1.mp4}',dst='transcode{vcodec=h264,vb=560,fps=24,scale=1,width=427,height=320,acodec=mp4a,ab=96,channels=2,samplerate=44100}:std{access=file,mux=mp4,dst=C:\\Path\\To\\File-2.mp4}'}"
  • -I rc is to activate the remote control interface (MS/DOS console)
  • dshow://... configures your input capture card / settings
  • #duplicate{} multiple output configurations
  • transcode{} video/audio codec settings  视频/音频编解码设置
  • std{} output/muxer settings

其他参考链接:
https://wiki.videolan.org/Documentation:Streaming_HowTo/Stream_from_Encoding_Cards_and_Other_Capture_Devices/#Stream_with_DirectShow_.28Windows.29

https://wiki.videolan.org/Knowledge_Base

https://wiki.videolan.org/Documentation:Play_HowTo
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小帆别吃糖

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值