【发布时间】:2018-01-04 01:32:15
【问题描述】:
我刚刚在 Mac HighSierra 上使用 home-brew 安装了 ffmpeg。我想记录在我的机器上运行的应用程序的内容(只有视频很好)(而不是我的整个桌面)。所以我尝试运行以下
davea$ ffmpeg -f gdigrab -framerate 25 -i title=DOSBox
ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Unknown input format: 'gdigrab'
但是正如你所看到的,我得到了这个
Unknown input format: 'gdigrab'
错误。使用 ffmpeg 仅针对特定应用程序在我的计算机上录制视频的正确方法是什么?
编辑:在 cmets 中使用 hte 建议,我得到了另一个错误...
davea$ ffmpeg -f avfoundation -list_devices true -i ""
ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
[AVFoundation input device @ 0x7fcbc160d0c0] AVFoundation video devices:
[AVFoundation input device @ 0x7fcbc160d0c0] [0] FaceTime HD Camera
[AVFoundation input device @ 0x7fcbc160d0c0] [1] Capture screen 0
[AVFoundation input device @ 0x7fcbc160d0c0] AVFoundation audio devices:
[AVFoundation input device @ 0x7fcbc160d0c0] [0] Built-in Microphone
: Input/output error
【问题讨论】:
-
你读过this吗?没有太多的经验,你的强制工具 (gdigrab) 对我来说只是 Windows。
-
你是在说 "ffmpeg -f avfoundation -list_devices true -i """ 包含 int aht 链接吗?如果是这样,我编辑了我的问题以包含导致的错误。
-
你只做了建议步骤的一半。使用获得的信息开始实拍。
-
我应该使用问题中的什么输出?我收到的“输入/输出错误”是否正常?
-
Input/output error是正常的,因为您的命令旨在仅列出可用设备。请阅读 sascha 提供的文章并参考avfoundation device documentation。
标签: macos video ffmpeg macos-high-sierra