Skip to main content
Segment recording splits a continuous live stream into separate files of a fixed duration. This makes it easier to manage long streams, upload individual segments, and survive unexpected interruptions without losing the entire recording.

Configuration

分段录制是否开启 = 是
视频分段时间(秒) = 1800
The default segment duration is 1800 seconds (30 minutes). Set this to any number of seconds.
For streams that run several hours, a segment duration of 1800–3600 seconds (30–60 minutes) is a good balance between file manageability and the overhead of creating many small files. Very short segments (under 5 minutes) can produce files with incomplete keyframe headers that are difficult to seek in.

How segmentation works

When segment recording is enabled, FFmpeg writes each segment to a numbered file using the segment muxer:
ffmpeg -i <stream_url> \
  -c:v copy -c:a copy -map 0 \
  -f segment \
  -segment_time 1800 \
  -segment_format mpegts \
  -reset_timestamps 1 \
  anchor_name_2024-01-01_12-00-00_%03d.ts
Files are named with a three-digit zero-padded counter: _000.ts, _001.ts, _002.ts, and so on. The same segmentation pattern applies to all video formats (TS, FLV, MKV, MP4). The FFmpeg segment format flag changes accordingly (flv, matroska, mp4, etc.).

Auto-convert with segments

When both segment recording and auto-convert to MP4 are enabled, each segment is converted to MP4 independently after the recording session ends. Segments are identified by their shared filename prefix, and a background conversion thread is started for each one.
分段录制是否开启 = 是
视频分段时间(秒) = 1800
录制完成后自动转为mp4格式 = 是
追加格式后删除原文件 = 是
This produces a series of MP4 files: anchor_000.mp4, anchor_001.mp4, etc.

Timestamp subtitle files

The 生成时间字幕文件 option generates an SRT subtitle file alongside the recording. Each subtitle entry contains the wall-clock timestamp, updated every second, so you can see exactly when any moment in the video occurred.
生成时间字幕文件 = 否
Timestamp subtitle file generation is automatically disabled when segment recording is active. The two features are mutually exclusive — segment recording resets timestamps at each segment boundary, which makes a continuous subtitle file meaningless.

Stopping a segmented recording

On Windows, run StopRecording.vbs or press Ctrl+C in the recording window. To stop only one room without stopping others, prefix its URL with # in URL_config.ini. The recorder will finish writing the current segment, close the file cleanly, and exit that thread.

Build docs developers (and LLMs) love