Stream recorder. Such as RTSP, M3U8, etc.
60
Small Docker service that records a network stream into video files.
You give it a stream URL in .env, start the container, and it writes video files into the records folder.
.envSTREAM_URL=rtsp://user:password@camera-host:554/stream
RECORD_MODE=transcode
OUTPUT_FORMAT=mkv
OUTPUT_DIR=/records
SEGMENT_SECONDS=auto
MAX_SEGMENT_MB=100
TARGET_TOTAL_BITRATE_KBIT=1000
RECONNECT_DELAY_SECONDS=5
RECONNECT_DELAY_MAX_SECONDS=10
RTSP_TRANSPORT=tcp
FFMPEG_LOGLEVEL=warning
OUTPUT_FPS=5
VIDEO_BITRATE=900k
VIDEO_MAXRATE=900k
VIDEO_BUFSIZE=1800k
AUDIO_BITRATE=64k
GOP_SIZE=10
It can work with things like:
rtsprtmpm3u8http/https video streamsIf the stream disappears, the current file is closed, a message is written to the log, and the service keeps trying again after a short pause.
Files are split into parts, so you do not end up with one huge recording.
docker compose up -d --build
Recorded files will appear in:
./records
.envSTREAM_URL=rtsp://192.168.1.200:8554/live/stream
RECORD_MODE=transcode
OUTPUT_FORMAT=mkv
OUTPUT_DIR=/records
SEGMENT_SECONDS=auto
MAX_SEGMENT_MB=100
TARGET_TOTAL_BITRATE_KBIT=1000
RECONNECT_DELAY_SECONDS=5
RECONNECT_DELAY_MAX_SECONDS=10
RTSP_TRANSPORT=tcp
FFMPEG_LOGLEVEL=warning
OUTPUT_FPS=5
VIDEO_BITRATE=900k
VIDEO_MAXRATE=900k
VIDEO_BUFSIZE=1800k
AUDIO_BITRATE=64k
GOP_SIZE=10
mkv is the safest output format if the stream is unstablecopy keeps the original quality, but files can be biggertranscode makes smaller files and gives more control over bitrate and fpsContent type
Image
Digest
sha256:9b842b360…
Size
246.3 MB
Last updated
about 2 months ago
docker pull alex778/stream-recorder