我有一個pcm音頻文件,我想通過rtp流。當我做Gstreamer。 PCM流
gst-launch-1.0 filesrc location=AudioRaw515151.pcm ! audio/x-raw, format=S16LE, channels=1, layout=interleaved, rate=8000 ! alawenc ! rtppcmapay ! udpsink host=192.168.2.5 port=5010
我有那樣的消息
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.019270487
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
,但我可以播放音頻,這意味着,音頻正常。
gst-launch-1.0 filesrc location=AudioRaw515151.pcm ! audio/x-raw, format=S16LE, channels=1, layout=interleaved, rate=8000 ! alawenc ! rtppcmapay ! rtppcmdepay ! alawdec ! audiosink
我試圖把另一個文件,avi文件,採取音頻從它和maked同樣的事情
gst-launch-1.0 filesrc location=file.avi^
! qtdemux name=mux^
! queue^
! faad^
! audioconvert^
! audioresample^
! "audio/x-raw, layout=(string)interleaved, rate=(int)8000"^
! alawenc^
! rtppcmapay^
! queue^
! udpsink host=192.168.2.5 port=5010
正如你看到的,這同樣的事情,但與AVI有聲。一切正常。
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
當我打開Wireshark的我看到,當我跑我與PCM管道,它觸發所有的數據沒有任何延遲,並在我發送的每個數據包是:
Header checksum: 0x0000 [incorrect, should be 0x40b5 (may be caused by "IP checksum offload"?)]
Message: Bad checksum
所以這是一個問題。我認爲我有時間戳或類似的問題,當我做!alawenc(編碼爲G711)時,我說得對? 什麼解決方案可以解決這個問題?
我有接收視頻,但沒有音頻我錯過? –