title: ffmpeg - capturing RTP stream to video file and ffplay simultaneously
body: <p>I want to capture an RTP stream to a video file, and monitor it at the same time.</p>
  <p>Given a .sdp file, I can capture the stream with:</p>
  <p><code>ffmpeg -y -protocol_whitelist file,rtp,udp -i video.sdp -an -c:v copy out.mp4</code></p>
  <p>And I can play the live stream with:</p>
  <p><code>ffplay -protocol_whitelist file,rtp,udp -i video.sdp</code></p>
  <p>But I want to do the same thing simultaneously.</p>
  <p>I can't run both processes at the same time because I can't bind the two processes to the same port. I've also tried using <a href="https://superuser.com/questions/343586/how-to-display-and-capture-webcam-stream-at-the-same-time"><code>tee</code></a>, but I've run into issues where the muxer doesn't support non-seekable output (I suspect because I'm outputting to .mp4).</p>
  <p>How can I record and playback at the same time?</p>