我想使用 ffmpeg 进行视频录制 使用列表
ffmpeg -f avfoundation -list_devices true -i ""
是:
[AVFoundation input device @ 0x7f837dc0f180] AVFoundation video devices:
[AVFoundation input device @ 0x7f837dc0f180] [0] FaceTime HD Camera
[AVFoundation input device @ 0x7f837dc0f180] [1] Capture screen 0
[AVFoundation input device @ 0x7f837dc0f180] AVFoundation audio devices:
[AVFoundation input device @ 0x7f837dc0f180] [0] NoMachine Microphone Adapter
[AVFoundation input device @ 0x7f837dc0f180] [1] Super_input
[AVFoundation input device @ 0x7f837dc0f180] [2] BlackHole 16ch
[AVFoundation input device @ 0x7f837dc0f180] [3] Built-in Microphone
[AVFoundation input device @ 0x7f837dc0f180] [4] NoMachine Audio Adapter
我用于录制视频的命令是:
ffmpeg -f avfoundation -y -i "1:2" -r 12 -t 5 out.mov
运行良好!视频和音频都很好。
但是,它每运行两次就会挂起一次。第一次运行它时运行正常,第二次运行它时挂起,我需要使用Ctrl+C来停止它。第三次运行正常,第四次它挂起。内置终端和 iTerm2 都会发生这种情况。
挂机时的截图如下:
我的操作系统是 Mac Catalina。如果我知道如何解决它,那就太好了。