I have an IP camera that I would like to record to network storage as MP4 files either 24X7 or triggered by motion. I would like to use a Raspberry Pi to open the RTSP stream and write the output video files (I can use VLC to open the raw video stream).

All the articles about RTSP seem to be using the Pi as an RTSP server; I just want to open the raw video from an external camera (I have several) and record the video, making the Pi a cheap DVR.

Ultimately I would like to use the Pi to open streams from several cameras, including a PiCamera, and record a few minutes of video every time motion is detected on a stream. But for now, I'd like to get to first base. I could actually dedicate a Pi to each camera, since their price point is so low, then they could all write to a network share.

1 Answer 1


Actually, there are application that do functionnalities you are looking for.

  • Zoneminder for example can work on a rpi and you can manage, record, etc. from there
  • If you want to do it manually, with ffmpeg for example ffmpeg -i rtmp://source.com/live/stream -c copy -flags +global_header -f segment -segment_time 60 -segment_format_options movflags=+faststart -reset_timestamps 1 test%d.mp4 (source here)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.