美文网首页
ffmpeg录屏命令

ffmpeg录屏命令

作者: 熊大_小咩 | 来源:发表于2019-07-31 07:26 被阅读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 代表音频设备

    相关文章

      网友评论

          本文标题:ffmpeg录屏命令

          本文链接:https://www.haomeiwen.com/subject/hfmarctx.html