需求描述
最近在做一个项目,需要拿到PC摄像头、麦克风和录屏进行推流,使用的是win10系统
步骤
配置环境
ffmpeg
环境: 官网下载,并配置好环境变量- 录屏环境:下载screen-capture-recorder并安装
使用ffmpeg推流
- 检测可用设备:
ffmpeg -list_devices true -f dshow -i dummy
, 结果如下
[dshow @ 000002bbd375c340] DirectShow video devices (some may be both video and audio devices)
[dshow @ 000002bbd375c340] "Integrated Webcam"
[dshow @ 000002bbd375c340] Alternative name "@device_pnp_\\?\usb#vid_1bcf&pid_2b98&mi_00#6&293e6d81&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
[dshow @ 000002bbd375c340] "screen-capture-recorder"
[dshow @ 0