ffmpeg录屏命令

2019-07-31  本文已影响0人  熊大_小咩

ffmpeg -f avfoundation -i 1 -r 30 out.yuv

-f:指定使用avfoundation采集数据

-i:指定从哪儿采集数据,他是一个文件索引号

-r:指定帧率 25流畅 60高清
出现错误

[AVFoundation input device @ 0x7fdb77c15080] Invalid device index
1: Input/output error

通过下面的命令查看一下 mac 上都有哪些设备

ffmpeg -f avfoundation -list_devices true -i ""
[AVFoundation input device @ 0x7f8a3bc04100] AVFoundation video devices:
[AVFoundation input device @ 0x7f8a3bc04100] [0] Capture screen 0
[AVFoundation input device @ 0x7f8a3bc04100] AVFoundation audio devices:
[AVFoundation input device @ 0x7f8a3bc04100] [0] Microphone (Pink Rear)
[AVFoundation input device @ 0x7f8a3bc04100] [1] Microphone (Pink Front)

-i原来我的采集数据 0才是屏幕

ffmpeg录音命令

ffmpeg -f avfoundation -i :0 out.wav
:0 代表音频设备

上一篇 下一篇

猜你喜欢

热点阅读