Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

This is the sdp:

v=0
o=root 807151903 807151903 IN IP4 104.154.78.142
s=Asterisk PBX 11.18.0
c=IN IP4 104.154.78.142
t=0 0
m=audio 13822 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

I'm taking all the payloads and combine them to one file using rdp-parser.

var b = p.parseRtpPacket(msg)
fs.appendFileSync("./b", b.payload)

I also tried other RTP parse libraries to be sure it's not the issue with the parser.

Then I'm running ffmpeg:

ffmpeg -f mulaw -ar 8000 -i b  a.wav

Now I'm playing the file. I'm hearing my voice, and lot of noise in the background. Why? and how to fix it?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
198 views
Welcome To Ask or Share your Answers For Others

1 Answer

You should use the -alaw format instead. And it will work for you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...