ishmael1985 / gstreamer-media-SDK

GNU Lesser General Public License v2.1
14 stars 5 forks source link

mpeg2 encode #14

Closed mort1k closed 6 years ago

mort1k commented 6 years ago

Hi, i try transcode mpeg4 stream to mpeg2 stream

udpsrc uri=udp://239.255.3.56:1234 buffer-size=120000 ! tsdemux name=demux 
demux. ! decodebin name=v1 ! mfxvpp deinterlace-mode=1  ! video/x-raw,framerate=25/1 ! mfxmpeg2enc preset=2 gop-size=50  adaptive-i=1 rate-control=1 bitrate=4000 ! mpegvideoparse ! "video/mpeg" ! queue ! mux. 
demux. ! queue max-size-buffers=1200 max-size-buffers=0 max-size-time=0 ! decodebin name=a1 ! audioconvert ! audioresample ! fdkaacenc ! aacparse ! "audio/mpeg"  ! mux. 
mpegtsmux name=mux ! udpsink host=239.255.3.220 port=1234

and have wrong image type:

0:00:04.315973104 11445      0x1ac7ad0 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0
0:00:06.118422811 11445      0x1ac7ad0 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0
0:00:08.413019970 11445      0x1ac7ad0 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0
0:00:10.140447530 11445      0x1ac7ad0 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0

mfxmpeg2enc work only with deinterlaced stream?

ishmael1985 commented 6 years ago

mfxmpeg2enc should have no issues at all encoding interlaced streams as well since it does automatic VPP deinterlacing of interlaced streams within the plugin itself. For the video decode part of your pipeline, you could try to be more explicit, and remove the framerate capsfilter, i.e. ... ! tsdemux name=demux demux. ! mpegvideoparse ! mfxdecode ! mfxmpeg2enc ! ....

ishmael1985 commented 6 years ago

@mort1k, all good now?

mort1k commented 6 years ago

Hi, no

gst-launch-1.0 -v --gst-debug=3 
udpsrc uri=udp://239.255.3.56:1234 buffer-size=120000 ! tsdemux name=demux 
demux. ! h264parse ! mfxdecode name=v1 ! mfxvpp deinterlace-mode=12 ! mfxmpeg2enc ! **mpegvideoparse** ! queue ! mux. 
demux. ! queue ! mpegaudioparse ! queue ! mux. 
mpegtsmux name=mux ! udpsink host=239.255.3.220 port=1234
377540 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0
0:00:03.153744113 12782      0x1377540 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0

without mpegvideoparse after mfxmpeg2enc get error: mfx gstmfxencoder.c:938:gst_mfx_encoder_start: Incompatible video params detected 5

Setting pipeline to PAUSED ...
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Pipeline is live and does not need PREROLL ...
0:00:00.017405657 12805      0x27f5a40 WARN               structure gststructure.c:1831:priv_gst_structure_append_to_gstring: No value transform to serialize field 'gst.mfx.Aggregator' of type 'GstMfxTaskAggregator'
Got context from element 'mfxencmpeg2-0': gst.mfx.Aggregator=context, gst.mfx.Aggregator=(GstMfxTaskAggregator)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.610001204 12805      0x277ded0 WARN                 default descriptions.c:741:format_info_get_desc: Unexpected MPEG-1 layer in audio/mpeg, mpegversion=(int)1
0:00:00.633821694 12805      0x277ded0 FIXME           videodecoder gstvideodecoder.c:928:gst_video_decoder_drain_out:<v1> Sub-class should implement drain()
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1
0:00:00.634063959 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/mpeg, mpegversion=(int)1
0:00:00.634104195 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
/GstPipeline:pipeline0/GstMpegAudioParse:mpegaudioparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1
0:00:00.645025294 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 1015 will be dropped
0:00:00.645055133 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
0:00:00.645062001 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
0:00:00.656132726 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 885 will be dropped
0:00:00.656162333 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
0:00:00.656169075 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
0:00:00.656178224 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 239 will be dropped
0:00:00.656202306 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
0:00:00.656207015 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
0:00:00.679074509 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 275 will be dropped
0:00:00.679104605 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
0:00:00.679111818 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
0:00:00.703254796 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 293 will be dropped
0:00:00.703286110 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
0:00:00.703292567 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 5 will be dropped
/GstPipeline:pipeline0/GstMpegAudioParse:mpegaudioparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)1, parsed=(boolean)true
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)1, parsed=(boolean)true
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)1, parsed=(boolean)true
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:sink_66: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)1, parsed=(boolean)true
0:00:01.081699182 12805      0x277ded0 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 346 will be dropped
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, pixel-aspect-ratio=(fraction)16/11, width=(int)704, height=(int)576, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)main, level=(string)3, codec_data=(buffer)014d401effe1001a274d401e9a62016048b04420a0a0a800000300080000030194a001000428ee3c80
0:00:01.094891609 12805      0x277ded0 FIXME           videodecoder gstvideodecoder.c:928:gst_video_decoder_drain_out:<v1> Sub-class should implement drain()
/GstPipeline:pipeline0/GstMfxDec:v1.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, pixel-aspect-ratio=(fraction)16/11, width=(int)704, height=(int)576, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)main, level=(string)3, codec_data=(buffer)014d401effe1001a274d401e9a62016048b04420a0a0a800000300080000030194a001000428ee3c80
/GstPipeline:pipeline0/GstMfxDec:v1.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)704, height=(int)576, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)16/11, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxPostproc:mfxpostproc0.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)704, height=(int)576, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)16/11, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)25/1
0:00:01.098877484 12805      0x277ded0 WARN                     mfx gstmfxencoder.c:938:gst_mfx_encoder_start: Incompatible video params detected 5
/GstPipeline:pipeline0/GstMfxEncMpeg2:mfxencmpeg2-0.GstPad:sink: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)704, height=(int)576, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)16/11, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxPostproc:mfxpostproc0.GstPad:sink: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)704, height=(int)576, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)16/11, chroma-site=(string)jpeg, colorimetry=(string)bt601, framerate=(fraction)25/1
0:00:01.423971383 12805      0x277ded0 WARN                GST_PADS gstpad.c:4109:gst_pad_peer_query:<mfxencmpeg2-0:src> could not send sticky events
/GstPipeline:pipeline0/GstMfxEncMpeg2:mfxencmpeg2-0.GstPad:src: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)704, height=(int)576, pixel-aspect-ratio=(fraction)16/11, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg
0:00:01.424054050 12805      0x277ded0 WARN                 basesrc gstbasesrc.c:2939:gst_base_src_loop:<udpsrc0> error: Internal data stream error.
0:00:01.424074365 12805      0x277ded0 WARN                 basesrc gstbasesrc.c:2939:gst_base_src_loop:<udpsrc0> error: streaming stopped, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data stream error.
Additional debug info:
ishmael1985 commented 6 years ago

I don't think adi-scd option works in Windows. Try mfxvpp deinterlace-mode=bob|adi and remove mpegvideoparse in your pipeline. I see something that shouldn't happen in the output: /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, pixel-aspect-ratio=(fraction)16/11, width=(int)704, height=(int)576, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)main, level=(string)3, codec_data=(buffer)014d401effe1001a274d401e9a62016048b04420a0a0a800000300080000030194a001000428ee3c80 The stream-format should be byte-stream, not avc, since MFX can only interpret a byte stream format. Something's up with h264parse here, as mfxdecode forces sinkpad caps to be byte-stream for H264 / HEVC.

mort1k commented 6 years ago

pipeline worked with transcode from h264 to deinterlaced h264:

gst-launch-1.0 -v --gst-debug=3 udpsrc uri=udp://239.255.2.115:1234 buffer-size=120000 ! tsparse ! tsdemux name=demux 
demux. ! h264parse ! mfxdecode name=v1 ! mfxvpp deinterlace-mode=12   ! mfxh264enc preset=3 gop-size=50  adaptive-i=1 rate-control=3 bitrate=4500  ! h264parse  ! queue ! mux. 
demux. ! queue max-size-buffers=1200 max-size-buffers=0 max-size-time=0 ! mpegaudioparse ! decodebin name=a1 ! audioconvert ! audioresample ! fdkaacenc ! aacparse ! queue  ! mux.
mpegtsmux name=mux ! udpsink host=239.255.3.220 port=1234
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4, codec_data=(buffer)01640028ffe1004c67640028ad88249fad4910493f5a9220927eb524613d759248c27aeb249184f5d6492217ae4fffffffffd7aeb5c21ffffffffff93fff27d594078044fde0284040407c00000fa000030d425001000568ff311211
/GstPipeline:pipeline0/GstMfxDec:v1.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4, codec_data=(buffer)01640028ffe1004c67640028ad88249fad4910493f5a9220927eb524613d759248c27aeb249184f5d6492217ae4fffffffffd7aeb5c21ffffffffff93fff27d594078044fde0284040407c00000fa000030d425001000568ff311211
0:00:01.311088460  1260      0x10bb1e0 FIXME           videodecoder gstvideodecoder.c:928:gst_video_decoder_drain_out:<v1> Sub-class should implement drain()
/GstPipeline:pipeline0/GstMfxDec:v1.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxPostproc:mfxpostproc0.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxEncH264:mfxench264-0.GstPad:sink: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxPostproc:mfxpostproc0.GstPad:sink: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxEncH264:mfxench264-0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstH264Parse:h264parse1.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true
/GstPipeline:pipeline0/GstH264Parse:h264parse1.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:sink_65: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true
/GstPipeline:pipeline0/GstH264Parse:h264parse1.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:sink_65: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, profile=(string)high, level=(string)4
0:00:01.841644158  1260      0x10bb370 FIXME               basesink gstbasesink.c:3144:gst_base_sink_default_event:<udpsink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0330001c10000e042f00c050448444d5688040ffffcfc1be041f00a050848444d56ff1b443f0fe042f0060a047275000047d3a631 >
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0330001c10000e042f00c050448444d5688040ffffcfc1be041f00a050848444d56ff1b443f0fe042f0060a047275000047d3a631 >

but if change mfxh264enc to mfxmpeg2enc i get:

0:00:00.799080802  1283      0x2354c00 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 43 will be dropped
0:00:00.811850620  1283      0x2354c00 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 66494 will be dropped
0:00:00.811882210  1283      0x2354c00 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 6 SEI, Size: 43 will be dropped
0:00:00.946984182  1283      0x2354c00 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 10869 will be dropped
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4, codec_data=(buffer)01640028ffe1004c67640028ad88249fad4910493f5a9220927eb524613d759248c27aeb249184f5d6492217ae4fffffffffd7aeb5c21ffffffffff93fff27d594078044fde0284040407c00000fa000030d425001000568ff311211
/GstPipeline:pipeline0/GstMfxDec:v1.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4, codec_data=(buffer)01640028ffe1004c67640028ad88249fad4910493f5a9220927eb524613d759248c27aeb249184f5d6492217ae4fffffffffd7aeb5c21ffffffffff93fff27d594078044fde0284040407c00000fa000030d425001000568ff311211
0:00:01.038192291  1283      0x2354c00 FIXME           videodecoder gstvideodecoder.c:928:gst_video_decoder_drain_out:<v1> Sub-class should implement drain()
/GstPipeline:pipeline0/GstMfxDec:v1.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxPostproc:mfxpostproc0.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
0:00:01.041980120  1283      0x2354c00 WARN                     mfx gstmfxencoder.c:938:gst_mfx_encoder_start: Incompatible video params detected 5
/GstPipeline:pipeline0/GstMfxEncMpeg2:mfxencmpeg2-0.GstPad:sink: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxPostproc:mfxpostproc0.GstPad:sink: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxEncMpeg2:mfxencmpeg2-0.GstPad:src: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstMpegvParse:mpegvparse0.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
0:00:01.597771974  1283      0x2354c00 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 7
/GstPipeline:pipeline0/GstMpegvParse:mpegvparse0.GstPad:src: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)000001b37804383300002148000001b5144a00010200, profile=(string)main, level=(string)high
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)000001b37804383300002148000001b5144a00010200, profile=(string)main, level=(string)high
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)000001b37804383300002148000001b5144a00010200, profile=(string)main, level=(string)high
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:sink_65: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)000001b37804383300002148000001b5144a00010200, profile=(string)main, level=(string)high
0:00:01.598122764  1283      0x2354ca0 FIXME               basesink gstbasesink.c:3144:gst_base_sink_default_event:<udpsink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308a00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0290001c10000e042f00c050448444d5688040ffffcfc02e041f0000fe042f0060a04727500000739f8ac >
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308a00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0290001c10000e042f00c050448444d5688040ffffcfc02e041f0000fe042f0060a04727500000739f8ac >
0:00:03.623265391  1283      0x2354c00 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0
0:00:05.381400523  1283      0x2354c00 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0
0:00:05.591430811  1283      0x2354c00 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0

pipeline and output with added caps byte-stream:

gst-launch-1.0 -v --gst-debug=3 udpsrc uri=udp://239.255.2.115:1234 buffer-size=120000 ! tsparse ! tsdemux name=demux 
demux. ! h264parse ! "video/x-h264, stream-format=byte-stream, alignment=au" ! mfxdecode name=v1 ! mfxvpp deinterlace-mode=12   ! mfxmpeg2enc preset=3 gop-size=50  adaptive-i=1 rate-control=3 bitrate=4500  ! mpegvideoparse  ! queue ! mux. 
demux. ! queue max-size-buffers=1200 max-size-buffers=0 max-size-time=0 ! mpegaudioparse ! decodebin name=a1 ! audioconvert ! audioresample ! fdkaacenc ! aacparse ! queue  ! mux.
mpegtsmux name=mux ! udpsink host=239.255.3.220 port=1234
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/GstMfxDec:v1.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4
0:00:01.531881641  1353      0x24a6990 FIXME           videodecoder gstvideodecoder.c:928:gst_video_decoder_drain_out:<v1> Sub-class should implement drain()
/GstPipeline:pipeline0/GstMfxDec:v1.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxPostproc:mfxpostproc0.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
0:00:01.535554680  1353      0x24a6990 WARN                     mfx gstmfxencoder.c:938:gst_mfx_encoder_start: Incompatible video params detected 5
/GstPipeline:pipeline0/GstMfxEncMpeg2:mfxencmpeg2-0.GstPad:sink: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxPostproc:mfxpostproc0.GstPad:sink: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxEncMpeg2:mfxencmpeg2-0.GstPad:src: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstMpegvParse:mpegvparse0.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstMpegvParse:mpegvparse0.GstPad:src: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)000001b37804383300002148000001b5144a00010200, profile=(string)main, level=(string)high
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)000001b37804383300002148000001b5144a00010200, profile=(string)main, level=(string)high
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)000001b37804383300002148000001b5144a00010200, profile=(string)main, level=(string)high
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:sink_65: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true, codec_data=(buffer)000001b37804383300002148000001b5144a00010200, profile=(string)main, level=(string)high
0:00:02.078407428  1353      0x247b370 FIXME               basesink gstbasesink.c:3144:gst_base_sink_default_event:<udpsink0> stream-start event without group-id. Consider implementing group-id handling in the upstream elements
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308a00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0290001c10000e042f00c050448444d5688040ffffcfc02e041f0000fe042f0060a04727500000739f8ac >
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308a00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0290001c10000e042f00c050448444d5688040ffffcfc02e041f0000fe042f0060a04727500000739f8ac >
0:00:03.951337977  1353      0x24a6990 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0
0:00:04.321891441  1353      0x24a6990 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0
0:00:05.694002118  1353      0x24a6990 WARN    codecparsers_mpegvideo gstmpegvideoparser.c:861:gst_mpeg_video_packet_parse_picture_header: Unsupported picture type : 0

without element mpegvideoparse after mfxmpeg2enc, pipeline not start:

0:00:00.894620417  1376      0x1bc9400 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 16042 will be dropped
0:00:01.036175565  1376      0x1bc9400 WARN               h264parse gsth264parse.c:1236:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 12 Filler Data, Size: 10057 will be dropped
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/GstMfxDec:v1.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, width=(int)1920, height=(int)1080, framerate=(fraction)25/1, interlace-mode=(string)mixed, parsed=(boolean)true, profile=(string)high, level=(string)4
0:00:01.073526187  1376      0x1bc9400 FIXME           videodecoder gstvideodecoder.c:928:gst_video_decoder_drain_out:<v1> Sub-class should implement drain()
/GstPipeline:pipeline0/GstMfxDec:v1.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxPostproc:mfxpostproc0.GstPad:src: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
0:00:01.077175926  1376      0x1bc9400 WARN                     mfx gstmfxencoder.c:938:gst_mfx_encoder_start: Incompatible video params detected 5
/GstPipeline:pipeline0/GstMfxEncMpeg2:mfxencmpeg2-0.GstPad:sink: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstMfxPostproc:mfxpostproc0.GstPad:sink: caps = video/x-raw(memory:MFXSurface), format=(string)NV12, width=(int)1920, height=(int)1080, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
0:00:01.446596250  1376      0x1bc9400 WARN                GST_PADS gstpad.c:4109:gst_pad_peer_query:<mfxencmpeg2-0:src> could not send sticky events
/GstPipeline:pipeline0/GstMfxEncMpeg2:mfxencmpeg2-0.GstPad:src: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
0:00:01.446748368  1376      0x1bc9400 WARN                 basesrc gstbasesrc.c:2939:gst_base_src_loop:<udpsrc0> error: Internal data stream error.
0:00:01.446753701  1376      0x1bc9400 WARN                 basesrc gstbasesrc.c:2939:gst_base_src_loop:<udpsrc0> error: streaming stopped, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(2939): gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:01.427937593
ishmael1985 commented 6 years ago

I would just recommend you remove mfxvpp from your pipeline, then change mpegtsmux to flvmux / matroskamux and remove mpegvideoparse.

ishmael1985 commented 6 years ago

And one last thing, please make sure you are using the latest master from my repo, from your pipeline, it's highly likely you are using an older version.

ishmael1985 commented 6 years ago

@mort1k, does it work with the muxers I suggested (flvmux / matroskamux)? As you know, mfxmpeg2enc is not compatible with mpegtsmux, hence I understand why you would want to put mpegvideoparse. Ok, flvmux doesn't work, but mpegpsmux / matroskamux should work.

mort1k commented 6 years ago

Thanks, you have sense, work only with mpegpsmux / matroskamux why stream not be a parsed, this is due to some restrictions on licenses or stream?

mpegtsmux need parsed stream:

  SINK template: 'sink_%d'
    Availability: On request
    Capabilities:
      video/mpeg
                 parsed: true
            mpegversion: { (int)1, (int)2, (int)4 }
           systemstream: false

i use mpegvideoparse with the hope that it can be fixed :D

Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/mpeg
            mpegversion: [ 1, 2 ]
           systemstream: false
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/mpeg
            mpegversion: [ 1, 2 ]
                 parsed: true
           systemstream: false
ishmael1985 commented 6 years ago

The encoded MPEG2 stream from MSDK does not include the necessary bitstream information for it to be an MPEG-2 Transport Stream. mpegvideoparse should have converted the mfxmpeg2enc output to be compatible with mpegtsmux, seems like there is a parsing bug with mpegvideoparse making it fail. Please close the issue if this issue has been settled for you.

mort1k commented 6 years ago

mpegvideometa can help with this issue?

ishmael1985 commented 6 years ago

I don't think so.