[FFmpeg-user] Record H264 webcam with DirectShow

Aviv Hurvitz aviv.hurvitz at gmail.com
Fri Jul 28 20:06:01 EEST 2017


I’m on a Surface Pro 3 running Windows 10. Trying to record an mp4 from a
native H.264 stream.

The H.264 video sources are on the second “pin” and I suspect that’s the
problem. But the first and second pins have the same name, so I don’t know
how to specify them. I was able to record from the first “pin” by removing
the “-vcodech264”.
Here are commands:





>>>>>ffmpeg -list_options true -f dshow -i video="Microsoft LifeCam Front"



ffmpeg version N-86848-g03a9e6f Copyright (c) 2000-2017 the FFmpeg
developers

built with gcc 7.1.0 (GCC)

configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid
--enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc
--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-libopenh264
--enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--enable-libzimg --enable-lzma --enable-zlib

libavutil 55. 68.100 / 55. 68.100

libavcodec 57.102.100 / 57.102.100

libavformat 57. 76.100 / 57. 76.100

libavdevice 57. 7.100 / 57. 7.100

libavfilter 6. 95.100 / 6. 95.100

libswscale 4. 7.101 / 4. 7.101

libswresample 2. 8.100 / 2. 8.100

libpostproc 54. 6.100 / 54. 6.100

[dshow @ 0000000000df6ce0] DirectShow video device options (from video
devices)

[dshow @ 0000000000df6ce0] Pin "Capture" (alternative pin name "Capture")

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=640x360 fps=15 max
s=640x360 fps=30

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=640x480 fps=15 max
s=640x480 fps=30

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=480x270 fps=15 max
s=480x270 fps=30

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=424x240 fps=15 max
s=424x240 fps=30

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=320x240 fps=15 max
s=320x240 fps=30

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=320x180 fps=15 max
s=320x180 fps=30

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=160x120 fps=15 max
s=160x120 fps=30

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=848x480 fps=15 max
s=848x480 fps=30

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=1920x1080 fps=15 max
s=1920x1080 fps=30

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=1280x720 fps=15 max
s=1280x720 fps=30

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=960x540 fps=15 max
s=960x540 fps=30

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=2592x1944 fps=15 max
s=2592x1944 fps=15

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=2592x1728 fps=15 max
s=2592x1728 fps=15

[dshow @ 0000000000df6ce0] pixel_format=yuyv422 min s=1296x864 fps=15 max
s=1296x864 fps=30

[dshow @ 0000000000df6ce0] Pin "Capture" (alternative pin name "Capture")

[dshow @ 0000000000df6ce0] vcodec=h264 min s=1920x1080 fps=15 max
s=1920x1080 fps=30

[dshow @ 0000000000df6ce0] vcodec=h264 min s=1280x720 fps=15 max s=1280x720
fps=30

[dshow @ 0000000000df6ce0] vcodec=h264 min s=960x540 fps=15 max s=960x540
fps=30

[dshow @ 0000000000df6ce0] vcodec=h264 min s=848x480 fps=15 max s=848x480
fps=30

[dshow @ 0000000000df6ce0] vcodec=h264 min s=640x480 fps=15 max s=640x480
fps=30

[dshow @ 0000000000df6ce0] vcodec=h264 min s=640x360 fps=15 max s=640x360
fps=30

[dshow @ 0000000000df6ce0] vcodec=h264 min s=480x270 fps=15 max s=480x270
fps=30

[dshow @ 0000000000df6ce0] vcodec=h264 min s=424x240 fps=15 max s=424x240
fps=30

[dshow @ 0000000000df6ce0] vcodec=h264 min s=320x240 fps=15 max s=320x240
fps=30

[dshow @ 0000000000df6ce0] vcodec=h264 min s=320x180 fps=15 max s=320x180
fps=30

[dshow @ 0000000000df6ce0] vcodec=h264 min s=160x120 fps=15 max s=160x120
fps=30

video=Microsoft LifeCam Front: Immediate exit requested



>>>>ffmpeg -y -f dshow -video_size 640x480 -vcodec h264 -framerate 30
-report -rtbufsize 100M -i video="Microsoft LifeCam Front" -vcodec copy
-copyinkf out1.mp4



ffmpeg started on 2017-07-28 at 19:51:23

Report written to "ffmpeg-20170728-195123.log"

ffmpeg version N-86848-g03a9e6f Copyright (c) 2000-2017 the FFmpeg
developers

built with gcc 7.1.0 (GCC)

configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid
--enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc
--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-libopenh264
--enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--enable-libzimg --enable-lzma --enable-zlib

libavutil 55. 68.100 / 55. 68.100

libavcodec 57.102.100 / 57.102.100

libavformat 57. 76.100 / 57. 76.100

libavdevice 57. 7.100 / 57. 7.100

libavfilter 6. 95.100 / 6. 95.100

libswscale 4. 7.101 / 4. 7.101

libswresample 2. 8.100 / 2. 8.100

libpostproc 54. 6.100 / 54. 6.100

[dshow @ 00000000025a34c0] Could not RenderStream to connect pins

video=Microsoft LifeCam Front: I/O error


More information about the ffmpeg-user mailing list