Page 14 of 17

Re: DirectShow Capture support

Posted: Thu May 16, 2013 4:01 pm
by achain
Hi,

Today I bought my Logicool HD Pro Webcam C920.
(note: Logicool is the name of Logitech in Japan).
After reading through this topic, I've tried following command with your
ffmpeg-20130514-git-56ba331-win64-static on Win7 x64:

Code: Select all

ffmpeg -s 640x480 -rtbufsize 100MB -f dshow -vcodec h264 -i video="Logicool HD Pro Webcam C920" -copyinkf -vcodec copy output.mp4
then I got this valid video file output (5.7 mb, 16 sec):
http://61.213.120.67/output.mp4

Can I say things went well?

Re: DirectShow Capture support

Posted: Wed May 29, 2013 11:02 pm
by rogerdpack
achain wrote:Hi,

Today I bought my Logicool HD Pro Webcam C920.
(note: Logicool is the name of Logitech in Japan).
After reading through this topic, I've tried following command with your
ffmpeg-20130514-git-56ba331-win64-static on Win7 x64:

Code: Select all

ffmpeg -s 640x480 -rtbufsize 100MB -f dshow -vcodec h264 -i video="Logicool HD Pro Webcam C920" -copyinkf -vcodec copy output.mp4
then I got this valid video file output (5.7 mb, 16 sec):
http://61.213.120.67/output.mp4

Can I say things went well?
wow that's awesome. I presume it doesn't work without copyinkf? Does anybody know what this command means/does or why it is needed here?

Re: DirectShow Capture support

Posted: Tue Dec 30, 2014 2:01 pm
by rogerdpack
I'm going to be doing some hacking on directshow soon [presumably crossbar capture to support analog input devices] any other features/requests I should look at, let me know here, soon!
-roger-

also if you want to try a build that has crossbar support let me know, I have one on my box

Re: DirectShow Capture support

Posted: Mon Jan 26, 2015 8:16 am
by rogerdpack
OK the dshow crossbar stuff has been merged, check it out, get back to me with any complaint :)

Re: DirectShow Capture support

Posted: Sun Feb 01, 2015 8:09 pm
by Zeranoe
rogerdpack wrote:OK the dshow crossbar stuff has been merged, check it out, get back to me with any complaint :)
Great work on this Roger and Ramiro.

I've made this topic a sticky because I consider DShow support to be almost complete in FFmpeg.

Re: DirectShow Capture support

Posted: Tue Mar 31, 2015 5:19 am
by sambul92
What's the commandline to capture C920 H264 and AAC streams muxed into MP4 without re-encoding or stream over web, while showing a small low res preview window?
-c copy "should" work for the former. No hardware to test it on here, though, GL!

In terms of preview windows,
The only way I can think of it to split it to an SDL out window, or split it to something outputting jpeg's and display the jpeg's back. Typically webcams can't render on both the preview and capture pins [?]

Re: DirectShow Capture support

Posted: Wed Apr 01, 2015 10:28 pm
by sambul92
I tested with C910 webcam, and -c or -codec option works well to capture mjpeg compressed video and PCM audio to mkv without transcoding. Couldn't test with c920 at the moment.

Code: Select all

ffmpeg -s 1280x720 -framerate 30 -vcodec mjpeg -rtbufsize 100MB -f dshow -i video="Logitech HD Pro Webcam C910":audio="Microphone (HD Pro Webcam C910)" -c copy L:\Video\C910.mkv
As to capturing video and still images for preview, I couldn't make C910 output them simultaneously, but still frames can be captured from video stream with T-splitter or parallel processing. And what's the command to list available formats for Still Image Capture pin?

Also, what's the proper command to list default webcam output formats for all pins? The command

Code: Select all

ffmpeg -f dshow -list_options true -i video="Logitech HD Pro Webcam C910"
lists ALL output options available, while in Linux the following command prints only defaults

Code: Select all

v4l2-ctl --get-fmt-video
Another thing that looks like Dshow bug is audio formats listing. Here is console output:

Code: Select all

ffmpeg -f dshow -list_options true -i audio="Microphone (HD Pro Webcam C910)"
[dshow @ 02ccc200] DirectShow audio only device options (from audio devices)
[dshow @ 02ccc200] Pin "Capture" (alternative pin name "Capture")
[dshow @ 02ccc200] min ch=1 bits=8 rate= 11025 max ch=2 bits=16 rate= 44100
Last message repeated 22 times
audio=Microphone (HD Pro Webcam C910): Immediate exit requested
It shows max 44.1khz sampling rate, and no output format. But VirtualDub gives a lot more detail audio output, maxes out at 96kHz, gives PCM audio format. AMCap maxes out at 48kHz audio. VirtualDub and Dshow video resolution lists for C910 match, of course Dshow names formats in Linux way. When I try to set -sample_rate 48000 for audio capture, the error pops up, but with -sample_rate 41100 it works OK.

Code: Select all

[dshow @ 02b381c0] Could not find audio only device with name [Microphone (HD Pro Webcam C910)] among source devices of type video.
video=Logitech HD Pro Webcam C910:audio=Microphone (HD Pro Webcam C910): Input/output error

Re: DirectShow Capture support

Posted: Thu Apr 02, 2015 5:47 pm
by sambul92
rogerdpack wrote:The only way I can think of it to split it to an SDL out window, or split it to something outputting jpeg's and display the jpeg's back.
I posted Webcam Stream Capture with Preview CDL examples here. I was looking for working CDL for quite awhile, so sure it will help novices. At the same time, CPU load at preview is pretty high due to rawvideo encoder either inefficiency or wrong settings, so do you have any feedback on this?

Re: DirectShow Capture support

Posted: Sun Apr 19, 2015 1:18 pm
by zamar24
I own several Logi webcams, and also feel that Dshow support is incomplete now, for example:

- no command to print only default webcam video, audio, and still image formats data

- no or unknown command to print list of supported still image formats

- the command to print available audio formats gives incomplete list of supported audio sampling rates, and no list of audio stream container formats

Is it possible to add such support to FFMpeg Dshow?

Re: DirectShow Capture support

Posted: Sun Apr 19, 2015 7:31 pm
by llogan
If you give/loan one of these devices to rogerdpack he may be able to implement these features. What say ye, roger?