Image Corruption pulling images via appsink from RTSP stream:

Nirbheek Chauhan nirbheek.chauhan at gmail.com
Wed Dec 21 14:32:02 UTC 2022


Hi,

Some questions / observations:

1. Are you converting only some frames and not all? If you are converting
all frames, you may like to encode to JPEG as part of the pipeline itself.
2. Which h265 decoder are you actually using? Note that you do not need to
specify the depayloader and parser if you plug into decodebin anyway.
3. This looks a bit like packet loss, try running rtspsrc in
tcp-interleaved mode with "rtspsrc protocols=tcp location=..."
4. How do things look if you replace appsink with videoconvert !
autovideosink?
5. It looks like you do not have enough queuing in the pipeline, I
recommend adding a 'queue' element before the decoder.

Cheers,
Nirbheek

On Wed, Dec 21, 2022 at 7:46 PM Scot Zarkiewicz via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> wrote:

> Hi All-
>
> Trying to pull images from the pipeline below through an appsink:
> rtspsrc location=rtsp://192.168.0.104:554 ! rtph265depay ! h265parse !
> decodebin ! appsink name=sink
>
> The frame is converted as such:
>
>     g_signal_emit_by_name (sink, "pull-sample", &sample);
>
>     caps = gst_caps_new_simple ("image/jpeg",
>                                 "pixel-aspect-ratio", GST_TYPE_FRACTION,
> 1, 1,
>                                 "width", G_TYPE_INT, 1920,
>                                 "height", G_TYPE_INT, 1080,
>                                 NULL);
>
>     to_sample = gst_video_convert_sample (sample, caps,
> GST_CLOCK_TIME_NONE, &err);
>
> The issue is that we are having quite a bit of corruption of the image,
> see below (note that not all frames are corrupted):
>
> [image: image.png]
>
> [image: image.png]
>
> Any insight would be greatly appreciated!
>
> thanks
>
> Scot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221221/273838e4/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 750636 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221221/273838e4/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 851401 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221221/273838e4/attachment-0003.png>


More information about the gstreamer-devel mailing list