udpsrc MP2T pipeline stuck at single frame and no audio. Gives a framerate of 0/1

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

udpsrc MP2T pipeline stuck at single frame and no audio. Gives a framerate of 0/1

mapcol
This post was updated on .
This two pipeline which are supposed one to send and one to receive MP2T do not work and I can't understand why.

Sender:
gst-launch-1.0 -e -v uridecodebin uri="file:///C:/Users/markopacak/Videos/fountain.mkv" name=d ! video/x-raw ! videoconvert ! openh264enc ! h264parse config-interval=1 ! mpegts. d. ! audio/x-raw ! audioconvert ! avenc_aac ! mpegts. mpegtsmux name=mpegts ! rtpmp2tpay ! udpsink host=127.0.0.1 port=5566

Caps audio/x-raw and video/x-raw in the pipe above are not necessary, neither they influence the pipeline. Without them the result is the same.

It displays the following caps:
/GstPipeline:pipeline0/GstRTPMP2TPay:rtpmp2tpay0.GstPad:src: caps = "application/x-rtp\,\ media\=\(string\)video\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)MP2T\,\ pay
load\=\(int\)33\,\ seqnum-offset\=\(uint\)10830\,\ timestamp-offset\=\(uint\)2122735856\,\ ssrc\=\(uint\)2689110812"

I therefore try to get the MP2T audio and video with the following pipeline.
gst-launch-1.0 -e -v udpsrc port=5566 ! application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)MP2T,payload=(int)33 ! rtpjitterbuffer ! rtpmp2tdepay ! tsdemux name=demux demux. ! queue ! h264parse ! openh264dec ! videoconvert ! autovideosink demux. ! queue ! avdec_aac ! audioconvert ! autoaudiosink

But no audio is played and the video is stuck at a single frame. I can notice the following caps on the output on the console which seems really weird:

/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ interlace-mo
e\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt709\,\ framerate\=\(fraction\)0/1"
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ interlace-mode\=\(s
ring\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)bt709\,\ framerate\=\(fraction\)0/1"


The framerate is set at 0/1, which I guess it would mean: display one single frame and then stop. Is this the problem? Anyone knows why?
Reply | Threaded
Open this post in threaded view
|

Re: udpsrc MP2T pipeline stuck at single frame and no audio. Gives a framerate of 0/1

Sebastian Dröge-3
On Thu, 2016-09-01 at 22:50 -0700, mapcol wrote:

>
> The framerate is set at 0/1, which I guess it would mean: display one single
> frame and then stop. Is this the problem? Anyone knows why?

0/1 means unknown or variable framerate, it wouldn't cause this
problem.

Are packets continued to be sent over the network, can you check where
they get stuck in the receiver pipeline?

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (949 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: udpsrc MP2T pipeline stuck at single frame and no audio. Gives a framerate of 0/1

mapcol
Hello Sebastian, thank you for answering me.

Yes the packets are constantly sent from the sender to the receiver. Checked with wireshark.

How could I check where the frames get stuck in the pipeline?

Greetings
Reply | Threaded
Open this post in threaded view
|

Re: udpsrc MP2T pipeline stuck at single frame and no audio. Gives a framerate of 0/1

Sebastian Dröge-3
On Thu, 2016-09-01 at 23:33 -0700, mapcol wrote:
> Hello Sebastian, thank you for answering me.
>
> Yes the packets are constantly sent from the sender to the receiver.
> Checked
> with wireshark.
>
> How could I check where the frames get stuck in the pipeline?

Check the debug logs, or build the pipeline in parts, e.g. first check
if
  gst-launch-1.0 -v udpsrc ! fakesink silent=false
reports anything.

Then add the next element and repeat.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (949 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: udpsrc MP2T pipeline stuck at single frame and no audio. Gives a framerate of 0/1

mapcol
This post was updated on .
Up to: udpsrc ! caps as in the first post  ! rtpjitterbuffer ! fakesink

Those messages are displayed:
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (1328 bytes, dts: 0:00:00.557065727, pts: 0:00:00.568145411, duration: none, offset: -
1, offset_end: -1, flags: 00004000 tag-memory ) 0000000003D6EDD0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (1328 bytes, dts: 0:00:00.560537843, pts: 0:00:00.568145411, duration: none, offset: -
1, offset_end: -1, flags: 00004000 tag-memory ) 0000000003D6F010
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (1328 bytes, dts: 0:00:00.565443256, pts: 0:00:00.568145411, duration: none, offset: -
1, offset_end: -1, flags: 00004000 tag-memory ) 0000000003D6F120
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (1328 bytes, dts: 0:00:00.565569245, pts: 0:00:00.599263835, duration: none, offset: -
1, offset_end: -1, flags: 00004000 tag-memory ) 0000000003D447D0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (1328 bytes, dts: 0:00:00.565594372, pts: 0:00:00.599263835, duration: none, offset: -
1, offset_end: -1, flags: 00004000 tag-memory ) 0000000003D446C0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (1328 bytes, dts: 0:00:00.565608528, pts: 0:00:00.599263835, duration: none, offset: -
1, offset_end: -1, flags: 00004000 tag-memory ) 0000000003D445B0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (1328 bytes, dts: 0:00:00.605377374, pts: 0:00:00.599263835, duration: none, offset: -
1, offset_end: -1, flags: 00004000 tag-memory ) 0000000003D444A0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (1328 bytes, dts: 0:00:00.612509175, pts: 0:00:00.599263835, duration: none, offset: -
1, offset_end: -1, flags: 00004000 tag-memory ) 0000000003D6F230

Up to: udpsrc ! caps as in the first post  ! rtpjitterbuffer ! rtpmp2tdepay ! tsdemux name=demux demux. ! queue ! fakesink

it outputs this messages:

/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (29417 bytes, dts: 0:00:00.000000000, pts: none, duration: none, offset: 69979, offset
_end: -1, flags: 00000040 discont ) 0000000003D6EC90
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (6264 bytes, dts: none, pts: 0:00:00.787705568, duration: none, offset: 99397, offset_
end: -1, flags: 00002040 discont delta-unit ) 0000000003D6EB80
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (6475 bytes, dts: none, pts: 0:00:00.828705568, duration: none, offset: 105662, offset
_end: -1, flags: 00002040 discont delta-unit ) 0000000003DCC9B0

By adding h264parse:
udpsrc ! caps as in the first post  ! rtpjitterbuffer ! rtpmp2tdepay ! tsdemux name=demux demux. ! queue ! h264parse ! fakesink

messages as above, plus some (kind of unreadable warnings) but one can extract the following message:
tspacketizer.c:2299:mpegts_packetizer_pts_to_ts: Not enough information to calculate proper timestamp

By adding openh264dec:
udpsrc ! caps as in the first post  ! rtpjitterbuffer ! rtpmp2tdepay ! tsdemux name=demux demux. ! queue ! h264parse ! openh264dec ! fakesink

This warnings on the output:
0:00:01.224053971  8472 0000000002D3F480 WARN               h264parse gsth264parse.c:1205:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 852 will
be dropped
0:00:01.245117060  8472 0000000002D3F480 WARN               h264parse gsth264parse.c:1205:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 1044 wil
 be dropped
0:00:01.272570881  8472 0000000002D3F480 WARN               h264parse gsth264parse.c:1205:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 877 will
be dropped

Plus a list of those messages:
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (3110400 bytes, dts: none, pts: 0:00:01.967688698, duration: none, offset: -1, offset_
end: -1, flags: 00000000 ) 0000000003CC81D0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (3110400 bytes, dts: none, pts: 0:00:02.009688069, duration: none, offset: -1, offset_
end: -1, flags: 00000000 ) 0000000003CC8500
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (3110400 bytes, dts: none, pts: 0:00:02.050688069, duration: none, offset: -1, offset_
end: -1, flags: 00000000 ) 0000000003CC81D0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (3110400 bytes, dts: none, pts: 0:00:02.092688001, duration: none, offset: -1, offset_
end: -1, flags: 00000000 ) 0000000003CC8500
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (3110400 bytes, dts: none, pts: 0:00:02.134688001, duration: none, offset: -1, offset_
end: -1, flags: 00000000 ) 0000000003CC81D0
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (3110400 bytes, dts: none, pts: 0:00:02.175688001, duration: none, offset: -1, offset_
end: -1, flags: 00000000 ) 0000000003CC8500

I did not go further. Should I?
Can you get something useful from this message log?

Thank you a lot

Reply | Threaded
Open this post in threaded view
|

Re: udpsrc MP2T pipeline stuck at single frame and no audio. Gives a framerate of 0/1

Arjen Veenhuizen
Are you sure your source file contains raw video and raw audio (e.g. yuv420p / S16LE respectively)?
Reply | Threaded
Open this post in threaded view
|

Re: udpsrc MP2T pipeline stuck at single frame and no audio. Gives a framerate of 0/1

mapcol
I don't want to seem to dumb, but how would I do that? Playing that file with uridecodebin and splitting into audio and video branch both up to their respective sink correctly plays audio and video