Image Corruption pulling images via appsink from RTSP stream:

Jeff Shanab jshanab at jfs-tech.com
Wed Dec 21 13:56:08 UTC 2022


I call this Van Gogh-ing . From the decoding perspective it means you got a
complete Key frame and then lost one or more differnce frames. Parts of the
image that are stationary and not ever obscured by something else remain
crisper.
Does it snap back momentarily to a clear image every key frame? like every
second or every 3 seconds. (GOP Size).?

I have also had this happen with 2 other cases.
1) Bad camera timestamps and code that drops frames with timestamps in the
past.
2) B Frames in source with code that treats them as P Frames.

I = key frame
P = predictive frames
B = Bi-directional Predictive frames.

I always end up printing to a file the size type and timestamp of each
frame and then analysing that for gaps, omissions, crazy sizes like a
missing marker bit. etc.

Don't use UDP for high resolution H264 or H265. Modern networks need TCP
IMHO. UDP for video was during a time that JPEG was st popular and loosing
a frame did not mess up the next. TCP retry is a LOT faster nowadays


On Wed, Dec 21, 2022 at 8:11 AM 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/bd273dec/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/bd273dec/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/bd273dec/attachment-0003.png>


More information about the gstreamer-devel mailing list