GStreamer neither keep rtsp alive nor re-connect to ip camera

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

GStreamer neither keep rtsp alive nor re-connect to ip camera

lockandfire
Hello everyone. I am new to gstreamer. With some research I can connect to my IP camera (vivotek fe8171v) with the command:

gst-launch-1.0 rtspsrc location=rtsp://192.168.137.100:554/live4.sdp latency=0 udp-reconnect=TRUE do-rtsp-keep-alive=true ! rtph264depay ! avdec_h264 ! videoconvert ! osxvideosink

I can restream the video on my computer but after a while it returns:

gstrtspsrc.c(4705): gst_rtspsrc_loop_udp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
The server closed the connection.

then pipeline0 receives eos message and quits. Rtspsrc's page says do-rtsp-keep-alive might be incompatible with some old server but problem remained even if I turn it to false. 

What's the problem? Thank you.



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

Re: GStreamer neither keep rtsp alive nor re-connect to ip camera

Ian Davidson
I believe that 'keep-alive' is normally configured within the OS for the internet connection, so that 'user software' does not need to do anything.

I learnt this some time ago (on Windows XP) - but I would suspect that it applies across most OSs.

Ian

On 06/02/2015 11:46, Min Wu wrote:
Hello everyone. I am new to gstreamer. With some research I can connect to my IP camera (vivotek fe8171v) with the command:

gst-launch-1.0 rtspsrc location=rtsp://192.168.137.100:554/live4.sdp latency=0 udp-reconnect=TRUE do-rtsp-keep-alive=true ! rtph264depay ! avdec_h264 ! videoconvert ! osxvideosink

I can restream the video on my computer but after a while it returns:

gstrtspsrc.c(4705): gst_rtspsrc_loop_udp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
The server closed the connection.

then pipeline0 receives eos message and quits. Rtspsrc's page says do-rtsp-keep-alive might be incompatible with some old server but problem remained even if I turn it to false. 

What's the problem? Thank you.


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

Re: GStreamer neither keep rtsp alive nor re-connect to ip camera

Chuck Crisler-2
This doesn't have anything to do with network parameters. RTSP clients periodically send a GET_PARAMETER message (I think) to indicate to the server that they are still alive and want the media stream. In the 0.10 version this interval does not seem to be configurable. You can often configure a timeout on the server but that doesn't help if you don't control the server (usually the case). Usually the message is sent once per minute or so. Use wireshark (or something) to look at the RTSP communication for a better idea of what is happening. You can also set the RTSP client logging to level 6 (I think that is the right level) to get the RTSP messages displayed in the log. That is very helpful.

On Fri, Feb 6, 2015 at 11:42 AM, Ian Davidson <[hidden email]> wrote:
I believe that 'keep-alive' is normally configured within the OS for the internet connection, so that 'user software' does not need to do anything.

I learnt this some time ago (on Windows XP) - but I would suspect that it applies across most OSs.

Ian


On 06/02/2015 11:46, Min Wu wrote:
Hello everyone. I am new to gstreamer. With some research I can connect to my IP camera (vivotek fe8171v) with the command:

gst-launch-1.0 rtspsrc location=rtsp://192.168.137.100:554/live4.sdp latency=0 udp-reconnect=TRUE do-rtsp-keep-alive=true ! rtph264depay ! avdec_h264 ! videoconvert ! osxvideosink

I can restream the video on my computer but after a while it returns:

gstrtspsrc.c(4705): gst_rtspsrc_loop_udp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
The server closed the connection.

then pipeline0 receives eos message and quits. Rtspsrc's page says do-rtsp-keep-alive might be incompatible with some old server but problem remained even if I turn it to false. 

What's the problem? Thank you.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



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

Re: GStreamer neither keep rtsp alive nor re-connect to ip camera

lockandfire
Using sdk I checked the initial value of properties of rtspsrc and it returns
nothing wrong.

After many tests I finally find this might be a bug of version 1.4.x :

----------------------------------------------------------------------------------------------------------------------
under mac os x yosemite, gstreamer-1.4.5, default protocols settings(7,
tcp+udp_uni+udp_mcast), latency=0 or 100, wireshark showes me:

time(s)    pc                        ipcamera
5.72        DESCRIBE
5.836      SETUP                  return: timeout=80
5.755      SETUP
5.763      PLAY
80.775    GET_PARAMETER
155                                    TCP:(FIN,ACK)

at 80.775s, gstreamer use a get-parameter to keep link alive( in setup
setup, ipcamera's returns is timeout=80s), however, at 155s(75s later),
ipcamera returns a TCP message: FIN. After that, gstreamer says EOS received
and quits.
------------------------------------------------------------------------------------------------------------------------
 windows7 + gst-1.4.5 : exactly the same with that on mac
------------------------------------------------------------------------------------------------------------------------
ubuntu14.04+gst-1.2.4 / ubuntu-13.04 + gst-1.0.6 : no problem
------------------------------------------------------------------------------------------------------------------------
at this time I realized that the problem is due to 1.4.5, then I tried
1.2.4, 1.4.4 on mac:

1.2.4 : nothing wrong
1.4.4: the same with 1.4.5

After I examined the result of wiresharks of 1.2.4/1.0.6,  I found that the
GET_PARAMETER is sent out every 75seconds, however , in 1.4.5/1.4.4, after
the first GET_PARAMETER is sent out, there is no the second one. That's why
the stream is stopped.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/GStreamer-neither-keep-rtsp-alive-nor-re-connect-to-ip-camera-tp4670632p4670641.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer neither keep rtsp alive nor re-connect to ip camera

lockandfire
In reply to this post by Chuck Crisler-2
Using sdk I checked the initial value of properties of rtspsrc and it returns nothing wrong.

After many tests I finally find this might be a bug of version 1.4.x :

----------------------------------------------------------------------------------------------------------------------
under mac os x yosemite, gstreamer-1.4.5, default protocols settings(7, tcp+udp_uni+udp_mcast), latency=0 or 100, wireshark showes me:

time(s)    pc                        ipcamera
5.72        DESCRIBE
5.836      SETUP                  return: timeout=80
5.755      SETUP
5.763      PLAY
80.775    GET_PARAMETER
155                                    TCP:(FIN,ACK)

at 80.775s, gstreamer use a get-parameter to keep link alive( in setup setup, ipcamera's returns is timeout=80s), however, at 155s(75s later), ipcamera returns a TCP message: FIN. After that, gstreamer says EOS received and quits.
------------------------------------------------------------------------------------------------------------------------
 windows7 + gst-1.4.5 : exactly the same with that on mac
------------------------------------------------------------------------------------------------------------------------
ubuntu14.04+gst-1.2.4 / ubuntu-13.04 + gst-1.0.6 : no problem
------------------------------------------------------------------------------------------------------------------------
at this time I realized that the problem is due to 1.4.5, then I tried 1.2.4, 1.4.4 on mac:

1.2.4 : nothing wrong
1.4.4: the same with 1.4.5

After I examined the result of wiresharks of 1.2.4/1.0.6,  I found that the GET_PARAMETER is sent out every 75seconds, however , in 1.4.5/1.4.4, after the first GET_PARAMETER is sent out, there is no the second one. That's why the stream is stopped.
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer neither keep rtsp alive nor re-connect to ip camera

Tim Müller
In reply to this post by lockandfire
On Sat, 2015-02-07 at 07:47 -0800, lockandfire wrote:

Hi,

> at this time I realized that the problem is due to 1.4.5, then I tried
> 1.2.4, 1.4.4 on mac:
>
> 1.2.4 : nothing wrong
> 1.4.4: the same with 1.4.5
>
> After I examined the result of wiresharks of 1.2.4/1.0.6,  I found that the
> GET_PARAMETER is sent out every 75seconds, however , in 1.4.5/1.4.4, after
> the first GET_PARAMETER is sent out, there is no the second one. That's why
> the stream is stopped.

You're saying in 1.4.5 it only sends one GET_PARAMETER keep-alive after
75secs, but then no more?

Could you file a bug about it in bugzilla please?

http://gstreamer.freedesktop.org/bugs/

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel