Gstreamer dshowvideosrc

info at mbsoft.biz info at mbsoft.biz
Mon Dec 19 21:17:05 UTC 2022


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)014d4028ffe10019674d402895a01e0089f97016a020202800001f400
00138842001000468ee3c80

/GstPipeline:pipeline0/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:video_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)014d4028ffe10019674d402895a01e0089f97016a020202800001f400
00138842001000468ee3c80

/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)<
1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ff
ffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88
ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb
010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab
841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffff
ffffffffffff1549a966010000000000007473a490cadaa687ecb334a5dda2b9994e5d6d202a
d7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b61
6d75782076657273696f6e20312e32312e32005741994753747265616d6572204d6174726f73
6b61206d7578657200446188099ea91599e8faa81654ae6b0100000000000096ae0100000000
00008dd7810183810173c5883bd5e112dde119e723e383840bebc200536e86566964656f00e0
0100000000000025b0820780ba8204389a810255b0010000000000001055b9810155b1810155
ba810155bb81018690565f4d504547342f49534f2f4156430063a2a8014d4028ffe10019674d
402895a01e0089f97016a020202800001f40000138842001000468ee3c80 >

/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps =
video/x-matroska, streamheader=(buffer)<
1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ff
ffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88
ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb
010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab
841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffff
ffffffffffff1549a966010000000000007473a490cadaa687ecb334a5dda2b9994e5d6d202a
d7b1830f424044898800000000000000004d80a54753747265616d6572206d6174726f736b61
6d75782076657273696f6e20312e32312e32005741994753747265616d6572204d6174726f73
6b61206d7578657200446188099ea91599e8faa81654ae6b0100000000000096ae0100000000
00008dd7810183810173c5883bd5e112dde119e723e383840bebc200536e86566964656f00e0
0100000000000025b0820780ba8204389a810255b0010000000000001055b9810155b1810155
ba810155bb81018690565f4d504547342f49534f2f4156430063a2a8014d4028ffe10019674d
402895a01e0089f97016a020202800001f40000138842001000468ee3c80 >

1000:00:0 / 99:99:99.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221219/68bf0934/attachment-0001.htm>


More information about the gstreamer-devel mailing list