首页 文章

在Windows上使用ffmpeg,从Logitech c930e捕获硬件编码的H264流的命令是什么

提问于
浏览
3

我在Windows 8上使用ffmpeg,我想从Logitech c930e摄像头捕获内置的H264硬件编码流 . H264内置编码流是UVC 1.5接口的一部分 .

使用此命令我注意到c930e通过DirectShow暴露了两个视频引脚:0和1 .

ffmpeg -report -list_options true -f dshow -i video="Logitech Webcam C930e"

[dshow @ 0000000002d89360] Pin "Capture" (alternative pin name "0")

[dshow @ 0000000002d89360] Pin "Capture" (alternative pin name "1")

如果我选择Pin 0或1似乎并不重要,我仍然可以从Logitech c930e网络摄像头获取原始视频 . 在Linux上,假定的命令涉及v4l2,但这似乎不存在于http://ffmpeg.zeranoe.com/builds/的默认Windows版本的ffmpeg中

ffmpeg的默认Windows版本是否支持直接捕获UVC接口?

这是我在这次旅程中最接近的,但仍然不太正确:

ffmpeg -report -f dshow -i video="Logitech Webcam C930e" -s 1920x1080 -r 30 -video_pin_name 1 -vcodec H264 -c copy -f mp4 Logitechc930eFeed.mp4

As of April 17, 2015 I am still trying to figure this out and have two new pieces of info.

我在Logitech的网站上发现了这篇有趣的文章,指示用户将默认的Logitech驱动程序更改为通用USB视频设备驱动程序:https://support.logitech.com/en_us/article/Install-native-UVC-drivers-for-your-Logitech-webcam?product=a0qi00000069v0MAAQ#

我还发现我的C930e有一个较旧的固件(8.0.866),Logitech建议将固件更新到8.0.875以修复未指定的UVC H.264问题 .

所以现在我有了最新的固件,并在Windows 8.1上使用通用的“USB视频设备” .

ffmpeg -list_devices true -f dshow -i

这给出了这个输出:

ffmpeg version N-69608-g9dc45d1 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 54. 18.100 / 54. 18.100 libavcodec 56. 21.102 / 56. 21.102 libavformat 56. 19.100 / 56. 19.100 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 9.103 / 5. 9.103 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 [dshow @ 00000000045c9360] DirectShow video devices (some may be both video and audio devices) [dshow @ 00000000045c9360] "Logitech Webcam C930e" [dshow @ 00000000045c9360] Alternative name "@device_pnp_\\?\usb#vid_046d&pid_0843&mi_00#7&3693c0e6&1&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global" [dshow @ 00000000045c9360] DirectShow audio devices [dshow @ 00000000045c9360] "Microphone (Logitech Webcam C930e)" [dshow @ 00000000045c9360] Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{BB8BE70B-4DDC-465F-9247-86E6EC98D627}" dummy: Immediate exit requested

这个命令: ffmpeg -list_options true -f dshow -i video="Logitech Webcam C930e"

仍然给出这个输出: ffmpeg version N-69608-g9dc45d1 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 54. 18.100 / 54. 18.100 libavcodec 56. 21.102 / 56. 21.102 libavformat 56. 19.100 / 56. 19.100 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 9.103 / 5. 9.103 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 [dshow @ 0000000004469360] DirectShow video device options (from video devices) [dshow @ 0000000004469360] Pin "Capture" (alternative pin name "0") [dshow @ 0000000004469360] pixel_format=yuyv422 min s=640x480 fps=5 max s=640x480 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=640x480 fps=5 max s=640x480 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=160x120 fps=5 max s=160x120 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=160x120 fps=5 max s=160x120 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=176x144 fps=5 max s=176x144 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=176x144 fps=5 max s=176x144 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=320x180 fps=5 max s=320x180 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=320x180 fps=5 max s=320x180 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=320x240 fps=5 max s=320x240 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=320x240 fps=5 max s=320x240 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=352x288 fps=5 max s=352x288 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=352x288 fps=5 max s=352x288 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=424x240 fps=5 max s=424x240 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=424x240 fps=5 max s=424x240 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=480x270 fps=5 max s=480x270 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=480x270 fps=5 max s=480x270 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=640x360 fps=5 max s=640x360 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=640x360 fps=5 max s=640x360 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=800x448 fps=5 max s=800x448 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=800x448 fps=5 max s=800x448 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=800x600 fps=5 max s=800x600 fps=24 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=800x600 fps=5 max s=800x600 fps=24 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=848x480 fps=5 max s=848x480 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=848x480 fps=5 max s=848x480 fps=30 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=960x540 fps=5 max s=960x540 fps=15 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=960x540 fps=5 max s=960x540 fps=15 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=1024x576 fps=5 max s=1024x576 fps=15 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=1024x576 fps=5 max s=1024x576 fps=15 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=1280x720 fps=5 max s=1280x720 fps=10 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=1280x720 fps=5 max s=1280x720 fps=10 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=1600x896 fps=5 max s=1600x896 fps=7.5 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=1600x896 fps=5 max s=1600x896 fps=7.5 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=1920x1080 fps=5 max s=1920x1080 fps=5 [dshow @ 0000000004469360] pixel_format=yuyv422 min s=1920x1080 fps=5 max s=1920x1080 fps=5 [dshow @ 0000000004469360] vcodec=mjpeg min s=640x480 fps=5 max s=640x480 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=640x480 fps=5 max s=640x480 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=160x120 fps=5 max s=160x120 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=160x120 fps=5 max s=160x120 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=176x144 fps=5 max s=176x144 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=176x144 fps=5 max s=176x144 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=320x180 fps=5 max s=320x180 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=320x180 fps=5 max s=320x180 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=320x240 fps=5 max s=320x240 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=320x240 fps=5 max s=320x240 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=352x288 fps=5 max s=352x288 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=352x288 fps=5 max s=352x288 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=424x240 fps=5 max s=424x240 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=424x240 fps=5 max s=424x240 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=480x270 fps=5 max s=480x270 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=480x270 fps=5 max s=480x270 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=640x360 fps=5 max s=640x360 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=640x360 fps=5 max s=640x360 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=800x448 fps=5 max s=800x448 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=800x448 fps=5 max s=800x448 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=800x600 fps=5 max s=800x600 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=800x600 fps=5 max s=800x600 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=848x480 fps=5 max s=848x480 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=848x480 fps=5 max s=848x480 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=960x540 fps=5 max s=960x540 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=960x540 fps=5 max s=960x540 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=1024x576 fps=5 max s=1024x576 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=1024x576 fps=5 max s=1024x576 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=1280x720 fps=5 max s=1280x720 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=1280x720 fps=5 max s=1280x720 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=1600x896 fps=5 max s=1600x896 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=1600x896 fps=5 max s=1600x896 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=1920x1080 fps=5 max s=1920x1080 fps=30 [dshow @ 0000000004469360] vcodec=mjpeg min s=1920x1080 fps=5 max s=1920x1080 fps=30 [dshow @ 0000000004469360] Pin "Capture" (alternative pin name "1") video=Logitech Webcam C930e: Immediate exit requested

1 回答

  • 1

    谢谢,我可以通过您从Logitech提供的链接https://support.logitech.com/en_us/article/Install-native-UVC-drivers-for-your-Logitech-webcam?product=a0qi00000069v0MAAQ#解决我的问题 . 在我的情况下(我有一个C920网络摄像头,而不是C930e),在Windows 7 PC中,它可以与Logitech驱动程序配合使用,但在Windows 8.1计算机中失败了 .

    执行 ffmpeg -f dshow -list_options true -i video="Logitech HD Pro Webcam C920" 没有显示任何h264流 . 更改驱动程序后,摄像机名称在其名称中丢失了Logitech(仅"HD Pro Webcam C920"),但现在检测到h264流并且ffmpeg可以记录它 .

相关问题