MapZombie
MapZombie

Reputation: 25

Recording RTP stream in segments based off traffic

I'm looking to record multiple multicast RTP audio stream into chunked timestamped files based off the traffic on that live stream.

For example the application would listen to the IP address/port then start recording when RTP traffic is beings streamed, then stop the recording and save the file when the RTP traffic stops.

I've been trying to find examples for how FFMPEG or Gstreamer could do this but have not found anything concrete. Is this possible with one of these applications? If so could you provide an example?

Upvotes: 0

Views: 364

Answers (1)

gst
gst

Reputation: 1285

  1. You can add a probe to the src element and trigger the start/stop recording in the callback function of the probe.

  2. Another simpler version, a pipeline on the following lines will do the trick :

    udpsrc -> rtpbin -> decoder if required -> filesink location=recording.mp4

The above pipeline will record for the complete duration of pipeline being active. Have a look at element rtpbin, to see some more pipeline examples.

Upvotes: 0

Related Questions