ffmpeg avfoundation(Mac OS X)捕获第二个屏幕桌面

时间:2016-08-01 11:47:05

标签: macos video ffmpeg

我使用的是控制台ffmpeg,如果我从第一台显示器捕获,那么一切都很好

  

./ ffmpeg -video_size 640x480 -framerate 30 -f avfoundation -capture_cursor 1 -capture_mouse_clicks 1 -i 1:0 -c:v libx264 -qp 0 -preset ultrafast capture.mp4

如果从第二个监视器尝试捕获,则进程挂起

  

./ ffmpeg -video_size 640x480 -framerate 30 -f avfoundation -capture_cursor 1 -capture_mouse_clicks 1 -i 2:0 -c:v libx264 -qp 0 -preset ultrafast capture.mp4

我的设备清单:

AVFoundation input device @ 0x7fc74141a0c0] AVFoundation video devices:
[AVFoundation input device @ 0x7fc74141a0c0] [0] HD-camera FaceTime (integrated)
[AVFoundation input device @ 0x7fc74141a0c0] [1] Capture screen 0
[AVFoundation input device @ 0x7fc74141a0c0] [2] Capture screen 1
[AVFoundation input device @ 0x7fc74141a0c0] AVFoundation audio devices:
[AVFoundation input device @ 0x7fc74141a0c0] [0] Built-in Input
[AVFoundation input device @ 0x7fc74141a0c0] [1] Boom2Device

但是如果我将输出格式从mp4替换为mkv,那么记录在第二台显示器上也是如此!如何修复这个错误?

0 个答案:

没有答案