rtspsrc - protocols=tcp EOS 8 seconds

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

rtspsrc - protocols=tcp EOS 8 seconds

mhaines4102
This post was updated on .
gst-launch-1.0 -e rtspsrc location=rtsp://cameraip/live.sdp protocols=tcp
 ! rtph264depay ! h264parse ! filesink location="record_test1.mp4"

Will not record more than 8 seconds. Stops anywhere between 5.5 and 8 seconds.

Output from process:
Got EOS from element "pipeline0".
Execution ended after 0:00:07.399556977

I have changed every setting I can find and no change.
Occasionally it will record longer than 8 seconds but it is very rare.
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: rtspsrc - protocols=tcp EOS 8 seconds

mhaines4102
This post was updated on .
To be clear. The camera is directly connected to my box.

The camera is not having any connectivity issues.
Replaced Cable
Changed Computers

Works on UDP but not TCP.
The answer cannot be "just use udp" because with a 4K camera, too many i-frames get lost and the picture can grey out, which never happens with tcp.

Changed timeout and tcp-timeout with no change
Changed buffer type with no change
Changed the latency with no change
Changed the retries with no change

I am having trouble believing that I am the only person to ever see this
behavior.

Originally I was seeing this on an application I was writing, so I changed
to just using the gst-launcher so that no "code" was in the way.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: rtspsrc - protocols=tcp EOS 8 seconds

Thornton, Keith
Hi,
what does wireshark say? Is there a disconnect after 8 seconds? If so who disconnects?
Gruesse

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel <[hidden email]> Im Auftrag von mhaines4102
Gesendet: Freitag, 26. März 2021 16:40
An: [hidden email]
Betreff: Re: rtspsrc - protocols=tcp EOS 8 seconds

To be clear. The camera is directly connected to my box.

The camera is not having any connectivity issues.
Replaced Cable
Changed Computers

Works on UDP but not TCP. The answer cannot be "just use udp"
Changed timeout and tcp-timeout with no change Changed buffer type with no change Changed the latency with no change Changed the retries with no change

I am having trouble believing that I am the only person to ever see this behavior.

Originally I was seeing this on an application I was writing, so I changed to just using the gst-launcher so that no "code" was in the way.



--
Sent from: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgstreamer-devel.966125.n4.nabble.com%2F&amp;data=04%7C01%7C%7Cbc97969a92584e2a208908d8f0768b6e%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637523739219776069%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3tpxZLUO%2BEs3DBWYG95XoPtmzOtiZJ8prH4zyK5e6q4%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&amp;data=04%7C01%7C%7Cbc97969a92584e2a208908d8f0768b6e%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637523739219776069%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fjonEprfg%2Fr9R5rse3gPU6czE3DJjoQwn1qcW%2F5G6Xc%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: rtspsrc - protocols=tcp EOS 8 seconds

mhaines4102
There is no disconnect.

I get an interleaved packet
Then I get a sender report
"1652","6.337378","192.168.55.160","192.168.55.1","RTCP","122","Sender
Report   Source description   "
Then I get an EOS in my system.

It always seems to be directly after the sender report, but this is not the
only sender report that comes through. I have included a pcap file. This is
from the API version of my app. The command-line version of this test does a
teardown directly after as well.  "TEARDOWN rtsp://camera0/live.sdp/
RTSP/1.0"

The report attached was done by setting the pipeline to null as soon as the
EOS hits and exiting the program and you will see that in the report by the
FIN packet.

Test1.pcap
<http://gstreamer-devel.966125.n4.nabble.com/file/t379946/Test1.pcap>  




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: rtspsrc - protocols=tcp EOS 8 seconds

mhaines4102
I ran the cli with a fakesink and verbose. This is the very end of the output
where it stops. I do not see any reason for this behavior, but I must be
mission something:

gst-launch-1.0 -v -e rtspsrc location=rtsp://camera0/live.sdp protocols=tcp
! fakesink

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:manager/GstRtpSession:rtpsession0:
stats = application/x-rtp-session-stats, rtx-drop-count=(uint)0,
sent-nack-count=(uint)0, recv-nack-count=(uint)0,
source-stats=(GValueArray)< "application/x-rtp-source-stats,
ssrc=(uint)3934040712, internal=(boolean)true, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)false, seqnum-base=(int)-1, clock-rate=(int)-1,
octets-sent=(guint64)0, packets-sent=(guint64)0, octets-received=(guint64)0,
packets-received=(guint64)0, bitrate=(guint64)0, packets-lost=(int)0,
jitter=(uint)0, sent-pli-count=(uint)0, recv-pli-count=(uint)0,
sent-fir-count=(uint)0, recv-fir-count=(uint)0, sent-nack-count=(uint)0,
recv-nack-count=(uint)0, have-sr=(boolean)false, sr-ntptime=(guint64)0,
sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0;",
"application/x-rtp-source-stats, ssrc=(uint)2127178463,
internal=(boolean)false, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)true, seqnum-base=(int)-1, clock-rate=(int)90000,
octets-sent=(guint64)0, packets-sent=(guint64)0,
octets-received=(guint64)3383604, packets-received=(guint64)2457,
bitrate=(guint64)5250303, packets-lost=(int)65536, jitter=(uint)6,
sent-pli-count=(uint)0, recv-pli-count=(uint)0, sent-fir-count=(uint)0,
recv-fir-count=(uint)0, sent-nack-count=(uint)0, recv-nack-count=(uint)0,
have-sr=(boolean)true, sr-ntptime=(guint64)16432694533086695424,
sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0,
sent-rb=(boolean)true, sent-rb-fractionlost=(uint)0,
sent-rb-packetslost=(int)65536, sent-rb-exthighestseq=(uint)67992,
sent-rb-jitter=(uint)6, sent-rb-lsr=(uint)2828868386,
sent-rb-dlsr=(uint)311701, have-rb=(boolean)false, rb-fractionlost=(uint)0,
rb-packetslost=(int)0, rb-exthighestseq=(uint)0, rb-jitter=(uint)0,
rb-lsr=(uint)0, rb-dlsr=(uint)0, rb-round-trip=(uint)0;" >,
rtx-count=(uint)0;

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:manager/GstRtpSession:rtpsession0:
stats = application/x-rtp-session-stats, rtx-drop-count=(uint)0,
sent-nack-count=(uint)0, recv-nack-count=(uint)0,
source-stats=(GValueArray)< "application/x-rtp-source-stats,
ssrc=(uint)3934040712, internal=(boolean)true, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)false, seqnum-base=(int)-1, clock-rate=(int)-1,
octets-sent=(guint64)0, packets-sent=(guint64)0, octets-received=(guint64)0,
packets-received=(guint64)0, bitrate=(guint64)0, packets-lost=(int)0,
jitter=(uint)0, sent-pli-count=(uint)0, recv-pli-count=(uint)0,
sent-fir-count=(uint)0, recv-fir-count=(uint)0, sent-nack-count=(uint)0,
recv-nack-count=(uint)0, have-sr=(boolean)false, sr-ntptime=(guint64)0,
sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0;",
"application/x-rtp-source-stats, ssrc=(uint)2127178463,
internal=(boolean)false, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)true, seqnum-base=(int)-1, clock-rate=(int)90000,
octets-sent=(guint64)0, packets-sent=(guint64)0,
octets-received=(guint64)3569173, packets-received=(guint64)2592,
bitrate=(guint64)5250303, packets-lost=(int)65536, jitter=(uint)17,
sent-pli-count=(uint)0, recv-pli-count=(uint)0, sent-fir-count=(uint)0,
recv-fir-count=(uint)0, sent-nack-count=(uint)0, recv-nack-count=(uint)0,
have-sr=(boolean)true, sr-ntptime=(guint64)16432694533086695424,
sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0,
sent-rb=(boolean)true, sent-rb-fractionlost=(uint)0,
sent-rb-packetslost=(int)65536, sent-rb-exthighestseq=(uint)68127,
sent-rb-jitter=(uint)17, sent-rb-lsr=(uint)2828868386,
sent-rb-dlsr=(uint)324901, have-rb=(boolean)false, rb-fractionlost=(uint)0,
rb-packetslost=(int)0, rb-exthighestseq=(uint)0, rb-jitter=(uint)0,
rb-lsr=(uint)0, rb-dlsr=(uint)0, rb-round-trip=(uint)0;" >,
rtx-count=(uint)0;

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:manager/GstRtpSession:rtpsession2:
stats = application/x-rtp-session-stats, rtx-drop-count=(uint)0,
sent-nack-count=(uint)0, recv-nack-count=(uint)0,
source-stats=(GValueArray)< "application/x-rtp-source-stats,
ssrc=(uint)3379194541, internal=(boolean)true, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)false, seqnum-base=(int)-1, clock-rate=(int)-1,
octets-sent=(guint64)0, packets-sent=(guint64)0, octets-received=(guint64)0,
packets-received=(guint64)0, bitrate=(guint64)0, packets-lost=(int)0,
jitter=(uint)0, sent-pli-count=(uint)0, recv-pli-count=(uint)0,
sent-fir-count=(uint)0, recv-fir-count=(uint)0, sent-nack-count=(uint)0,
recv-nack-count=(uint)0, have-sr=(boolean)false, sr-ntptime=(guint64)0,
sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0;",
"application/x-rtp-source-stats, ssrc=(uint)476900212,
internal=(boolean)false, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)true, seqnum-base=(int)-1, clock-rate=(int)90000,
octets-sent=(guint64)0, packets-sent=(guint64)0,
octets-received=(guint64)18461, packets-received=(guint64)20,
bitrate=(guint64)0, packets-lost=(int)65536, jitter=(uint)1044,
sent-pli-count=(uint)0, recv-pli-count=(uint)0, sent-fir-count=(uint)0,
recv-fir-count=(uint)0, sent-nack-count=(uint)0, recv-nack-count=(uint)0,
have-sr=(boolean)true, sr-ntptime=(guint64)16432694533048040448,
sr-rtptime=(uint)0, sr-octet-count=(uint)933, sr-packet-count=(uint)1,
sent-rb=(boolean)true, sent-rb-fractionlost=(uint)0,
sent-rb-packetslost=(int)65536, sent-rb-exthighestseq=(uint)65555,
sent-rb-jitter=(uint)1044, sent-rb-lsr=(uint)2828867796,
sent-rb-dlsr=(uint)321389, have-rb=(boolean)false, rb-fractionlost=(uint)0,
rb-packetslost=(int)0, rb-exthighestseq=(uint)0, rb-jitter=(uint)0,
rb-lsr=(uint)0, rb-dlsr=(uint)0, rb-round-trip=(uint)0;" >,
rtx-count=(uint)0;

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:manager/GstRtpSession:rtpsession1:
stats = application/x-rtp-session-stats, rtx-drop-count=(uint)0,
sent-nack-count=(uint)0, recv-nack-count=(uint)0,
source-stats=(GValueArray)< "application/x-rtp-source-stats,
ssrc=(uint)2086076471, internal=(boolean)false, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)true, seqnum-base=(int)-1, clock-rate=(int)8000,
octets-sent=(guint64)0, packets-sent=(guint64)0,
octets-received=(guint64)40960, packets-received=(guint64)64,
bitrate=(guint64)64165, packets-lost=(int)65536, jitter=(uint)79,
sent-pli-count=(uint)0, recv-pli-count=(uint)0, sent-fir-count=(uint)0,
recv-fir-count=(uint)0, sent-nack-count=(uint)0, recv-nack-count=(uint)0,
have-sr=(boolean)true, sr-ntptime=(guint64)16432694533425997824,
sr-rtptime=(uint)0, sr-octet-count=(uint)656, sr-packet-count=(uint)1,
sent-rb=(boolean)true, sent-rb-fractionlost=(uint)0,
sent-rb-packetslost=(int)65536, sent-rb-exthighestseq=(uint)65596,
sent-rb-jitter=(uint)96, sent-rb-lsr=(uint)2828873564,
sent-rb-dlsr=(uint)314490, have-rb=(boolean)false, rb-fractionlost=(uint)0,
rb-packetslost=(int)0, rb-exthighestseq=(uint)0, rb-jitter=(uint)0,
rb-lsr=(uint)0, rb-dlsr=(uint)0, rb-round-trip=(uint)0;",
"application/x-rtp-source-stats, ssrc=(uint)239842252,
internal=(boolean)true, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)false, seqnum-base=(int)-1, clock-rate=(int)-1,
octets-sent=(guint64)0, packets-sent=(guint64)0, octets-received=(guint64)0,
packets-received=(guint64)0, bitrate=(guint64)0, packets-lost=(int)0,
jitter=(uint)0, sent-pli-count=(uint)0, recv-pli-count=(uint)0,
sent-fir-count=(uint)0, recv-fir-count=(uint)0, sent-nack-count=(uint)0,
recv-nack-count=(uint)0, have-sr=(boolean)false, sr-ntptime=(guint64)0,
sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0;" >,
rtx-count=(uint)0;

/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:manager/GstRtpSession:rtpsession0:
stats = application/x-rtp-session-stats, rtx-drop-count=(uint)0,
sent-nack-count=(uint)0, recv-nack-count=(uint)0,
source-stats=(GValueArray)< "application/x-rtp-source-stats,
ssrc=(uint)3934040712, internal=(boolean)true, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)false, seqnum-base=(int)-1, clock-rate=(int)-1,
octets-sent=(guint64)0, packets-sent=(guint64)0, octets-received=(guint64)0,
packets-received=(guint64)0, bitrate=(guint64)0, packets-lost=(int)0,
jitter=(uint)0, sent-pli-count=(uint)0, recv-pli-count=(uint)0,
sent-fir-count=(uint)0, recv-fir-count=(uint)0, sent-nack-count=(uint)0,
recv-nack-count=(uint)0, have-sr=(boolean)false, sr-ntptime=(guint64)0,
sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0;",
"application/x-rtp-source-stats, ssrc=(uint)2127178463,
internal=(boolean)false, validated=(boolean)true,
received-bye=(boolean)false, is-csrc=(boolean)false,
is-sender=(boolean)true, seqnum-base=(int)-1, clock-rate=(int)90000,
octets-sent=(guint64)0, packets-sent=(guint64)0,
octets-received=(guint64)3650582, packets-received=(guint64)2652,
bitrate=(guint64)5250303, packets-lost=(int)65536, jitter=(uint)24,
sent-pli-count=(uint)0, recv-pli-count=(uint)0, sent-fir-count=(uint)0,
recv-fir-count=(uint)0, sent-nack-count=(uint)0, recv-nack-count=(uint)0,
have-sr=(boolean)true, sr-ntptime=(guint64)16432694533086695424,
sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0,
sent-rb=(boolean)true, sent-rb-fractionlost=(uint)0,
sent-rb-packetslost=(int)65536, sent-rb-exthighestseq=(uint)68187,
sent-rb-jitter=(uint)24, sent-rb-lsr=(uint)2828868386,
sent-rb-dlsr=(uint)336688, have-rb=(boolean)false, rb-fractionlost=(uint)0,
rb-packetslost=(int)0, rb-exthighestseq=(uint)0, rb-jitter=(uint)0,
rb-lsr=(uint)0, rb-dlsr=(uint)0, rb-round-trip=(uint)0;" >,
rtx-count=(uint)0;
Got EOS from element "pipeline0".
Execution ended after 0:00:05.506070901
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: rtspsrc - protocols=tcp EOS 8 seconds

mhaines4102
In reply to this post by Thornton, Keith
Using Debug from gstreamer I have identified that it is definitely coming
from the on_timeout portion of rtspsrc

rtspsrc gstrtspsrc.c:3155:on_timeout:<rtspsrc0>
^[[00m source 73fb5375, stream 73fb5375 in session 2 timed outtask
gsttask.c:316:gst_task_func:<rtpjitterbuffer0:src>

^[[00m Task going to paused
Got EOS from element "pipeline0".
Execution ended after 0:00:05.376315181
Setting pipeline to PAUSED ...

SO. What could cause this? I am walking through the source for rtspsrc right
now. Any help is appreciated.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: rtspsrc - protocols=tcp EOS 8 seconds

mhaines4102
This post was updated on .
Ping... Sorry guys. Trying to get this looked at again.

gst-launch-1.0 version 1.14.5

New Testing. Changed resolution and FPM as well as i-frames. No change.

Definitely caused by a timeout.
on_timeout_common (GObject * session, GObject * source, GstRTSPStream *
stream)

Which activities would cause an on_timeout when using exclusively TCP in
protocols?

The rtsp server is producing video with sound embedded h264.

Could it be because I am not doing anything with audio? Stream0 is timing
out.

rtspsrc gstrtspsrc.c:3155:on_timeout:<rtspsrc0>
^[[00m source 73fb5375, stream 73fb5375 in session 2 timed outtask
gsttask.c:316:gst_task_func:<rtpjitterbuffer0:src>

Non verbose run. Very typical.
gst-launch-1.0 -e rtspsrc location=rtsp://User:Password@camera0/live2.sdp
protocols=tcp ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://camera0/live2.sdp
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (request) SETUP stream 1
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
Got EOS from element "pipeline0".
Execution ended after 0:00:07.763174573
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: rtspsrc - protocols=tcp EOS 8 seconds

mhaines4102
OK. Little further.

This looks to be where it all falls apart. It looks like a source is not
reporting for over 5 seconds. But the resulting video I receive is short but
good.

/* sources that were inactive for more than 5 times the deterministic
reporting
 * interval get timed out. the min timeout is 5 seconds. */
/* mind old time that might pre-date last time going to PLAYING */
  btime = MAX (source->last_activity, sess->start_time);
  if (data->current_time > btime) {
    interval = MAX (binterval * 5, 5 * GST_SECOND);
    if (data->current_time - btime > interval) {
      GST_DEBUG ("removing timeout source %08x, last %" GST_TIME_FORMAT,
          source->ssrc, GST_TIME_ARGS (time));


----------- Debug Log -----------
rtpsession rtpsession.c:4046:rtp_session_on_timeout: interval
0:00:00.490000000
rtpsession rtpsession.c:3575:session_cleanup: look at 1fe90b50,
generation 10
rtpsession rtpsession.c:3638:session_cleanup: removing timeout source
1fe90b50, last 72:02:13.280254498
rtpsession rtpsession.c:3663:session_cleanup: sender source 1fe90b50
timed out and became receiver, last 72:02:13.280254498
rtspsrc gstrtspsrc.c:3155:on_timeout:<rtspsrc0> source 1fe90b50, stream
1fe90b50 in session 2 timed out
rtspsrc gstrtspsrc.c:3114:gst_rtspsrc_do_stream_eos:<rtspsrc0> setting
stream for session 2 to EOS



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel