Opened 7 years ago

Last modified 2 years ago

#5922 new defect

Can't access pin through DirectShow input

Reported by: ChocolateArmpits Owned by:
Priority: normal Component: avdevice
Version: git-master Keywords: dshow
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I'm trying to capture a dv stream using a firewire capture card. The Directshow device filter has two pins. First one is only a video stream (DV Vid Out), second is an interleaved video/audio (DV A/V Out). Using ffmpeg I can access only the first pin, pointing to the second returns an error.
Using GraphEdit I successfully accesed the second stream and played it back along with the audio. Had no problems in VLC either. This doesn't seem like a Directshow error or that of my capture card. Running 64bit compilation from Zeranoe on Windows 7.

DEVICES:

ffmpeg -list_devices true -f dshow -i dummy
ffmpeg version 3.1.4 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisyn
th --enable-bzlib --enable-libebur128 --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-libmodp
lug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --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-decklink --enable-zlib
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[dshow @ 000000000033a400] DirectShow video devices (some may be both video and audio devices)
[dshow @ 000000000033a400]  "Microsoft DV Camera and VCR"
[dshow @ 000000000033a400]     Alternative name "@device_pnp_\\?\avc#sony&dv-vcr&typ_4&id_0&dv#22715d0201460008#{65e8773d-8f56-11d
0-a3b9-00a0c9223196}\global"
[dshow @ 000000000033a400] DirectShow audio devices
[dshow @ 000000000033a400]  "Stereo Mix (VIA High Definition"
[dshow @ 000000000033a400]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Stereo Mix (VIA High Definition
"
dummy: Immediate exit requested

OPTIONS FOR THE CAPTURE DEVICE:

ffmpeg -loglevel trace -f dshow -list_options true -i video="Microsoft DV Camera and VCR"
ffmpeg version 3.1.4 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisyn
th --enable-bzlib --enable-libebur128 --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-libmodp
lug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --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-decklink --enable-zlib
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'trace'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'dshow'.
Reading option '-list_options' ... matched as AVOption 'list_options' with argument 'true'.
Reading option '-i' ... matched as input file with argument 'video=Microsoft DV Camera and VCR'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument trace.
Successfully parsed a group of options.
Parsing a group of options: input file video=Microsoft DV Camera and VCR.
Applying option f (force format) with argument dshow.
Successfully parsed a group of options.
Opening an input file: video=Microsoft DV Camera and VCR.
[dshow @ 000000000033a580] DirectShow video device options (from video devices)
[dshow @ 000000000033a580]  Pin "DV Vid Out" (alternative pin name "0")
[dshow @ 000000000033a580]   vcodec=dvvideo  min s=720x480 fps=29.97 max s=720x480 fps=29.97
[dshow @ 000000000033a580]   vcodec=dvvideo  min s=720x576 fps=25 max s=720x576 fps=25
[dshow @ 000000000033a580]  Pin "DV A/V Out" (alternative pin name "1")
[dshow @ 000000000033a580] Selecting pin DV Vid Out on video
video=Microsoft DV Camera and VCR: Immediate exit requested

ACCESS ERROR:

ffplay -loglevel trace -video_pin_name 1 -f dshow -i video="Microsoft DV Camera and VCR"
ffplay version 3.1.4 Copyright (c) 2003-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisyn
th --enable-bzlib --enable-libebur128 --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-libmodp
lug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --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-decklink --enable-zlib
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[dshow @ 000000000055f5a0] skipping pin "DV Vid Out" ("0") != requested "1"
[dshow @ 000000000055f5a0] Could not find output pin from video capture device.
video=Microsoft DV Camera and VCR: I/O error  0KB sq=    0B f=0/0

VERSION:

ffmpeg -version
ffmpeg version 3.1.4 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth
 --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-li
bbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplu
g --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-lib
opus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-l
ibtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --en
able-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil      55. 28.100 / 55. 28.100
libavcodec     57. 48.101 / 57. 48.101
libavformat    57. 41.100 / 57. 41.100
libavdevice    57.  0.101 / 57.  0.101
libavfilter     6. 47.100 /  6. 47.100
libswscale      4.  1.100 /  4.  1.100
libswresample   2.  1.100 /  2.  1.100
libpostproc    54.  0.100 / 54.  0.100

Attachments (1)

graphedit.png (31.3 KB ) - added by ChocolateArmpits 7 years ago.
GraphEdit filtergraph, successfully accessing the second pin.

Download all attachments as: .zip

Change History (4)

by ChocolateArmpits, 7 years ago

Attachment: graphedit.png added

GraphEdit filtergraph, successfully accessing the second pin.

comment:1 by Carl Eugen Hoyos, 7 years ago

Keywords: directshow 1394 dv interleaved removed

Is the issue you see reproducible with current FFmpeg?

comment:2 by ChocolateArmpits, 7 years ago

Compiled latest snapshot using MingW. Same problem.

ffmpeg -v 9 -loglevel 99 -f dshow -video_pin_name 1 -i video="Microsoft DV Camera and VCR" -codec copy -f null -
ffmpeg version N-82183-g6089c44 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.2 (GCC)
  configuration: --extra-ldflags=-L/usr/local/x86_64-w64-mingw32/lib --disable-ffprobe --disable-ffplay --disable-ffserver --prefi
x=/usr/local/x86_64-w64-mingw32 --disable-doc --target-os=mingw32 --arch=x86_64 --disable-debug --enable-memalign-hack --cross-pre
fix=x86_64-w64-mingw32-
  libavutil      55. 35.100 / 55. 35.100
  libavcodec     57. 65.100 / 57. 65.100
  libavformat    57. 57.100 / 57. 57.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 66.100 /  6. 66.100
  libswscale      4.  3.100 /  4.  3.100
  libswresample   2.  4.100 /  2.  4.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'dshow'.
Reading option '-video_pin_name' ... matched as AVOption 'video_pin_name' with argument '1'.
Reading option '-i' ... matched as input file with argument 'video=Microsoft DV Camera and VCR'.
Reading option '-codec' ... matched as option 'codec' (codec name) with argument 'copy'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'null'.
Reading option '-' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file video=Microsoft DV Camera and VCR.
Applying option f (force format) with argument dshow.
Successfully parsed a group of options.
Opening an input file: video=Microsoft DV Camera and VCR.
[dshow @ 00000000000d7360] skipping pin "DV Vid Out" ("0") != requested "1"
[dshow @ 00000000000d7360] Could not find output pin from video capture device.
video=Microsoft DV Camera and VCR: I/O error
ffmpeg -v 9 -loglevel 99 -list_options true -f dshow -i video="Microsoft DV Camera and VCR"
ffmpeg version N-82183-g6089c44 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.2 (GCC)
  configuration: --extra-ldflags=-L/usr/local/x86_64-w64-mingw32/lib --disable-ffprobe --disable-ffplay --disable-ffserver --prefi
x=/usr/local/x86_64-w64-mingw32 --disable-doc --target-os=mingw32 --arch=x86_64 --disable-debug --enable-memalign-hack --cross-pre
fix=x86_64-w64-mingw32-
  libavutil      55. 35.100 / 55. 35.100
  libavcodec     57. 65.100 / 57. 65.100
  libavformat    57. 57.100 / 57. 57.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 66.100 /  6. 66.100
  libswscale      4.  3.100 /  4.  3.100
  libswresample   2.  4.100 /  2.  4.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-list_options' ... matched as AVOption 'list_options' with argument 'true'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'dshow'.
Reading option '-i' ... matched as input file with argument 'video=Microsoft DV Camera and VCR'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file video=Microsoft DV Camera and VCR.
Applying option f (force format) with argument dshow.
Successfully parsed a group of options.
Opening an input file: video=Microsoft DV Camera and VCR.
[dshow @ 00000000000e6fe0] DirectShow video device options (from video devices)
[dshow @ 00000000000e6fe0]  Pin "DV Vid Out" (alternative pin name "0")
[dshow @ 00000000000e6fe0]   vcodec=dvvideo  min s=720x480 fps=29.97 max s=720x480 fps=29.97
[dshow @ 00000000000e6fe0]   vcodec=dvvideo  min s=720x576 fps=25 max s=720x576 fps=25
[dshow @ 00000000000e6fe0]  Pin "DV A/V Out" (alternative pin name "1")
[dshow @ 00000000000e6fe0] Selecting pin DV Vid Out on video
video=Microsoft DV Camera and VCR: Immediate exit requested

I also tried a 2015 June compile from Zeranoe, same issue.

comment:3 by Pysis, 2 years ago

Found this after these:

https://stackoverflow.com/questions/19113197/ffmpeg-directshow-capture-2-pins
https://github.com/FFmpeg/FFmpeg/blob/bc70684e74a185d7b80c8b80bdedda659cb581b8/libavdevice/dshow.c#L665
https://github.com/FFmpeg/FFmpeg/blob/bc70684e74a185d7b80c8b80bdedda659cb581b8/libavdevice/dshow.c#L639

I have a similar situation also on Windows using Cygwin:

> ffm -f dshow -list_options true -i video='JVC GR-DF550'
[dshow @ 000001eaf52b6080] DirectShow video device options (from video devices)
[dshow @ 000001eaf52b6080]  Pin "DV Vid Out" (alternative pin name "0")

[dshow @ 000001eaf52b6080]   vcodec=dvvideo  min s=720x480 fps=29.97 max s=720x480 fps=29.97
[dshow @ 000001eaf52b6080]  Pin "DV A/V Out" (alternative pin name "1")

video=JVC GR-DF550: Immediate exit requested
> ffplay -loglevel 400 -rtbufsize 702000k -f dshow -i video=(read):audio=(read)
read> JVC GR-DF550
read> JVC GR-DF550
Initialized direct3d renderer.
[dshow @ 00000262ff38a680] Selecting pin DV Vid Out on videof=0/0
[dshow @ 00000262ff38a680] Could not find audio only device with name [JVC GR-DF550] among source devices of type audio.
[dshow @ 00000262ff38a680] Searching for audio device within video devices for JVC GR-DF550
[dshow @ 00000262ff38a680] reusing previous graph capture filter... @device_pnp_\\?\avc#jvc&gr-df550&camcorder&dv#715c280803888000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
[dshow @ 00000262ff38a680] Could not find output pin from audio only capture device.
video=JVC GR-DF550:audio=JVC GR-DF550: I/O error
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

Then saw the parameter used here to try and select another pin:

> ffplay -loglevel trace -hide_banner -rtbufsize 702000k -video_pin_name 1 -f dshow -i video='JVC GR-DF550'
Initialized direct3d renderer.
[dshow @ 0000026c5795a4c0] skipping pin "DV Vid Out" ("0") != requested "1"
[dshow @ 0000026c5795a4c0] Could not find output pin from video capture device.
video=JVC GR-DF550: I/O error
> ffplay -loglevel trace -hide_banner -rtbufsize 702000k -video_pin_name 'DV A/V Out' -f dshow -i video='JVC GR-DF550'
Initialized direct3d renderer.
[dshow @ 000002b76890a4c0] skipping pin "DV Vid Out" ("0") != requested "DV A/V Out"
[dshow @ 000002b76890a4c0] Could not find output pin from video capture device.
video=JVC GR-DF550: I/O error
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

I can find it at least enumerating correctly:

> ffplay -loglevel debug -hide_banner -rtbufsize 702000k -video_pin_name '"1"' -f dshow -i video='JVC GR-DF550'
Initialized direct3d renderer.
[dshow @ 0000020cc475a4c0] skipping pin "DV Vid Out" ("0") != requested ""1""
[dshow @ 0000020cc475a4c0] skipping pin "DV A/V Out" ("1") != requested ""1""
[dshow @ 0000020cc475a4c0] Could not find output pin from video capture device.
video=JVC GR-DF550: I/O error
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

Tool info:

ffplay version 4.3.2-2021-02-27-full_build-www.gyan.dev Copyright (c) 2003-2021 the FFmpeg developers
  built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-shared --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100

VLC worked fine but I could not find any stream input information, only the output result:

Stream 1
  Codec: PCM S16 LE (s16l)
  Type: Audio
  Channels: Stereo
  Sample rate: 32000 Hz
  Bits per sample: 16

My camcorder shows correctly under "Imaging devices" in Windows Device Manager even when not playing video over a Firewire cable with the mini and larger cable end plugs.

Last edited 2 years ago by Pysis (previous) (diff)
Note: See TracTickets for help on using tickets.