从 alsasrc 获取警告消息

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

在管道上方执行时,我不断收到以下警告消息..

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.

那么如何克服呢??

问题与警告消息所述相同This is most likely because downstream can't keep up and is consuming samples too slowly.

换句话说,你的进程很慢,因此跟不上输入的速度。 从最高优先级开始尝试以下解决方案:

  1. 也将 queue 添加到视频分支
  2. 将属性 sync=false设置为udpsink(在某些情况下工作,但当然不是很好,因为它可能会导致某些部分速度怪异)
  3. 将 属性 provide-clock=false 设置为 alsasrc(在音频时钟不好的某些情况下可能会起作用)
  4. 调整管道以提高视频处理分支的速度

如果您无法调整管道,唯一的选择是....停止打印调试日志,并将其视为限制...