Search code examples
gstreameralsav4l2

Getting Warning messages from alsasrc


gst-launch-1.0 v4l2src ! videoconvert ! video/x-raw,format=I420 ! videoparse width=640 height=480 framerate=30/1 ! x264enc bitrate=2048 ref=4 key-int-max=20 byte-stream=true tune=zerolatency ! video/x-h264,stream-format=byte-stream,profile=main ! queue ! mux. alsasrc ! audioparse rate=44100 format=raw raw-format=s16le channels=2 ! faac perfect-timestamp=true ! aacparse ! queue ! mux. mpegtsmux name=mux ! rtpmp2tpay ! udpsink host=10.0.0.239 port=9090 sync=true async=false qos=true qos-dscp=46

While Executing above pipeline I am receiving below warning messages continuously..

Additional debug info:
gstaudiobasesrc.c(863): gst_audio_base_src_create (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
Dropped 12789 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
WARNING: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Can't record audio fast enough
Additional debug info:
gstaudiobasesrc.c(863): gst_audio_base_src_create (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
Dropped 8820 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.

So how to overcome it??


Solution

  • The problem is same as warning message said This is most likely because downstream can't keep up and is consuming samples too slowly.

    In other word, your process is slow and thus cannot keep up the speed of input. Try below solutions, from highest priority:

    1. Add queue to video branch as well
    2. Set property sync=false to udpsink (work in some cases, but of course not very good as it may causes weird speed at some parts)
    3. Set property provide-clock=false to alsasrc (may work in certain cases when audio clock is bad)
    4. Tweak the pipeline to improve speed in video processing branch

    If you cannot tweak the pipeline, only option is .... stop printing the debug log, and accept this as limitation ...