mediafoundation: h264 encoder seg. fault
My pipeline is next:
gst-launch-1.0.exe videotestsrc ! "video/x-raw, width=1920, height=1088, framerate=60/1, format=RGBA" ! d3d11upload ! d3d11convert ! d3d11download ! mfh264device1enc bitrate=10240 ! h264parse ! matroskamux ! filesink location=123.mkv sync=1 -vv
after 30-60 seconds of encoding I have the next message:
Pipeline is PREROLLING ... Got context from element 'd3d11download0': gst.d3d11.device.handle=context, device=(GstD3D11Device)"\(GstD3D11Device\)\ d3d11device3", adapter=(int)0; /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, format=(string)RGBA, width=(int)1920, height=(int)1088, framerate=(fraction)60/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)RGBA, width=(int)1920, height=(int)1088, framerate=(fraction)60/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive /GstPipeline:pipeline0/GstD3D11Upload:d3d11upload0.GstPad:src: caps = video/x-raw(memory:D3D11Memory), format=(string)RGBA, width=(int)1920, height=(int)1088, framerate=(fraction)60/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive /GstPipeline:pipeline0/GstD3D11ColorConvert:d3d11colorconvert0.GstPad:src: caps = video/x-raw(memory:D3D11Memory), width=(int)1920, height=(int)1088, framerate=(fraction)60/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)NV12 /GstPipeline:pipeline0/GstD3D11Download:d3d11download0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1088, framerate=(fraction)60/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)NV12 /GstPipeline:pipeline0/GstMFH264Device1Enc:mfh264device1enc0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1088, framerate=(fraction)60/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)NV12 /GstPipeline:pipeline0/GstD3D11Download:d3d11download0.GstPad:sink: caps = video/x-raw(memory:D3D11Memory), width=(int)1920, height=(int)1088, framerate=(fraction)60/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)NV12 /GstPipeline:pipeline0/GstD3D11ColorConvert:d3d11colorconvert0.GstPad:sink: caps = video/x-raw(memory:D3D11Memory), format=(string)RGBA, width=(int)1920, height=(int)1088, framerate=(fraction)60/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive /GstPipeline:pipeline0/GstD3D11Upload:d3d11upload0.GstPad:sink: caps = video/x-raw, format=(string)RGBA, width=(int)1920, height=(int)1088, framerate=(fraction)60/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)RGBA, width=(int)1920, height=(int)1088, framerate=(fraction)60/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive /GstPipeline:pipeline0/GstMFH264Device1Enc:mfh264device1enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1088, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1088, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1088, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, level=(string)4.2, codec_data=(buffer)0164002affe1001a6764002aac2b603c011342000003000200000300f01b41108dc001000468ea8f0c /GstPipeline:pipeline0/GstMatroskaMux:matroskamux0.GstMatroskamuxPad:video_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)1920, height=(int)1088, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)60/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, level=(string)4.2, codec_data=(buffer)0164002affe1001a6764002aac2b603c011342000003000200000300f01b41108dc001000468ea8f0c /GstPipeline:pipeline0/GstMatroskaMux:matroskamux0.GstPad:src: caps = video/x-matroska /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock /GstPipeline:pipeline0/GstMatroskaMux:matroskamux0.GstPad:src: caps = video/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007673a490843e4da112592c201e8c9dd81519a78c2ad7b1830f424044898800000000000000004d80a74753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31372e302e31005741994753747265616d6572204d6174726f736b61206d7578657200446188087e95f511576b101654ae6b0100000000000096ae010000000000008dd7810183810173c5889fa3ac9f7077069b23e38383fe502a536e86566964656f00e00100000000000025b0820780ba8204409a810255b0010000000000001055b9810155b1810155ba810155bb81018690565f4d504547342f49534f2f4156430063a2a90164002affe1001a6764002aac2b603c011342000003000200000300f01b41108dc001000468ea8f0c > /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska, streamheader=(buffer)< 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000007673a490843e4da112592c201e8c9dd81519a78c2ad7b1830f424044898800000000000000004d80a74753747265616d6572206d6174726f736b616d75782076657273696f6e20312e31372e302e31005741994753747265616d6572204d6174726f736b61206d7578657200446188087e95f511576b101654ae6b0100000000000096ae010000000000008dd7810183810173c5889fa3ac9f7077069b23e38383fe502a536e86566964656f00e00100000000000025b0820780ba8204409a810255b0010000000000001055b9810155b1810155ba810155bb81018690565f4d504547342f49534f2f4156430063a2a90164002affe1001a6764002aac2b603c011342000003000200000300f01b41108dc001000468ea8f0c > 0:01:10.757130000 11324 0000013BBBF2D840 ERROR mfvideoenc gstmfvideoenc.cpp:527:gst_mf_video_enc_handle_frame:<mfh264device1enc0> Failed to process input ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error. Additional debug info: ../subprojects/gstreamer/libs/gst/base/gstbasesrc.c(3070): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: streaming stopped, reason error (-5) Execution ended after 0:01:09.607613000 0:01:10.817515000 11324 0000013BBBF2D840 ERROR mftransform gstmftransform.cpp:412:gst_mf_transform_process_output:<mftransform6> Couldn't create memory buffer Setting pipeline to NULL ... 0:01:10.851643000 11324 0000013BBBF2D840 ERROR mftransform gstmftransform.cpp:412:gst_mf_transform_process_output:<mftransform6> Couldn't create memory buffer Freeing pipeline ...
There is no problem with openh264enc
:
gst-launch-1.0.exe videotestsrc ! "video/x-raw, width=1920, height=1088, framerate=60/1, format=RGBA" ! d3d11upload ! d3d11convert ! d3d11download ! openh264enc bitrate=10240 ! h264parse ! matroskamux ! filesink location=123.mkv sync=1 -vv
I use gst-plugins-bad
master tree:
commit 3fdf25cc37797c52112c11b6f618523e3187b3c7 (HEAD -> master, origin/master, origin/HEAD) Author: Jan Schmidt <jan@centricular.com> Date: Mon May 25 01:49:00 2020 +1000