sourcey / libsourcey

C++14 evented IO libraries for high performance networking and media based applications
https://sourcey.com/libsourcey
GNU Lesser General Public License v2.1
1.32k stars 349 forks source link

looking for some hint in rtp stream record #149

Closed notedit closed 7 years ago

notedit commented 7 years ago

hi:

i am do some rtp recording project, my first version is use ffmpeg command directly.

i want to make it more flexible, thinking use libsourcey.

i have vp8 and opus rtp packet, and want to save to webm format.

can you give me some guidance to do this? i am not familiar with c++ code.

thanks.

auscaster commented 7 years ago

LibSourcey has wrappers around the media encoding/decoding parts of ffmpeg, but not the RTP streaming interface, therefore you would need to implement that with raw ffmpeg code.

This code shows how to H264 encode from a raw device source: https://github.com/sourcey/libsourcey/blob/master/src/av/samples/devicerecorder/devicerecorder.cpp

So if you can pipe the raw rtp data into the av::MultiplexEncoder then you can get it working.