gstreamer:在rtp上流g726编码音频

时间:2014-06-08 21:54:43

标签: gstreamer

我正在尝试将adpcm(G726),32kbps音频从主机传输到客户端 RTP:

我尝试过来自客户端(接收方)和主机(发送方)的命令。 两块板都通过IP连接。

一旦我运行cmds,我就会在接收器上收到“内部数据流错误” 发件人:

RECEIVER:

gst-launch -v udpsrc port=3004 caps="application/x-rtp” ! rtpg726depay !
ffdec_g726 ! alsasink

SENDER:

gst-launch -v autoaudiosrc ! audioconvert ! audioresample ! ffenc_g726
bitrate=32000 ! rtpg726pay ! udpsink host=192.168.1.104 port=3004

如果我尝试使用pcm,alaw编码器和解码器,那么流式传输工作 精细。我可以听到现场音频(当我在发送者的麦克风上发言时) 接收器的扬声器:

命令我在这种情况下运行:

RECEIVER:

gst-launch udpsrc port=3004 caps="application/x-rtp" ! rtppcmadepay ! alawdec 
! alsasink

SENDER:

gst-launch autoaudiosrc ! audioconvert ! audioresample  ! alawenc ! rtppcmapay
! udpsink host=192.168.1.104 port=3004

这似乎是管道中的一个问题?

这是我在接收器上得到的完整错误

///////////////
root@am335x-evm:~/EVM4# gst-launch udpsrc port=3004 caps="application/x-rtp" !
rtpg726depay ! ffdec_g726 ! alsasink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data
flow error.
Additional debug info:
gstbasesrc.c(2625): gst_base_src_loop ():
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 20828810227 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

0 个答案:

没有答案