简体   繁体   English

GStreamer clock-rate =(int)48000问题

[英]GStreamer clock-rate=(int)48000 issue

I try to playout udp multicast audio stream. 我尝试播放udp多播音频流。

gst-launch-1.0.exe udpsrc multicast-group=239.192.31.65 port=5004 caps="application/x-rtp,channels=(int)2,media=(string)audio,payload=(int)96,clock-rate=(int)44100,encoding-name=(string)L24" ! rtpjitterbuffer latency=10 ! rtpL24depay ! audioconvert ! autoaudiosink sync=false async=false

It works but audio plays slower than original stream due to wrong samplerate. 它可以工作,但是由于采样率错误,音频播放的速度比原始流慢。 Original stream samplerate is 48kHz. 原始流采样率为48kHz。 But if I try to set it, GStreamer quits with error. 但是,如果我尝试设置它,GStreamer会退出并出错。

gst-launch-1.0.exe udpsrc multicast-group=239.192.31.65 port=5004 caps="application/x-rtp,channels=(int)2,media=(string)audio,payload=(int)96,clock-rate=(int)48000,encoding-name=(string)L24" ! rtpjitterbuffer latency=10 ! rtpL24depay ! audioconvert ! autoaudiosink sync=false async=false

Setting pipeline to PAUSED ... 将管道设置为PAUSED ...
Pipeline is live and does not need PREROLL ... 管道是活动的,不需要PREROLL ...
Setting pipeline to PLAYING ... 将管道设置为PLAYING ...
New clock: GstSystemClock 新时钟:GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data stream error. 错误:来自元素/ GstPipeline:pipeline0 / GstUDPSrc:udpsrc0:内部数据流错误。
Additional debug info: 其他调试信息:
gstbasesrc.c(3055): gst_base_src_loop (): gstbasesrc.c(3055):gst_base_src_loop():
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0: / GstPipeline:pipeline0 / GstUDPSrc:udpsrc0:
streaming stopped, reason not-negotiated (-4) 流停止,原因未协商(-4)
Execution ended after 0:00:00.018626636 0:00:00.018626636后执行结束
Setting pipeline to PAUSED ... 将管道设置为PAUSED ...
Setting pipeline to READY ... 将管道设置为READY ...
Setting pipeline to NULL ... 将管道设置为NULL ...
Freeing pipeline ... 释放管道...

I don't understand why. 我不明白为什么。

You wouldn't believe - the problem was in soundcard settings - as soon as I set 48000 in soundcard setting in windows settings it start working! 您不会相信-问题出在声卡设置中-一旦我在Windows设置中的声卡设置中设置了48000,它便开始工作!

声卡窗口设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM