【问题标题】:Can't list input devices ffmpeg linux无法列出输入设备ffmpeg linux
【发布时间】:2020-08-12 00:13:19
【问题描述】:

在 Windows 上,我可以这样做来列出输入设备:

ffmpeg -list_devices true -f dshow -i dummy

在 Linux 上,我尝试做这样的事情:

ffmpeg -list_devices true -f <x11grab/avfoundation>

我得到一个错误(我还尝试了来自here 的最新 git 构建):

ffmpeg version n4.2.4 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.1.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Unrecognized option 'list_devices'.
Error splitting the argument list: Option not found

如何列出我的输入设备?

【问题讨论】:

    标签: ffmpeg


    【解决方案1】:

    avfoundation 仅适用于 Apple 设备。 x11grab 用于捕获 X Window 服务器,没有可用的 list_devices 选项。

    【讨论】:

    • 那么有没有办法列出我的设备?
    • 哪些设备?哪个界面?
    • 我只是想列出我的输入设备,例如。麦克风
    • 每个输入设备都由一些特定的接口控制。 Linux上的麦克风将使用pulseaudio进行接口,尽管可能有其他的。网络摄像头通常会使用 video4linux 进行接口。 x11grab 通常捕获桌面 GUI 窗口。 avfoundation 仅适用于 Mac。 dshow 的 list_devices 可以在 Windows 上运行,因为 Windows 具有用于外部媒体设备的统一接口。
    • 啊,好的,谢谢。由于您的解释,我在文档中找到了一个帮助更多的页面! ffmpeg.org/ffmpeg-devices.html#pulse
    【解决方案2】:

    请看一下Pulse Audio:

    https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/Samples/AsyncDeviceList/

    示例: pactl list sources

    使用 alsa 的其他替代方案:

    /proc/asound/cards
    /proc/asound/devices
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-21
      • 1970-01-01
      • 2017-01-22
      • 2013-10-22
      • 1970-01-01
      • 2011-03-21
      • 2019-11-14
      • 2014-01-23
      相关资源
      最近更新 更多