[FFmpeg-user] importing rtp packet stream and decoding

Dave Horton daveh at beachdognet.com
Tue Sep 19 16:59:15 EEST 2017

I don't know how to feed the captured rtp stream, my
guess is you have to edit the sdp file and resend the


Yes, I am starting to think this could be quite complicated.  I have a pcap file with rtp, and I have the related SDPs for the two streams, but after looking into the ffmpeg code a bit it seems like it can only take rtp streams from a network port, not a file, which seems to mean that I would have to:

- rewrite the udp headers to change the src and dest addresses to localhost from their original values
- probably this means updating the checksums in the udp packets as well
- do the same with the sdps
- find some way to play the (modified) rtp stream from a file to a localhost udp port (I don’t think ffmpeg can do this, since it can’t take rtp input from a file?)
- spawn an instance of ffmpeg, feed it the modified sdp and point it to the localhost port for rtp input to get a decoded version of the audio out

The whole thing seems pretty complicated and likely to be quite brittle…unless I am missing something ?

More information about the ffmpeg-user mailing list