Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gstreamer 从alsasrc获取警告消息_Gstreamer_Alsa_V4l2 - Fatal编程技术网

Gstreamer 从alsasrc获取警告消息

Gstreamer 从alsasrc获取警告消息,gstreamer,alsa,v4l2,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-stre

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

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

那么如何克服它呢?

这个问题和警告信息所说的是一样的
,这很可能是因为下游跟不上,而且消耗样品的速度太慢。

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

  • 队列
    也添加到视频分支
  • 将property
    sync=false
    设置为udpsink(在某些情况下可以工作,但当然不是很好,因为它可能会在某些部分导致奇怪的速度)
  • 将属性
    provide clock=false
    设置为alsasrc(在某些情况下,当音频时钟不好时可能会工作)
  • 在视频处理分支中调整管道以提高速度

  • 如果无法调整管道,则唯一选项是。。。。停止打印调试日志,并接受此限制…

    感谢您的帮助,我尝试了上述选项,但问题仍然存在。
    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.