从alsasrc获取警告消息

时间:2016-03-02 10:10:58

标签: gstreamer alsa v4l2

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.

那么如何克服它?

1 个答案:

答案 0 :(得分:2)

问题与 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. 调整视频处理分支中提高速度的管道
  5. 如果您无法调整管道,只有选项是....停止打印调试日志,并接受此限制...