Video corruption in rtsp server with appsink->appsrc

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

Video corruption in rtsp server with appsink->appsrc

Serj TorresSoldado
Hi All,

 I am doing a sink -> src push. The sink is in a separate pipeline and the src is created by gst-rtsp-server when creating the media pipeline.

 I have tried both using a pull (need-data signal) and push (new-sample) methods and the result is the same.

 I am copying the buffer from the sink to the source. I am setting the PTS on the copied buffer otherwise after the first client disconnects I am unable to connect again.

 GST_BUFFER_PTS(bufcpy) = client->timestamp_;
 client->timestamp_ += GST_BUFFER_DURATION(bufcpy);
 gst_app_src_push_buffer(client->appsrc_, bufcpy);

 When cofiguring the client I have "played" with the following appsrc properties but they don't seem to make a difference:

  gst_util_set_object_arg(reinterpret_cast<GObject*>(appsrc.Get()), "format", "time");
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "block", false, nullptr);
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "is-live", true, nullptr);
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "do-timestamp", true, nullptr);
//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "stream-type", "random-access", nullptr);
//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "max-bytes", 1000, nullptr);

Any help would be awesome, thanks.

Serj

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

Re: Video corruption in rtsp server with appsink->appsrc

Serj TorresSoldado
I have just noticed this happens with the gst-rtsp-server examples as well.

I am using the 1.6 branch.

On 28 March 2016 at 21:50, Serj TorresSoldado <[hidden email]> wrote:
Hi All,

 I am doing a sink -> src push. The sink is in a separate pipeline and the src is created by gst-rtsp-server when creating the media pipeline.

 I have tried both using a pull (need-data signal) and push (new-sample) methods and the result is the same.

 I am copying the buffer from the sink to the source. I am setting the PTS on the copied buffer otherwise after the first client disconnects I am unable to connect again.

 GST_BUFFER_PTS(bufcpy) = client->timestamp_;
 client->timestamp_ += GST_BUFFER_DURATION(bufcpy);
 gst_app_src_push_buffer(client->appsrc_, bufcpy);

 When cofiguring the client I have "played" with the following appsrc properties but they don't seem to make a difference:

  gst_util_set_object_arg(reinterpret_cast<GObject*>(appsrc.Get()), "format", "time");
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "block", false, nullptr);
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "is-live", true, nullptr);
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "do-timestamp", true, nullptr);
//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "stream-type", "random-access", nullptr);
//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "max-bytes", 1000, nullptr);

Any help would be awesome, thanks.

Serj


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

Re: Video corruption in rtsp server with appsink->appsrc

Serj TorresSoldado
It also coincides with the following events:

0:01:09.870444110 12808      0x10c9ca0 INFO              rtspclient rtsp-client.c:2727:handle_request: client 0x11030b0: received a request GET_PARAMETER rtsp://localhost:8554/test/ 1.0
0:01:11.740605331 12808 0x7f857804e8f0 INFO               GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event application/x-rtcp
0:01:11.740733092 12808 0x7f857804e8f0 INFO               GST_EVENT gstevent.c:760:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, offset=0:00:00.000000000, stop=99:99:99.99999
9999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:01:11.740787716 12808 0x7f8570020850 INFO               GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event application/x-rtcp
0:01:11.747962055 12808 0x7f857804ead0 INFO               GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event application/x-rtcp
0:01:11.748070236 12808 0x7f857804ead0 INFO               GST_EVENT gstevent.c:760:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, offset=0:00:00.000000000, stop=99:99:99.99999
9999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:01:11.748110491 12808 0x7f8570020c00 INFO               GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event application/x-rtcp
0:01:12.354714316 12808 0x7f8570003230 INFO              rtspstream rtsp-stream.c:1616:on_new_ssrc: 0x7f8578038d70: new source 0x7f8570045ad0
0:01:12.354802661 12808 0x7f8570003230 INFO              rtspstream rtsp-stream.c:1530:dump_structure: structure: application/x-rtp-source-stats, ssrc=(uint)3989343839, internal=(boolean)false, validated=(boolean
)false, received-bye=(boolean)false, is-csrc=(boolean)false, is-sender=(boolean)false, seqnum-base=(int)-1, clock-rate=(int)-1, rtcp-from=(string)127.0.0.1:35799, 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, ha
ve-sr=(boolean)false, sr-ntptime=(guint64)0, sr-rtptime=(uint)0, sr-octet-count=(uint)0, sr-packet-count=(uint)0, sent-rb=(boolean)false, sent-rb-fractionlost=(uint)0, sent-rb-packetslost=(int)0, sent-rb-exthighe
stseq=(uint)0, sent-rb-jitter=(uint)0, sent-rb-lsr=(uint)0, sent-rb-dlsr=(uint)0, 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;


On 29 March 2016 at 10:33, Serj TorresSoldado <[hidden email]> wrote:
I have just noticed this happens with the gst-rtsp-server examples as well.

I am using the 1.6 branch.

On 28 March 2016 at 21:50, Serj TorresSoldado <[hidden email]> wrote:
Hi All,

 I am doing a sink -> src push. The sink is in a separate pipeline and the src is created by gst-rtsp-server when creating the media pipeline.

 I have tried both using a pull (need-data signal) and push (new-sample) methods and the result is the same.

 I am copying the buffer from the sink to the source. I am setting the PTS on the copied buffer otherwise after the first client disconnects I am unable to connect again.

 GST_BUFFER_PTS(bufcpy) = client->timestamp_;
 client->timestamp_ += GST_BUFFER_DURATION(bufcpy);
 gst_app_src_push_buffer(client->appsrc_, bufcpy);

 When cofiguring the client I have "played" with the following appsrc properties but they don't seem to make a difference:

  gst_util_set_object_arg(reinterpret_cast<GObject*>(appsrc.Get()), "format", "time");
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "block", false, nullptr);
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "is-live", true, nullptr);
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "do-timestamp", true, nullptr);
//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "stream-type", "random-access", nullptr);
//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "max-bytes", 1000, nullptr);

Any help would be awesome, thanks.

Serj



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

AW: Video corruption in rtsp server with appsink->appsrc

Thornton, Keith
In reply to this post by Serj TorresSoldado

Hi

I have a similar pipeline based on the rtsp appsrc example. I use the client_connected and client_closed callbacks to start and stop my pipeline. I can attach and detach clients more than once.

 

Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Serj TorresSoldado
Gesendet: Dienstag, 29. März 2016 11:34
An: Discussion of the development of and with GStreamer
Betreff: Re: Video corruption in rtsp server with appsink->appsrc

 

I have just noticed this happens with the gst-rtsp-server examples as well.

 

I am using the 1.6 branch.

 

On 28 March 2016 at 21:50, Serj TorresSoldado <[hidden email]> wrote:

Hi All,

 

 I am doing a sink -> src push. The sink is in a separate pipeline and the src is created by gst-rtsp-server when creating the media pipeline.

 

 I have tried both using a pull (need-data signal) and push (new-sample) methods and the result is the same.

 

 I am copying the buffer from the sink to the source. I am setting the PTS on the copied buffer otherwise after the first client disconnects I am unable to connect again.

 

 GST_BUFFER_PTS(bufcpy) = client->timestamp_;

 client->timestamp_ += GST_BUFFER_DURATION(bufcpy);

 gst_app_src_push_buffer(client->appsrc_, bufcpy);

 

 When cofiguring the client I have "played" with the following appsrc properties but they don't seem to make a difference:

 

  gst_util_set_object_arg(reinterpret_cast<GObject*>(appsrc.Get()), "format", "time");

  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "block", false, nullptr);

  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "is-live", true, nullptr);

  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "do-timestamp", true, nullptr);

//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "stream-type", "random-access", nullptr);

//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "max-bytes", 1000, nullptr);

 

Any help would be awesome, thanks.

 

Serj

 


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

Re: Video corruption in rtsp server with appsink->appsrc

Serj TorresSoldado
Can't stop and start the appsink;s pipeline.. anyway if I do the PTS thing it works.

Trying the gst-rtsp-server examples ("test-video") with vlc as a client and the corruption issue exists even on gstreamer 1.8.

I am able to get a corruption free playback if I use gstreamer rtpsrc based client.

My only idea at the moment it to capture and drop the event segment and see if it does anything.


On 29 March 2016 at 11:29, Thornton, Keith <[hidden email]> wrote:

Hi

I have a similar pipeline based on the rtsp appsrc example. I use the client_connected and client_closed callbacks to start and stop my pipeline. I can attach and detach clients more than once.

 

Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Serj TorresSoldado
Gesendet: Dienstag, 29. März 2016 11:34
An: Discussion of the development of and with GStreamer
Betreff: Re: Video corruption in rtsp server with appsink->appsrc

 

I have just noticed this happens with the gst-rtsp-server examples as well.

 

I am using the 1.6 branch.

 

On 28 March 2016 at 21:50, Serj TorresSoldado <[hidden email]> wrote:

Hi All,

 

 I am doing a sink -> src push. The sink is in a separate pipeline and the src is created by gst-rtsp-server when creating the media pipeline.

 

 I have tried both using a pull (need-data signal) and push (new-sample) methods and the result is the same.

 

 I am copying the buffer from the sink to the source. I am setting the PTS on the copied buffer otherwise after the first client disconnects I am unable to connect again.

 

 GST_BUFFER_PTS(bufcpy) = client->timestamp_;

 client->timestamp_ += GST_BUFFER_DURATION(bufcpy);

 gst_app_src_push_buffer(client->appsrc_, bufcpy);

 

 When cofiguring the client I have "played" with the following appsrc properties but they don't seem to make a difference:

 

  gst_util_set_object_arg(reinterpret_cast<GObject*>(appsrc.Get()), "format", "time");

  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "block", false, nullptr);

  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "is-live", true, nullptr);

  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "do-timestamp", true, nullptr);

//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "stream-type", "random-access", nullptr);

//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "max-bytes", 1000, nullptr);

 

Any help would be awesome, thanks.

 

Serj

 


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



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

Re: Video corruption in rtsp server with appsink->appsrc

Serj TorresSoldado
It seems that rtpbin should send an RTCP SDES before initiating RTP traffic.


On 29 March 2016 at 18:06, Serj TorresSoldado <[hidden email]> wrote:
Can't stop and start the appsink;s pipeline.. anyway if I do the PTS thing it works.

Trying the gst-rtsp-server examples ("test-video") with vlc as a client and the corruption issue exists even on gstreamer 1.8.

I am able to get a corruption free playback if I use gstreamer rtpsrc based client.

My only idea at the moment it to capture and drop the event segment and see if it does anything.


On 29 March 2016 at 11:29, Thornton, Keith <[hidden email]> wrote:

Hi

I have a similar pipeline based on the rtsp appsrc example. I use the client_connected and client_closed callbacks to start and stop my pipeline. I can attach and detach clients more than once.

 

Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Serj TorresSoldado
Gesendet: Dienstag, 29. März 2016 11:34
An: Discussion of the development of and with GStreamer
Betreff: Re: Video corruption in rtsp server with appsink->appsrc

 

I have just noticed this happens with the gst-rtsp-server examples as well.

 

I am using the 1.6 branch.

 

On 28 March 2016 at 21:50, Serj TorresSoldado <[hidden email]> wrote:

Hi All,

 

 I am doing a sink -> src push. The sink is in a separate pipeline and the src is created by gst-rtsp-server when creating the media pipeline.

 

 I have tried both using a pull (need-data signal) and push (new-sample) methods and the result is the same.

 

 I am copying the buffer from the sink to the source. I am setting the PTS on the copied buffer otherwise after the first client disconnects I am unable to connect again.

 

 GST_BUFFER_PTS(bufcpy) = client->timestamp_;

 client->timestamp_ += GST_BUFFER_DURATION(bufcpy);

 gst_app_src_push_buffer(client->appsrc_, bufcpy);

 

 When cofiguring the client I have "played" with the following appsrc properties but they don't seem to make a difference:

 

  gst_util_set_object_arg(reinterpret_cast<GObject*>(appsrc.Get()), "format", "time");

  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "block", false, nullptr);

  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "is-live", true, nullptr);

  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "do-timestamp", true, nullptr);

//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "stream-type", "random-access", nullptr);

//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "max-bytes", 1000, nullptr);

 

Any help would be awesome, thanks.

 

Serj

 


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




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

Re: Video corruption in rtsp server with appsink->appsrc

Joel Holdsworth-2
In reply to this post by Serj TorresSoldado

Where are we using appsink/appsrc? As far as I know we shouldn't be using those in the vca pipeline.

On 28 Mar 2016 14:51, "Serj TorresSoldado" <[hidden email]> wrote:
Hi All,

 I am doing a sink -> src push. The sink is in a separate pipeline and the src is created by gst-rtsp-server when creating the media pipeline.

 I have tried both using a pull (need-data signal) and push (new-sample) methods and the result is the same.

 I am copying the buffer from the sink to the source. I am setting the PTS on the copied buffer otherwise after the first client disconnects I am unable to connect again.

 GST_BUFFER_PTS(bufcpy) = client->timestamp_;
 client->timestamp_ += GST_BUFFER_DURATION(bufcpy);
 gst_app_src_push_buffer(client->appsrc_, bufcpy);

 When cofiguring the client I have "played" with the following appsrc properties but they don't seem to make a difference:

  gst_util_set_object_arg(reinterpret_cast<GObject*>(appsrc.Get()), "format", "time");
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "block", false, nullptr);
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "is-live", true, nullptr);
  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "do-timestamp", true, nullptr);
//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "stream-type", "random-access", nullptr);
//  g_object_set(reinterpret_cast<GObject*>(appsrc.Get()), "max-bytes", 1000, nullptr);

Any help would be awesome, thanks.

Serj

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


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