DirectShow Capture support

Announcements made by users.
rogerdpack
Posts: 1876
Joined: Fri Aug 05, 2011 9:56 pm

Re: DirectShow Capture support

Post by rogerdpack » Tue May 12, 2015 4:23 am

zamar24 wrote:Hi rogerdpack,

I apologize for not checking on this thread progress more often, and will definitely answer all your questions a bit later.

Could you suggest, if its possible to overlay two C920 H264 dshow video sources into one MP4 file or MKV stream without transcoding? I know you have several overlay articles in your blog and also on using avisynth as dshow capture source to combine multiple sources, but the question of preserving original encoding to lower CPU usage AFAIK was never addressed. Is it possible in principle to overlay two H264 sources of any nature - like 2 webcams - with the same codec and stream parameters into one overlay H264 video file without transcoding, and how? Note that the webcams can vary framerate over time independently based on their firmware, unless a fixed framerate output is chosen in FFMpeg.

I'd assume it may be easier to capture raw streams from both webcams instead of H264, and then encode synced into one overlay MP4 file? But in practice USB2.0 bandwidth limits and C920 firmware don't allow to output [email protected] raw, only H264 encoded. Not sure if decoding 2 streams on the fly and then encoding to overlay is achievable based on high resulting CPU load. Of course its possible to record two H264 streams, and then decode and re-encode them offline into overlay, but it doesn't look like an elegant solution, and audio & video sync problems may occur, as both webcam streams must be synced. ;)
Unfortunately I cannot think of a way that is possible, though if you sent them in an mpeg stream or what not, you could send them separately and allow the final client to render one on top of the other. You could have FFmpeg decode the H264 encoded initial streams and then re encode [sounds awfully bad for cpu, but hey]. Or maybe use NVENC to re-encode them?

dalbani
Posts: 5
Joined: Wed Jul 08, 2015 6:18 pm

Logitech C930e

Post by dalbani » Wed Jul 08, 2015 6:30 pm

Hello,

Has anyone had any success with the Logitech C930?

There's a discussion on StackOverflow that matches with my own experience: it doesn't work (correctly).
Or at least we only get access to the raw and (hackish) H.264-in-MJPEG streams, but no standard H.264 stream.
And I'm not even talking of the SVC (simulcast) capabilities of the webcam.

Windows 8+ is supposed to support UVC 1.5 / SVC but I couldn't find out if / what had to be done to use it.

Thanks!

rogerdpack
Posts: 1876
Joined: Fri Aug 05, 2011 9:56 pm

Re: Logitech C930e

Post by rogerdpack » Thu Jul 09, 2015 4:30 pm

dalbani wrote:Hello,

Has anyone had any success with the Logitech C930?

There's a discussion on StackOverflow that matches with my own experience: it doesn't work (correctly).
Or at least we only get access to the raw and (hackish) H.264-in-MJPEG streams, but no standard H.264 stream.
And I'm not even talking of the SVC (simulcast) capabilities of the webcam.

Windows 8+ is supposed to support UVC 1.5 / SVC but I couldn't find out if / what had to be done to use it.

Thanks!
Are other apps (like skype) able to capture its h264 stream? It seems from that SO post that it's some kind of driver issue [?]

dalbani
Posts: 5
Joined: Wed Jul 08, 2015 6:18 pm

Re: Logitech C930e

Post by dalbani » Thu Jul 09, 2015 8:22 pm

rogerdpack wrote: Are other apps (like skype) able to capture its h264 stream? It seems from that SO post that it's some kind of driver issue [?]
Well, the way I see it, the C930e has almost been made for Skype (and Lync).
So, although I haven't tested myself and people have reported issues, it's supposed to work.

It is my understanding that the H.264-in-MJPEG hack is due to problems on the Windows platform.
But, apart from the "base" H.264 stream itself, I'm specifically interested in the SVC capabilities (i.e. getting multiple streams simultaneously off the webcam).

Here's a thread I've recently started on the Logitech forum: http://forums.logitech.com/t5/Webcams/H ... -p/1418590

zamar24
Posts: 9
Joined: Sun Apr 19, 2015 6:20 am

Re: DirectShow Capture support

Post by zamar24 » Fri Jul 10, 2015 5:27 pm

Hi Roger,

Since this thread was historically primarily devoted to Logitech C920 webcam support by FFMpeg, to avoid users mixup, is it possible to open a new thread for C930e support by FFMPeg Dshow, and move all related posts over there?
Last edited by zamar24 on Fri Jul 10, 2015 6:15 pm, edited 2 times in total.

rogerdpack
Posts: 1876
Joined: Fri Aug 05, 2011 9:56 pm

Re: DirectShow Capture support

Post by rogerdpack » Fri Jul 10, 2015 5:57 pm

Feel free to start a new thread.

zamar24
Posts: 9
Joined: Sun Apr 19, 2015 6:20 am

Re: DirectShow Capture support

Post by zamar24 » Fri Jul 10, 2015 6:16 pm


satsaeid
Posts: 1
Joined: Sun Jul 26, 2015 5:52 pm

Re: DirectShow Capture support

Post by satsaeid » Sun Jul 26, 2015 6:01 pm

hi , I want to capture my desktop + stereo mix + microphone
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I use this code :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Code: Select all

ffmpeg -f dshow -framerate 30 -loglevel warning -re -rtbufsize 1500M -i video="screen-capture-recorder":audio="Microphone (Realtek High Definition Audio)" -f dshow -i audio="virtual-audio-capturer" -filter_complex amix=inputs=2:duration=first -vcodec libx264 -threads 0 -crf 0 -preset ultrafast -tune zerolatency out.mp4
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and I get this output on my command-line :

Code: Select all

leaving aero on[dshow @ 0000000002f00f20] Stream #0: not enough frames to estimate rate; consider increasing probesize
Guessed Channel Layout for  Input Stream #0.1 : stereo
Guessed Channel Layout for  Input Stream #1.0 : stereo
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[dshow @ 0000000002f60f60] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (62% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (67% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (69% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
[dshow @ 0000000002f00f20] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (71% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (72% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (74% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (76% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
    Last message repeated 1 times
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (78% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
    Last message repeated 3 times
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (80% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
    Last message repeated 1 times
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (81% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
    Last message repeated 1 times
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (82% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (84% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
    Last message repeated 1 times
[dshow @ 0000000002f00f20] real-time buffer [screen-capture-recorder] [video input] too full or near too full (85% of size: 1500000000 [rtbufsize para
meter])! frame dropped!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
this is not important for me what do i do to correct that code :cry: please help me for capturing my Desktop well
thank you !

rogerdpack
Posts: 1876
Joined: Fri Aug 05, 2011 9:56 pm

Re: DirectShow Capture support

Post by rogerdpack » Tue Jul 28, 2015 12:15 am

does it create a file? It might be working "OK" as it were...

ngoral
Posts: 7
Joined: Mon Aug 24, 2015 4:06 pm

Re: DirectShow Capture support

Post by ngoral » Mon Aug 24, 2015 4:19 pm

I'm sorry for interrupting previous thread, but I have a problem with my (probably) crossbar device.
I'm using simple EasyCAP converter. So, FFmpeg could not cope with it.
Here's my command and it's output

Code: Select all

ffmpeg -loglevel debug -f dshow -list_options true -i video="OEM Device"

Code: Select all

ffmpeg version N-74593-g6638e4a Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
 --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-zlib
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 58.100 / 56. 58.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 37.100 /  5. 37.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level)
with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'dsho
w'.
Reading option '-list_options' ... matched as AVOption 'list_options' with argum
ent 'true'.
Reading option '-i' ... matched as input file with argument 'video=OEM Device'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file video=OEM Device.
Applying option f (force format) with argument dshow.
Successfully parsed a group of options.
Opening an input file: video=OEM Device.
[dshow @ 000000000033ff20] DirectShow video device options (from video devices)
[dshow @ 000000000033ff20]  Pin "╨Ч╨░╨┐╨╕╤Б╤М" (alternative pin name "2")
[dshow @ 000000000033ff20]   pixel_format=yuyv422  min s=720x576 fps=25 max s=72
0x576 fps=25
[dshow @ 000000000033ff20]   pixel_format=yuyv422  min s=720x480 fps=29.97 max s
=720x480 fps=29.97
[dshow @ 000000000033ff20]  Pin "AudioOut" (alternative pin name "3")
[dshow @ 000000000033ff20] Selecting pin ╨Ч╨░╨┐╨╕╤Б╤М on video
[dshow @ 000000000033ff20] Crossbar Switching Information for OEM Device:
[dshow @ 000000000033ff20] Unable to get crossbar is routed to from pin 0
[dshow @ 000000000033ff20] Could not setup CrossBar
video=OEM Device: Input/output error
It answers so whenever I set -crossbar_video_input_pin_number 2 (in this case it says it can't route pin 2).
I've tried to find smth using error text, but Google shows soucre files only. Doesn't I know smth I should know?:) Hope for your answer.

Post Reply