我正在尝试使用 macOS 上的 FFmpeg 录制屏幕。
首先我运行这个命令:
ffmpeg -f avfoundation -list_devices true -i ''
输出为:
[AVFoundation indev @ 0x12ff058a0] AVFoundation video devices:
[AVFoundation indev @ 0x12ff058a0] [0] FaceTime HD Camera
[AVFoundation indev @ 0x12ff058a0] [1] Capture screen 0
[AVFoundation indev @ 0x12ff058a0] AVFoundation audio devices:
[AVFoundation indev @ 0x12ff058a0] [0] MacBook Pro Microphone
然后我运行这个命令:
ffmpeg -f avfoundation -i 0:0 -fps_mode passthrough output.mp4
并且有一个错误:
[avfoundation @ 0x150705610] Selected framerate (29.970030) is not supported by the device.
[avfoundation @ 0x150705610] Supported modes:
[avfoundation @ 0x150705610] 1920x1080@[15.000000 30.000000]fps
[avfoundation @ 0x150705610] 1280x720@[15.000000 30.000000]fps
[avfoundation @ 0x150705610] 1080x1920@[15.000000 30.000000]fps
[avfoundation @ 0x150705610] 1760x1328@[15.000000 30.000000]fps
[avfoundation @ 0x150705610] 640x480@[15.000000 30.000000]fps
[avfoundation @ 0x150705610] 1328x1760@[15.000000 30.000000]fps
[avfoundation @ 0x150705610] 1552x1552@[15.000000 30.000000]fps
删除-fps_mode passthrough
没有帮助。
如何修复?
像这样启动你的命令: