Configuration
Enable the feature and specify the script command inconfig/config.ini:
是否录制完成后执行自定义脚本 to 否 to disable without removing the command.
Supported script types
- Python scripts — invoked when the command contains
python - Windows batch files (
.bat) — invoked directly by the shell on Windows - Linux bash scripts — invoked directly by the shell on Linux
Parameters passed to scripts
The recorder appends parameters to your command automatically after recording finishes.Python scripts
Named arguments are appended:| Parameter | Type | Description |
|---|---|---|
--record_name | string | Sequence number and anchor display name, e.g. 序号1 AnchorName |
--save_file_path | string | Absolute path to the recorded file (last segment if segmented) |
--save_type | string | Format used: TS, FLV, MKV, MP4, MP3音频, or M4A音频 |
--split_video_by_time | bool | Whether segment recording was active (True/False) |
--converts_to_mp4 | bool | Whether auto-convert to MP4 was active (True/False) |
Batch and bash scripts
Positional arguments are appended in this order:| Position | Value |
|---|---|
| 1 | Anchor name (without sequence prefix) |
| 2 | Absolute path to the recorded file |
| 3 | Save format (TS, FLV, etc.) |
| 4 | split_video_by_time:True or split_video_by_time:False |
| 5 | converts_to_mp4:True or converts_to_mp4:False |
Example scripts
On Linux, bash scripts must have If either requirement is missing, the script will fail with a permission error.
#!/bin/bash as the first line and the executable bit set: