According to [1] it is now possible:
$ ffmpeg -f dshow -i video=”USB2.0_Camera”:audio=”Microphone (USB Audio Device)” output.mkv
You can discover available device names by using
$ ffmpeg -list_devices true -f dshow -i dummy
and types that each supports via:
$ ffmpeg -list_options true -f dshow -i video=<video device>
And specify a type via:
The video options can be set with -r <framerate> -s <size>.
The audio options can be set with -channels <channels> -sample_size
<sample_size> -sample_rate <sample_rate>.
Example:
ffplay -f dshow -i video=screen-capture-recorder
Ffmpeg can also take directshow as input by creating an avisynth file (.avs file) that itself gets input from a graphedit file, which graphedit file exposes a pin of your capture source or any filter really, ex (“yo.avs”):
DirectShowSource(“push2.GRF”, fps=35, audio=False, framecount=1000000)
Also this note from [1] “The input string is in the format video=<video device name>:audio=<audio device name>. It is possible to have two separate inputs (like -f dshow -i audio=foo -f dshow -i video=bar) but my limited tests had shown a better synchronism when both were used in the same input.”
Pingback: ffmpeg screen capture directshow « Roger's woze
Pingback: ffmpeg capture audio windows « Roger's woze
Pingback: ffmpeg enumerate directshow « Roger's woze
Hi Roger,
Thanks for the info. Is it possible to do screencapture with dshow? You know how?
All the best,
Tim.
yeah see http://betterlogic.com/roger/2011/08/ffmpeg-screen-capture-directshow/
Pingback: FFmpeg on Windows | Devendra @ Work
I have a HDMI capture card, and the output combine Video pin and Audio pin together. Following is what ffmpeg shows when I check the available type of capture device:
[dshow @ 0033c3c0] DirectShow video device options
[dshow @ 0033c3c0] Pin “???”
[dshow @ 0033c3c0] min s=720×480 fps=59.9402 max s=720×480 fps=59.9402
[dshow @ 0033c3c0] min s=720×480 fps=29.97 max s=720×480 fps=29.97
[dshow @ 0033c3c0] min s=720×576 fps=50 max s=720×576 fps=50
[dshow @ 0033c3c0] min s=720×576 fps=25 max s=720×576 fps=25
[dshow @ 0033c3c0] min s=640×480 fps=59.9402 max s=640×480 fps=59.9402
[dshow @ 0033c3c0] min s=1920×1080 fps=29.97 max s=1920×1080 fps=29.97
[dshow @ 0033c3c0] min s=1920×1080 fps=25 max s=1920×1080 fps=25
[dshow @ 0033c3c0] min s=1920×1080 fps=24 max s=1920×1080 fps=24
[dshow @ 0033c3c0] min s=1280×720 fps=59.9402 max s=1280×720 fps=59.9402
[dshow @ 0033c3c0] min s=1280×720 fps=50 max s=1280×720 fps=50
[dshow @ 0033c3c0] Pin “Audio”
so far I can only capture [s=720x480 fps=59.9402 max s=720x480 fps=59.9402](-s and -r switch doesn’t seems to work) and I cannot capture audio pin. Any ideas?
@bbscool I think that means that your capture device needs “crossbar support” which ffmpeg doesn’t yet have. VLC does though I wonder if the two could merge somehow…
ok appears that you can work around the lack of crossbar support, see “troubleshooting” here: http://ffmpeg.org/trac/ffmpeg/wiki/DirectShow