[FFmpeg-user] importing rtp packet stream and decoding

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri Sep 15 21:08:23 EEST 2017


2017-09-15 19:49 GMT+02:00 Dave Horton <daveh at beachdognet.com>:
> On Fri, Sep 15, 2017 at 1:41 PM, Carl Eugen Hoyos <ceffmpeg at gmail.com>
> wrote:
>
>> 2017-09-15 19:36 GMT+02:00 Dave Horton <daveh at beachdognet.com>:
>> > Does anyone have a good recipe or example on how to import an rtp stream
>> and decode it with ffmpeg.  I have both the rtp file and the associate SDP
>> description of the payloads, but haven’t been able to pipe it into ffmpeg
>> to have it decoded.
>>
>> Both sending and receiving opus via rtp is implemented in FFmpeg,
>> what did you try?

> I tried
>
>  ffmpeg -loglevel debug -f rtp -c:a opus -i call2.rtpdump -ar 48000
> call2.mp3
>
> does that look right?

I tested the following in one terminal (assuming long input):
$ ffmpeg -i input -acodec opus -strict -2 -f rtp rtp://127.0.0.1/1234 >out.sdp

and in a second terminal:
$ ffplay -protocol_whitelist rtp,file,udp -i out.sdp

> I get 'Unsupported RTP version packet received' and a whole bunch of
> 'Received too short packet' so perhaps my data is bad.

Maybe, but I suspect you have to pass the sdp info.

> But I am wondering where/how to give ffmpeg the sdp information so it will
> now how to decode the payload types etc

Put it into a file and pass that to FFmpeg (should get auto-detected).

Carl Eugen


More information about the ffmpeg-user mailing list