green artifacts at start, h264 rtsp

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

green artifacts at start, h264 rtsp

skooij

Hello everyone

 

We’re using the gstreamer rtsp plugin (gst-rtsp-server) and gst-launch to play a H.264 video stream from a security camera. We’ve configured the RTSP server to share the streams.

 

However, when I open a stream using gst-launch, I observe a green overlay (looks like artifacts) that is displayed for about 1-2 seconds and then the stream becomes visible and everything is normal and there are no artifacts during the remainder of the stream.

 

On the server we are using the following pipeline description:

 

( rtspsrc latency=150 location=rtsp://10.0.10.64/ONVIF/MediaInput?profile=bb_h264_256 ! queue ! rtph264depay ! rtph264pay name=pay0 pt=96 )

 

And we are starting gst-launch like this:

 

gst-launch-1.0.exe rtspsrc location=rtsp://localhost:8554/1_bb_h264_512 latency=0 buffer-mode=auto ! decodebin ! autovideosink

 

Does anyone know what is the cause of this and how we might resolve it? I’ve attached a screenshot to clarify what we observed.

 

Thank you in advance.


Met vriendelijke groet, Sincerely,

Swen Kooij
Research & Development

[hidden email]
+31 (0)318 666699




Disclaimer: This e-mail is intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any
person other than the addressee(s). If you have received this email by error then please delete it and notify the sender by return e-mail.
In case of doubt about correctness or completeness of this e-mail, please contact the sender. BigBrother BV dismisses any and every
liability resulting from any electronic transmission.


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

gstreamer_rtsp_green.png (66K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: green artifacts at start, h264 rtsp

Aleix Conchillo Flaqué
On Wed, Oct 8, 2014 at 8:01 AM, Swen Kooij <[hidden email]> wrote:

Hello everyone

 

We’re using the gstreamer rtsp plugin (gst-rtsp-server) and gst-launch to play a H.264 video stream from a security camera. We’ve configured the RTSP server to share the streams.

 

However, when I open a stream using gst-launch, I observe a green overlay (looks like artifacts) that is displayed for about 1-2 seconds and then the stream becomes visible and everything is normal and there are no artifacts during the remainder of the stream.

 

On the server we are using the following pipeline description:

 

( rtspsrc latency=150 location=rtsp://10.0.10.64/ONVIF/MediaInput?profile=bb_h264_256 ! queue ! rtph264depay ! rtph264pay name=pay0 pt=96 )

 

And we are starting gst-launch like this:

 

gst-launch-1.0.exe rtspsrc location=rtsp://localhost:8554/1_bb_h264_512 latency=0 buffer-mode=auto ! decodebin ! autovideosink

 

Does anyone know what is the cause of this and how we might resolve it? I’ve attached a screenshot to clarify what we observed.

 


​I think the problem is that you are probably using dynamic pads (dynpayN), probably having a decodebin, in gst-rtsp-server​. This will cause the pipeline to push buffers to figure out the kind of stream, allocating the dynamic pads, the payload, etc. (preparing the media). However, these initial buffers (which have an initial keyframe) will not get pushed to the clients because the transports are not configured yet. So, your clients won't receive the initial keyframe and the decoder will return you the green frames (or other artifacts) until you get the next keyframe. If you write your own client you can check for the buffer flag GST_BUFFER_FLAG_CORRUPTED and don't render those buffers.

Take a look at:

  https://bugzilla.gnome.org/show_bug.cgi?id=711257

I think the bug only fixed the gst-rtsp-server static pads. May be I'm missing something, it's been a while since I don't look into this.

Aleix


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

Re: green artifacts at start, h264 rtsp

Jan Schmidt
In reply to this post by skooij
On 09/10/14 02:01, Swen Kooij wrote:

> Hello everyone
>
> We’re using the gstreamer rtsp plugin (gst-rtsp-server) and gst-launch
> to play a H.264 video stream from a security camera. We’ve configured
> the RTSP server to share the streams.
>
> However, when I open a stream using gst-launch, I observe a green
> overlay (looks like artifacts) that is displayed for about 1-2 seconds
> and then the stream becomes visible and everything is normal and there
> are no artifacts during the remainder of the stream.

This is generally because in order to start faster, gst-libav will
output 'corrupted' video frames at the beginning. That happens when the
first data it receives is not a keyframe. It starts decoding the data it
has, and the video will become less corrupted over time - such as at the
next keyframe, or there might never be a keyframe with intra-refresh H.264.

The only way to avoid it at the moment is a pad probe at the video sink.
Check the CORRUPTED flag on the video buffer, and drop corrupted buffers
at the start, however that has a cost in terms of how soon the pipeline
switches to 'playing' state - that can't happen until the sink receives
at least one decoded buffer.

- Jan.

> On the server we are using the following pipeline description:
>
> ( rtspsrc latency=150
> location=rtsp://10.0.10.64/ONVIF/MediaInput?profile=bb_h264_256 ! queue
> ! rtph264depay ! rtph264pay name=pay0 pt=96 )
>
> And we are starting gst-launch like this:
>
> gst-launch-1.0.exe rtspsrc location=rtsp://localhost:8554/1_bb_h264_512
> latency=0 buffer-mode=auto ! decodebin ! autovideosink
>
> Does anyone know what is the cause of this and how we might resolve it?
> I’ve attached a screenshot to clarify what we observed.
>
> Thank you in advance.
>
>
> Met vriendelijke groet, Sincerely,
>
> Swen Kooij
> Research & Development
>
> [hidden email] <mailto:[hidden email]>
> +31 (0)318 666699
>
>
> <http://www.linkedin.com/company/1241845?trk=tyah>
>
> <http://www.bigbrother.nl>
> <http://www.bigbrother-security.be>
>
>
> Disclaimer: This e-mail is intended exclusively for the addressee(s),
> and may not be passed on to, or made available for use by any
> person other than the addressee(s). If you have received this email by
> error then please delete it and notify the sender by return e-mail.
> In case of doubt about correctness or completeness of this e-mail,
> please contact the sender/./ BigBrother BV dismisses any and every
> liability resulting from any electronic transmission.
>
>
>
> _______________________________________________
> 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