【秒懂音视频开发】19视频录制01_命令行

本文详细介绍了如何在Windows和Mac系统下,利用命令行工具采集并录制摄像头的视频数据,包括设备选择、参数设置、帧率调整等,同时提到了YUV格式的特性及播放注意事项。
摘要由CSDN通过智能技术生成

本文的主要内容:演示如何利用命令行采集摄像头的视频数据。

Windows

dshow支持的设备

ffmpeg -f dshow -list_devices true -i dummy

输出结果大致如下所示。

DirectShow video devices (some may be both video and audio devices)
  "Integrated Camera"
DirectShow audio devices
  "麦克风阵列 (Realtek(R) Audio)"

Integrated Camera是我笔记本上自带的摄像头,等会我们就是通过这个摄像头采集视频数据。

dshow支持的参数

ffmpeg -h demuxer=dshow

输出结果大致如下所示。

dshow indev AVOptions:
  -video_size        <image_size> set video size given a string such as 640x480 or hd720.
  -pixel_format      <pix_fmt>    set video pixel format (default none)
  -framerate         <string>     set video frame rate
  -list_devices      <boolean>    list available devices (default false)
  -list_options      <boolean>    list available options for specified device (default false)
  • -video_size:分辨率
  • -pixel_format:像素格式
  • -framerate:帧率(每秒采集多少帧画面)
  • -list_devices:true表示列出dshow支持的所有设备
  • -list_options:true表示列出特定设备支持的所有参数

摄像头支持的参数

ffmpeg -f dshow -list_options true -i video="Integrated Camera"

输出结果大致如下所示。

DirectShow video device options (from video devices)
 Pin "捕获" (alternative pin name "捕获")
  vcodec=mjpeg  min s=1280x720 fps=30 max s=1280x720 fps=30
  vcodec=mjpeg  min s=320x180 fps=30 max s=320x180 fps=30
  vco
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值