# Mediasoup + Gstreamer pipeline to record streams

**URL:** <https://mediasoup.discourse.group/t/mediasoup-gstreamer-pipeline-to-record-streams/6850>\
**Category:** mediasoup libraries\
**Created:** [August 30, 2025, 1:18am UTC](https://mediasoup.discourse.group/t/mediasoup-gstreamer-pipeline-to-record-streams/6850 "2025-08-30T01:18:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VanshRana-1004](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/vanshrana-1004/32/2932_2.png) [@VanshRana-1004](https://mediasoup.discourse.group/u/VanshRana-1004)\
**Post date:** [August 30, 2025, 1:18am UTC](https://mediasoup.discourse.group/t/mediasoup-gstreamer-pipeline-to-record-streams/6850/1 "2025-08-30T01:18:45Z")

</div>

I am working on a video calling project along with session recordings, mediasoup part for streaming is done, but facing problem in recording, my approach

- for each producer present in a room, i created a dedicated plain transport (listening to some udp port selected by OS itself)
- the plain transport is connected to some other udp port where it will be forwarding packets (used port pooling here)
- every thing is working up to here now i just want to record the incoming RTP packets using gstreamer pipeline (trying to do this step by step for now just for one video stream)  
i have some info as well such as  
consumerId : ‘1864afc7-fe02-41cc-889b-d310993545a3’  
kind : ‘video’  
codec : ‘video/H264’  
payloadType : 101  
clockRate : 90000  
ssrc : 658844601  
port :42001  
profileLevelId : ‘42e01f’

but still facing problem with my gstreamer pipeline as the pipeline just failed saying : “Received invalid RTP payload, dropping”  
here’s my pipeline btw : gst-launch-1.0 -e -v udpsrc port=42001 caps=“application/x-rtp,media=video,encoding-name=H264,payload=101,clock-rate=90000,ssrc=658844601,profile-level-id=42e01f” ! rtpjitterbuffer ! rtph264depay ! h264parse config-interval=1 ! mp4mux faststart=true ! filesink location=recording.mp4

let me also share my server repo link : [version-0/server at main · VanshRana-1004/version-0 · GitHub](https://github.com/VanshRana-1004/version-0/tree/main/server)
