appsrc: minimum latency bigger than maximum latency

Milian Wolff milian.wolff at kdab.com
Tue Nov 26 12:09:12 UTC 2019


Hey all,

I'm running into a strange problem that I don't know the solution to. I'm 
using appsrc with the following pipeline:

```
glvideomixer name=m ! tee name=t
    t. ! queue name=display_queue ! qmlglsink name=sink
    t. ! queue name=record_queue ! glcolorconvert ! gldownload ! video/x-
raw,format=ARGB ! videoconvert ! omxh264enc control-rate=1 target-
bitrate=1145000 ! video/x-h264,profile=baseline ! h264parse ! avimux ! 
filesink location=test.avi
    rpicamsrc preview=false ! video/x-h264,width=640,height=480,framerate=25/1 
! h264parse ! omxh264dec ! video/x-raw(memory:GLMemory) ! queue ! glupload ! 
m.
    appsrc name=overlaysrc blocksize=1228800 stream-type=0 is-live=true 
format=time ! rawvideoparse format=rgba width=640 height=480 frame-
size=1228800 framerate=5/1 ! video/x-
raw,format=RGBA,width=640,height=480,framerate=5/1 ! glupload ! m.
```

I'm essentially trying to overlay a video feed with a (changing) custom image 
supplied through appsrc. But running the above yields:

```
0:00:01.316311614  1043 0x7300fe60 ERROR               GST_PADS gstpad.c:
3352:gst_pad_query_latency_default:<mixer:src> minimum latency bigger than 
maximum latency
0:00:01.316615832  1043 0x7300fe60 WARN              aggregator 
gstaggregator.c:1783:gst_aggregator_query_latency_unlocked:<mixer> warning: 
Impossible to configure latency: max 0:00:00.000000000 < min 
0:00:00.040000000. Add queues or other buffering elements.
```

How do I solve this?

When I leave appsrc out of the picture, then this message disappears - so I'm 
apparently doing something wrong in my appsrc?

This "works" (warning doesn't appear, but performance is bad - probably a 
different topic):

```
glvideomixer name=m ! tee name=t
    t. ! queue name=display_queue ! qmlglsink name=sink
    t. ! queue name=record_queue ! glcolorconvert ! gldownload ! video/x-
raw,format=ARGB ! videoconvert ! omxh264enc control-rate=1 target-
bitrate=1145000 ! video/x-h264,profile=baseline ! h264parse ! avimux ! 
filesink location=test.avi
    rpicamsrc preview=false ! video/x-h264,width=640,height=480,framerate=25/1 
! h264parse ! omxh264dec ! video/x-raw(memory:GLMemory) ! queue ! glupload ! 
m.
    videotestsrc ! video/x-raw,format=RGBA,width=640,height=480 ! glupload ! 
glalpha method=green ! m.
```

What's odd is that the following works too? Here, I keep the appsrc but don't 
force h264 decoding through omxh264dec but instead configure the rpicamsrc to 
give me raw frames:

```
glvideomixer name=m ! tee name=t    t. ! queue name=display_queue ! qmlglsink 
name=sink    t. ! queue name=record_queue ! glcolorconvert ! gldownload ! 
video/x-raw,format=ARGB ! videoconvert ! omxh264enc control-rate=1 target-
bitrate=1145000 ! video/x-h264,profile=baseline ! h264parse ! avimux ! 
filesink location=test.avi     rpicamsrc preview=false ! video/x-
raw,format=RGBA,width=640,height=480,framerate=25/1 ! glupload ! m.    appsrc 
name=overlaysrc blocksize=1228800 stream-type=0 is-live=true format=time ! 
rawvideoparse format=rgba width=640 height=480 frame-size=1228800 
framerate=5/1 ! video/x-raw,format=RGBA,width=640,height=480,framerate=5/1 ! 
glupload ! m.
```

Thanks

-- 
Milian Wolff | milian.wolff at kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3826 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191126/d370e1ed/attachment.bin>


More information about the gstreamer-devel mailing list