Back to All Guides
softwareAugust 14, 20266 min readRTSPLink Dev Team

FFmpeg 24/7 RTSP Recording & Hourly MP4 File Segmentation

Build a continuous 24/7 CCTV DVR recording pipeline that splits RTSP video into clean 60-minute MP4 files.

#FFmpeg#Recording#DVR#Segmentation#MP4
Live Stream Workbench

Need a live RTSP stream link right now to test this setup in VLC or OpenCV?

Test Live Stream

#1Segmented FFmpeg Recording Command

Use the segment muxer with strftime to name output files with the current date and time:

Hourly Segmented MP4 Recording
ffmpeg -rtsp_transport tcp -i "rtsp://rtsplink.com/live/test?token=demo" \
  -c copy -f segment -segment_time 3600 -segment_format mp4 \
  -reset_timestamps 1 -strftime 1 \
  "/recordings/cam_%Y-%m-%d_%H-%M-%S.mp4"

Ready to test your live RTSP video stream?

Generate free authenticated RTSP links with unlimited bandwidth and inspect frame timestamps in seconds.

Generate Free RTSP Link

Related Tutorials & Setup Guides

View all 100+ guides