problem: Raspberry 2 hardware transcode mpegts to rtmp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi,

I try to transcode mpegts to h264 with gstreamer and finally i want to make it rtmp or hls.
I have made 3 code that using filesink

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="" ! h264parse ! flvmux name=mux streamable = true ! filesink location=test11.mkv  demux. ! queue ! mpegaudioparse ! queue ! mad ! audioconvert ! queue ! voaacenc bitrate=128000 ! mux.

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="" ! h264parse ! mux.

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="" ! h264parse ! flvmux name=mux streamable = true ! filesink location=test11.mkv  demux. ! queue ! mpegaudioparse ! queue ! mad ! audioconvert ! queue ! voaacenc bitrate=128000 ! mux.

this all works fine but

if i replace  " filesink location=test11.mkv  demux. " with "  rtmpsink location='rtmp://192.168.0.130/live/testy' "

It will stop direct

gst-launch-1.0 --gst-debug=2 udpsrc port=2001 videotestsrc num-buffers=1000 ! omxh264enc ! "video/x-h264,profile="" ! h264parse ! queue max-size-bytes=10000000 ! matroskamux ! filesink location=test.mkv
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
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
0:00:00.321730544  5224   0x1b2460 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<udpsrc0> error: Internal data flow error.
0:00:00.321971688  5224   0x1b2460 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<udpsrc0> error: streaming task paused, reason not-linked (-1)
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
streaming task paused, reason not-linked (-1)
Execution ended after 0:00:00.065351176
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
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="" ! h264parse ! flvmux name=mux streamable = true !  rtmpsink location='rtmp://192.168.0.130/dymo/testy'  demux. ! queue ! mpegaudioparse ! queue ! mad ! audioconvert ! queue ! voaacenc bitrate=128000 ! mux.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
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
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:src: caps = audio/mpeg, mpegversion=(int)1
/GstPipeline:pipeline0/GstMpegAudioParse:mpegaudioparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1
/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
/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
/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
/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
/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
/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
/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
/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
/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
/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="" profile="" codec_data=(buffer)1190
/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="" profile="" codec_data=(buffer)1190
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/mpeg, mpegversion=(int)2, systemstream=(boolean)false
/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="" level=(string)main, interlace-mode=(string)mixed
/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="" level=(string)main, interlace-mode=(string)mixed
/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
/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
/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
/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
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile="" level=(string)4, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile="" level=(string)4, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile="" level=(string)4, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile="" level=(string)4, width=(int)720, height=(int)576, pixel-aspect-ratio=(fraction)16/15, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile="" 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
/GstPipeline:pipeline0/GstFlvMux:mux.GstPad:video: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile="" 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
/GstPipeline:pipeline0/GstFlvMux:mux.GstPad:src: caps = video/x-flv, streamheader=(buffer)< 464c5601050000000900000000, 120000f60000000000000002000a6f6e4d65746144617461080000000a000c766964656f636f646563696400401c000000000000000577696474680040868000000000000006686569676874004082000000000000000c417370656374526174696f58004030000000000000000c417370656374526174696f5900402e00000000000000096672616d6572617465004039000000000000000c617564696f636f6465636964004024000000000000000f6d6574616461746163726561746f720200134753747265616d657220464c56206d75786572000c6372656174696f6e64617465020018576564204d61792032302031373a33333a3538203230313500000900000101, 0900002300000000000000170000000001640028ffe1000e27640028ac2b405a093403c489a801000528ee025cb00000002e, 0800000400000000000000af0011900000000f >
/GstPipeline:pipeline0/GstRTMPSink:rtmpsink0.GstPad:sink: caps = video/x-flv, streamheader=(buffer)< 464c5601050000000900000000, 120000f60000000000000002000a6f6e4d65746144617461080000000a000c766964656f636f646563696400401c000000000000000577696474680040868000000000000006686569676874004082000000000000000c417370656374526174696f58004030000000000000000c417370656374526174696f5900402e00000000000000096672616d6572617465004039000000000000000c617564696f636f6465636964004024000000000000000f6d6574616461746163726561746f720200134753747265616d657220464c56206d75786572000c6372656174696f6e64617465020018576564204d61792032302031373a33333a3538203230313500000900000101, 0900002300000000000000170000000001640028ffe1000e27640028ac2b405a093403c489a801000528ee025cb00000002e, 0800000400000000000000af0011900000000f >
ERROR: WriteN, RTMP send error 104 (136 bytes)
ERROR: WriteN, RTMP send error 32 (40 bytes)
ERROR: WriteN, RTMP send error 9 (42 bytes)
0:00:01.684348876  5247  0x151bc60 WARN                rtmpsink gstrtmpsink.c:258:gst_rtmp_sink_render:<rtmpsink0> error: Failed to write data
ERROR: from element /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0: Could not write to resource.
Additional debug info:
gstrtmpsink.c(258): gst_rtmp_sink_render (): /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0:
Failed to write data
Execution ended after 0:00:01.392104551
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to 

I hope someone can help me with this

Thanks



_______________________________________________
gstreamer-embedded mailing list
gstreamer-embedded@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/gstreamer-embedded

[Index of Archives]     [Linux Embedded]     [Linux ARM Kernel]     [Linux for ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux Media]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux