<div dir="ltr">Hi,<div><br></div><div>I try to transcode mpegts to h264 with gstreamer and finally i want to make it rtmp or hls.</div><div>I have made 3 code that using filesink<br></div><div><br></div><div><div>works 1: gst-launch-1.0 -v --gst-debug=2 udpsrc port=2001 ! tsdemux name=demux ! queue ! mpegvideoparse ! omxmpeg2videodec ! queue ! omxh264enc ! "video/x-h264,stream-format=byte-stream,profile=high" ! h264parse ! flvmux name=mux streamable = true ! filesink location=test11.mkv  demux. ! queue ! mpegaudioparse ! queue ! mad ! audioconvert ! queue ! voaacenc bitrate=128000 ! mux.</div><div><br></div><div>works 2: gst-launch-1.0  -v --gst-debug=2 udpsrc port=2001 ! decodebin name=demux demux. ! queue ! audioresample ! audioconvert dithering=0 ! "audio/x-raw,channels=1" ! voaacenc bitrate=128000 ! mux. flvmux name=mux streamable=true ! filesink location=test16.mkv   demux. ! queue ! videoconvert ! omxh264enc target-bitrate=800000 control-rate=variable ! "video/x-h264,profile=high" ! h264parse ! mux.</div><div><br></div><div>works 3: gst-launch-1.0 -v --gst-debug=2 udpsrc port=2001 ! tsdemux name=demux ! queue ! mpegvideoparse ! omxmpeg2videodec ! queue ! omxh264enc target-bitrate=800000 control-rate=variable ! "video/x-h264,stream-format=byte-stream,profile=high" ! h264parse ! flvmux name=mux streamable = true ! filesink location=test11.mkv  demux. ! queue ! mpegaudioparse ! queue ! mad ! audioconvert ! queue ! voaacenc bitrate=128000 ! mux.</div></div><div><br></div><div>this all works fine but</div><div><br></div><div>if i replace  " filesink location=test11.mkv  demux. " with "  rtmpsink location='rtmp://<a href="http://192.168.0.130/live/testy">192.168.0.130/live/testy</a>' "</div><div><br></div><div>It will stop direct</div><div><br></div><div><div>gst-launch-1.0 --gst-debug=2 udpsrc port=2001 videotestsrc num-buffers=1000 ! omxh264enc ! "video/x-h264,profile=high" ! h264parse ! queue max-size-bytes=10000000 ! matroskamux ! filesink location=test.mkv</div><div>Setting pipeline to PAUSED ...</div><div>Pipeline is live and does not need PREROLL ...</div><div>Setting pipeline to PLAYING ...</div><div>New clock: GstSystemClock</div><div>0:00:00.297328605  5224   0x1b23b0 WARN             matroskamux matroska-mux.c:3211:gst_matroska_mux_write_data:<matroskamux0:video_0> Invalid buffer timestamp; dropping buffer</div><div>0:00:00.321730544  5224   0x1b2460 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<udpsrc0> error: Internal data flow error.</div><div>0:00:00.321971688  5224   0x1b2460 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<udpsrc0> error: streaming task paused, reason not-linked (-1)</div><div>ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data flow error.</div><div>Additional debug info:</div><div>gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:</div><div>streaming task paused, reason not-linked (-1)</div><div>Execution ended after 0:00:00.065351176</div><div>Setting pipeline to PAUSED ...</div><div>Setting pipeline to READY ...</div><div>Setting pipeline to NULL ...</div><div>Freeing pipeline ...</div><div>root@raspberrypi:/home/pi#  gst-launch-1.0 -v --gst-debug=2 udpsrc port=2001 ! tsdemux name=demux ! queue ! mpegvideoparse ! omxmpeg2videodec ! queue ! omxh264enc target-bitrate=800000 control-rate=variable ! "video/x-h264,stream-format=byte-stream,profile=high" ! h264parse ! flvmux name=mux streamable = true !  rtmpsink location='rtmp://<a href="http://192.168.0.130/dymo/testy">192.168.0.130/dymo/testy</a>'  demux. ! queue ! mpegaudioparse ! queue ! mad ! audioconvert ! queue ! voaacenc bitrate=128000 ! mux.</div><div>Setting pipeline to PAUSED ...</div><div>Pipeline is live and does not need PREROLL ...</div><div>Setting pipeline to PLAYING ...</div><div>New clock: GstSystemClock</div><div>0:00:00.460578707  5247  0x151be60 WARN                 default descriptions.c:612:format_info_get_desc: Unexpected MPEG-1 layer in audio/mpeg, mpegversion=(int)1</div><div>/GstPipeline:pipeline0/GstQueue:queue2.GstPad:src: caps = audio/mpeg, mpegversion=(int)1</div><div>/GstPipeline:pipeline0/GstMpegAudioParse:mpegaudioparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1</div><div>/GstPipeline:pipeline0/GstMpegAudioParse:mpegaudioparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)2, parsed=(boolean)true</div><div>/GstPipeline:pipeline0/GstQueue:queue3.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)2, parsed=(boolean)true</div><div>/GstPipeline:pipeline0/GstQueue:queue3.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)2, rate=(int)48000, channels=(int)2, parsed=(boolean)true</div><div>/GstPipeline:pipeline0/GstMad:mad0.GstPad:src: caps = audio/x-raw, format=(string)S32LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003</div><div>/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16LE, channels=(int)2, channel-mask=(bitmask)0x0000000000000003</div><div>/GstPipeline:pipeline0/GstQueue:queue4.GstPad:src: caps = audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16LE, channels=(int)2, channel-mask=(bitmask)0x0000000000000003</div><div>/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:sink: caps = audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16LE, channels=(int)2, channel-mask=(bitmask)0x0000000000000003</div><div>/GstPipeline:pipeline0/GstQueue:queue4.GstPad:sink: caps = audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16LE, channels=(int)2, channel-mask=(bitmask)0x0000000000000003</div><div>/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = audio/x-raw, format=(string)S32LE, layout=(string)interleaved, rate=(int)48000, channels=(int)2, channel-mask=(bitmask)0x0000000000000003</div><div>/GstPipeline:pipeline0/GstVoAacEnc:voaacenc0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)1190</div><div>/GstPipeline:pipeline0/GstFlvMux:mux.GstPad:audio: caps = audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)48000, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc, codec_data=(buffer)1190</div><div>/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false</div><div>/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false</div><div>/GstPipeline:pipeline0/GstMpegvParse:mpegvparse0.GstPad:src: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, parsed=(boolean)true, width=(int)720, height=(int)576, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)16/15, codec_data=(buffer)000001b32d024023186a237110111112121213131313141414141415151515151516161616161616171717171717171718181819181818191a1a1a1a191b1b1b1b1b1c1c1c1c1e1e1e1f1f21000001b5148200010000, profile=(string)main, level=(string)main, interlace-mode=(string)mixed</div><div>/GstPipeline:pipeline0/GstOMXMPEG2VideoDec-omxmpeg2videodec:omxmpeg2videodec-omxmpeg2videodec0.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false, parsed=(boolean)true, width=(int)720, height=(int)576, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)16/15, codec_data=(buffer)000001b32d024023186a237110111112121213131313141414141415151515151516161616161616171717171717171718181819181818191a1a1a1a191b1b1b1b1b1c1c1c1c1e1e1e1f1f21000001b5148200010000, profile=(string)main, level=(string)main, interlace-mode=(string)mixed</div><div>/GstPipeline:pipeline0/GstOMXMPEG2VideoDec-omxmpeg2videodec:omxmpeg2videodec-omxmpeg2videodec0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, interlace-mode=(string)mixed, colorimetry=(string)bt601, framerate=(fraction)25/1</div><div>/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, interlace-mode=(string)mixed, colorimetry=(string)bt601, framerate=(fraction)25/1</div><div>/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, interlace-mode=(string)mixed, colorimetry=(string)bt601, framerate=(fraction)25/1</div><div>/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, interlace-mode=(string)mixed, colorimetry=(string)bt601, framerate=(fraction)25/1</div><div>/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1</div><div>/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1</div><div>/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1</div><div>/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1</div><div>/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1, parsed=(boolean)true, codec_data=(buffer)01640028ffe1000e27640028ac2b405a093403c489a801000528ee025cb0</div><div>/GstPipeline:pipeline0/GstFlvMux:mux.GstPad:video: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1, parsed=(boolean)true, codec_data=(buffer)01640028ffe1000e27640028ac2b405a093403c489a801000528ee025cb0</div><div>/GstPipeline:pipeline0/GstFlvMux:mux.GstPad:src: caps = video/x-flv, streamheader=(buffer)< 464c5601050000000900000000, 120000f60000000000000002000a6f6e4d65746144617461080000000a000c766964656f636f646563696400401c000000000000000577696474680040868000000000000006686569676874004082000000000000000c417370656374526174696f58004030000000000000000c417370656374526174696f5900402e00000000000000096672616d6572617465004039000000000000000c617564696f636f6465636964004024000000000000000f6d6574616461746163726561746f720200134753747265616d657220464c56206d75786572000c6372656174696f6e64617465020018576564204d61792032302031373a33333a3538203230313500000900000101, 0900002300000000000000170000000001640028ffe1000e27640028ac2b405a093403c489a801000528ee025cb00000002e, 0800000400000000000000af0011900000000f ></div><div>/GstPipeline:pipeline0/GstRTMPSink:rtmpsink0.GstPad:sink: caps = video/x-flv, streamheader=(buffer)< 464c5601050000000900000000, 120000f60000000000000002000a6f6e4d65746144617461080000000a000c766964656f636f646563696400401c000000000000000577696474680040868000000000000006686569676874004082000000000000000c417370656374526174696f58004030000000000000000c417370656374526174696f5900402e00000000000000096672616d6572617465004039000000000000000c617564696f636f6465636964004024000000000000000f6d6574616461746163726561746f720200134753747265616d657220464c56206d75786572000c6372656174696f6e64617465020018576564204d61792032302031373a33333a3538203230313500000900000101, 0900002300000000000000170000000001640028ffe1000e27640028ac2b405a093403c489a801000528ee025cb00000002e, 0800000400000000000000af0011900000000f ></div><div>ERROR: WriteN, RTMP send error 104 (136 bytes)</div><div>ERROR: WriteN, RTMP send error 32 (40 bytes)</div><div>ERROR: WriteN, RTMP send error 9 (42 bytes)</div><div>0:00:01.684348876  5247  0x151bc60 WARN                rtmpsink gstrtmpsink.c:258:<b>gst_rtmp_sink_render:<rtmpsink0> error: Failed to write data</b></div><div>ERROR: from element /<b>GstPipeline:pipeline0/GstRTMPSink:rtmpsink0: Could not write to resource.</b></div><div>Additional debug info:</div><div>gstrtmpsink.c(258): gst_rtmp_sink_render (): /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0:</div><div>Failed to write data</div><div>Execution ended after 0:00:01.392104551</div><div>Setting pipeline to PAUSED ...</div><div>Setting pipeline to READY ...</div><div>Setting pipeline to </div></div><div><br></div><div>I hope someone can help me with this</div><div><br></div><div>Thanks</div><div><br></div><div><br></div><div><br></div></div>