R: Gstreamer dshowvideosrc

info at mbsoft.biz info at mbsoft.biz
Wed Dec 21 12:28:36 UTC 2022


Thank you very much. I did not know about mfvideosrc. It works perfectly now!

-----Messaggio originale-----
Da: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org> Per conto di Nirbheek Chauhan via gstreamer-devel
Inviato: mercoledì 21 dicembre 2022 07:36
A: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
Cc: Nirbheek Chauhan <nirbheek.chauhan at gmail.com>; info at mbsoft.biz
Oggetto: Re: Gstreamer dshowvideosrc

Hi,

Is this a USB camera? If so, you might want to use mfvideosrc instead of the deprecated dshowvideosrc. That element currently only exists to pull from dshow-only devices.

Cheers,
Nirbheek

On Tue, Dec 20, 2022 at 5:34 AM Maurizio via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
>
> Hi all,
>
>
>
> can someone help me on this?
>
>
>
> I want to capture a windows directshow device into an h264 matroska file.
>
>
>
> But this pipeline produce an empty file: (stall)
>
>
>
> gst-launch-1.0.exe -v dshowvideosrc device-name="Full HD 1080P PC 
> Camera" ! queue ! videoconvert ! nvh264enc preset=3 bitrate=1024 ! 
> h264parse ! matroskamux ! filesink location="e:\test.mkv
>
>
>
> if I replace dshowvideosrc with videotestsrc everything is ok.
>
>
>
> At this point we can think dshowvideosrc is broken….but if I put an 
> autovideosink I see my webcam without any problem
>
>
>
> gst-launch-1.0.exe -v dshowvideosrc device-name="Full HD 1080P PC 
> Camera" ! queue ! videoconvert ! autovideosink
>
> so, dshowvideosrc works with an autovideosink but it do not work when 
> encoding nvh264 or x264enc …
>
>
>
> this is the log …. It simply stalls
>
>
>
> Use Windows high-resolution clock, precision: 1 ms
>
> Setting pipeline to PAUSED ...
>
> Pipeline is live and does not need PREROLL ...
>
> Got context from element 'nvh264enc0': gst.cuda.context=context, 
> gst.cuda.context=(GstCudaContext)"\(GstCudaContext\)\ cudacontext1", 
> cuda-device-id=(uint)0;
>
> Got context from element 'nvh264enc0': gst.gl.GLDisplay=context, 
> gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplay\)\ gldisplay0";
>
> Pipeline is PREROLLED ...
>
> Setting pipeline to PLAYING ...
>
> /GstPipeline:pipeline0/GstDshowVideoSrc:dshowvideosrc0.GstPad:src: 
> caps = video/x-raw, format=(string)YUY2, width=(int)1920, 
> height=(int)1080, framerate=(fraction)5/1, 
> interlace-mode=(string)progressive
>
> /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = 
> video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, 
> framerate=(fraction)5/1, interlace-mode=(string)progressive
>
> /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw, 
> format=(string)YUY2, width=(int)1920, height=(int)1080, 
> framerate=(fraction)5/1, interlace-mode=(string)progressive
>
> /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps 
> = video/x-raw, width=(int)1920, height=(int)1080, 
> framerate=(fraction)5/1, format=(string)NV12, 
> interlace-mode=(string)progressive
>
> New clock: GstSystemClock
>
> /GstPipeline:pipeline0/GstNvH264Enc:nvh264enc0.GstPad:sink: caps = 
> video/x-raw, width=(int)1920, height=(int)1080, 
> framerate=(fraction)5/1, format=(string)NV12, 
> interlace-mode=(string)progressive
>
> /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps 
> = video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, 
> framerate=(fraction)5/1, interlace-mode=(string)progressive
>
> /GstPipeline:pipeline0/GstNvH264Enc:nvh264enc0.GstPad:src: caps = 
> video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, 
> level=(string)4, profile=(string)main, width=(int)1920, 
> height=(int)1080, pixel-aspect-ratio=(fraction)1/1, 
> framerate=(fraction)5/1, interlace-mode=(string)progressive, 
> colorimetry=(string)bt709, chroma-site=(string)mpeg2
>
> /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = 
> video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, 
> level=(string)4, profile=(string)main, width=(int)1920, 
> height=(int)1080, pixel-aspect-ratio=(fraction)1/1, 
> framerate=(fraction)5/1, interlace-mode=(string)progressive, 
> colorimetry=(string)bt709, chroma-site=(string)mpeg2
>
> Redistribute latency...
>
> /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = 
> video/x-h264, stream-format=(string)avc, alignment=(string)au, 
> level=(string)4, profile=(string)main, width=(int)1920, 
> height=(int)1080, pixel-aspect-ratio=(fraction)1/1, 
> framerate=(fraction)5/1, interlace-mode=(string)progressive, 
> colorimetry=(string)bt709, chroma-site=(string)mpeg2, 
> coded-picture-structure=(string)frame, chroma-format=(string)4:2:0, 
> bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, 
> parsed=(boolean)true, 
> codec_data=(buffer)014d4028ffe10019674d402895a01e0089f97016a0202028000
> 01f40000138842001000468ee3c80
>
> /GstPipeline:pipeline0/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:v
> ideo_0: caps = video/x-h264, stream-format=(string)avc, 
> alignment=(string)au, level=(string)4, profile=(string)main, 
> width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, 
> framerate=(fraction)5/1, interlace-mode=(string)progressive, 
> colorimetry=(string)bt709, chroma-site=(string)mpeg2, 
> coded-picture-structure=(string)frame, chroma-format=(string)4:2:0, 
> bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, 
> parsed=(boolean)true, 
> codec_data=(buffer)014d4028ffe10019674d402895a01e0089f97016a0202028000
> 01f40000138842001000468ee3c80
>
> /GstPipeline:pipeline0/GstMatroskaMux:matroskamux0.GstPad:src: caps = 
> video/x-matroska
>
> /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = 
> video/x-matroska
>
> Redistribute latency...
>
> /GstPipeline:pipeline0/GstMatroskaMux:matroskamux0.GstPad:src: caps = 
> video/x-matroska, streamheader=(buffer)< 
> 1a45dfa301000000000000144282896d6174726f736b61004287810242858102185380
> 6701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab8415
> 49a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ff
> ffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff
> 4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb0100000000
> 00001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a4
> 90cadaa687ecb334a5dda2b9994e5d6d202ad7b1830f42404489880000000000000000
> 4d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e
> 32312e32005741994753747265616d6572204d6174726f736b61206d75786572004461
> 88099ea91599e8faa81654ae6b0100000000000096ae010000000000008dd781018381
> 0173c5883bd5e112dde119e723e383840bebc200536e86566964656f00e00100000000
> 000025b0820780ba8204389a810255b0010000000000001055b9810155b1810155ba81
> 0155bb81018690565f4d504547342f49534f2f4156430063a2a8014d4028ffe1001967
> 4d402895a01e0089f97016a020202800001f40000138842001000468ee3c80 >
>
> /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = 
> video/x-matroska, streamheader=(buffer)< 
> 1a45dfa301000000000000144282896d6174726f736b61004287810242858102185380
> 6701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab8415
> 49a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ff
> ffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff
> 4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb0100000000
> 00001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007473a4
> 90cadaa687ecb334a5dda2b9994e5d6d202ad7b1830f42404489880000000000000000
> 4d80a54753747265616d6572206d6174726f736b616d75782076657273696f6e20312e
> 32312e32005741994753747265616d6572204d6174726f736b61206d75786572004461
> 88099ea91599e8faa81654ae6b0100000000000096ae010000000000008dd781018381
> 0173c5883bd5e112dde119e723e383840bebc200536e86566964656f00e00100000000
> 000025b0820780ba8204389a810255b0010000000000001055b9810155b1810155ba81
> 0155bb81018690565f4d504547342f49534f2f4156430063a2a8014d4028ffe1001967
> 4d402895a01e0089f97016a020202800001f40000138842001000468ee3c80 >
>
> 1000:00:0 / 99:99:99.



More information about the gstreamer-devel mailing list