Recording with FFMPEG ?

Hi,
I found some scripts for recording streams on Media soup3 using Gstreamer or FFMPEG

But I could not find anything that suits with the media soup official demo

Has anyone has a snippet or some idea about how to do that ?

Here is an incomplete snippet for FFMPEG

sdp.txt


v=0
o=- 0 0 IN IP4 163.172.45.227
s=FFmpeg
c=IN IP4 163.172.45.227
t=0 0
m=video [mediasoup consumer rtp port] RTP/AVP 120
a=rtpmap :120 VP8/90000
a=sendonly
m=audio [mediasoup consumer rtp port] RTP/AVP 109
a=rtpmnap:109 opus/48000/2
a=sendonly

 ffmpeg -protocol_whitelist file,udp,rtp -fflags +genpts -f sdp -i sdp.txt -map 0:v:0 -c:v copy -map 0:a:0 -strict 2 -c:a copy -flags +global_header file.webm