[FFmpeg-user] importing rtp packet stream and decoding

Dave Horton daveh at beachdognet.com
Fri Sep 22 22:41:50 EEST 2017


>> Sorry, my bad ā€” I was able to fix that error ā€” which was a simple typo in my command that led to a blank output url.

>> With that fixed, I get further:

Now I have figured out why the audio sounded like crap.  The problem was that ffmpeg was treating the input stream as pcma, when it in fact was pcmu.
The issue is that the SDP indicated that the audio endpoint was able to receive _either_ pcmu or pcma ā€” both were in the SDP, as follows:

v=0
o=root 2116403914 2116403914 IN IP4 81.201.82.161
s=session
c=IN IP4 127.0.0.1
t=0 0
m=audio 40558 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtcp:40559
a=ptime:20
a=sendrecv
a=silenceSupp:off - - - -

However, the rtp stream contained only PCMU audio.  The payload type of 0 in the RTP header should have clued ffmpeg in that this was PCMU, as per the SDP.  Yet ffmpeg logged out that it was PCMA and transcoded it as such, incorrectly.

This seems like a bug to me, should I recreate on HEAD and open a ticket somewhere?

Iā€™m still wondering about to sync my sending side with ffmpeg being ready to receive, and also if lengthier decodes are expected when using rtp vs file




More information about the ffmpeg-user mailing list