Implement configuration management for multi-streamer support and update .gitignore
This commit is contained in:
parent
dd8abf03d3
commit
7f8b3d1bf9
6 changed files with 655 additions and 77 deletions
28
config/global.json.example
Normal file
28
config/global.json.example
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"$schema": "./global.schema.json",
|
||||
"quality": "best",
|
||||
"root_path": "archive",
|
||||
"rclone_path": "remote:path/to/streams",
|
||||
"refresh": 60.0,
|
||||
"notifications": 0,
|
||||
"downloadMETADATA": 1,
|
||||
"downloadVOD": 1,
|
||||
"downloadCHAT": 1,
|
||||
"downloadLiveCHAT": 1,
|
||||
"vodTimeout": 300,
|
||||
"uploadCloud": 1,
|
||||
"deleteFiles": 0,
|
||||
"onlyRaw": 0,
|
||||
"cleanRaw": 1,
|
||||
"hls_segments": 3,
|
||||
"hls_segmentsVOD": 10,
|
||||
"streamlink_ttvlol": 0,
|
||||
"ffmpeg_hwaccel": "auto",
|
||||
"ffmpeg_threads": 0,
|
||||
"ffmpeg_audio_codec": "aac",
|
||||
"ffmpeg_audio_samplerate": 48000,
|
||||
"ffmpeg_audio_bitrate": "192k",
|
||||
"ffmpeg_error_recovery": 1,
|
||||
"ffmpeg_faststart": 1,
|
||||
"ffmpeg_progress": 0
|
||||
}
|
||||
159
config/global.schema.json
Normal file
159
config/global.schema.json
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "https://github.com/piero0920/Twitch-Archive/config/global.schema.json",
|
||||
"title": "Twitch Archive Global Configuration",
|
||||
"description": "Global settings and defaults for all streamers",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"quality": {
|
||||
"type": "string",
|
||||
"enum": ["best", "source", "high", "720p", "medium", "480p", "low", "360p", "audio_only"],
|
||||
"default": "best",
|
||||
"description": "Default video quality for stream recording"
|
||||
},
|
||||
"root_path": {
|
||||
"type": "string",
|
||||
"default": "archive",
|
||||
"description": "Root directory path where all archives are saved"
|
||||
},
|
||||
"rclone_path": {
|
||||
"type": "string",
|
||||
"default": "remote:path/to/streams",
|
||||
"description": "Default rclone remote path for cloud uploads (can be overridden per streamer)"
|
||||
},
|
||||
"refresh": {
|
||||
"type": "number",
|
||||
"default": 60.0,
|
||||
"minimum": 1.0,
|
||||
"description": "Time between status checks in seconds (60.0 recommended for multiple streamers)"
|
||||
},
|
||||
"notifications": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 0,
|
||||
"description": "Email notifications: 0 = disabled, 1 = enabled"
|
||||
},
|
||||
"downloadMETADATA": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 1,
|
||||
"description": "Download stream metadata: 0 = disabled, 1 = enabled"
|
||||
},
|
||||
"downloadVOD": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 1,
|
||||
"description": "Download VODs after stream ends: 0 = disabled, 1 = enabled"
|
||||
},
|
||||
"downloadCHAT": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 1,
|
||||
"description": "Download and render chat from VOD: 0 = disabled, 1 = enabled"
|
||||
},
|
||||
"downloadLiveCHAT": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 1,
|
||||
"description": "Download chat during live stream: 0 = disabled, 1 = enabled"
|
||||
},
|
||||
"vodTimeout": {
|
||||
"type": "integer",
|
||||
"default": 300,
|
||||
"minimum": 0,
|
||||
"description": "Seconds to wait for VOD to appear after stream ends"
|
||||
},
|
||||
"uploadCloud": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 1,
|
||||
"description": "Upload to rclone remote: 0 = disabled, 1 = enabled"
|
||||
},
|
||||
"deleteFiles": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 0,
|
||||
"description": "Delete local files after upload: 0 = disabled, 1 = enabled (BE CAREFUL)"
|
||||
},
|
||||
"onlyRaw": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 0,
|
||||
"description": "Keep only raw .ts files: 0 = convert to mp3/mp4, 1 = keep raw only"
|
||||
},
|
||||
"cleanRaw": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 1,
|
||||
"description": "Delete raw .ts files after processing: 0 = keep, 1 = delete"
|
||||
},
|
||||
"hls_segments": {
|
||||
"type": "integer",
|
||||
"default": 3,
|
||||
"minimum": 1,
|
||||
"maximum": 10,
|
||||
"description": "Number of parallel download threads for live streams (1-10, recommended 2-3)"
|
||||
},
|
||||
"hls_segmentsVOD": {
|
||||
"type": "integer",
|
||||
"default": 10,
|
||||
"minimum": 1,
|
||||
"maximum": 10,
|
||||
"description": "Number of parallel download threads for VODs (1-10)"
|
||||
},
|
||||
"streamlink_ttvlol": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 0,
|
||||
"description": "DEPRECATED: Ad-blocking with ttvlol (--twitch-proxy-playlist removed in newer streamlink)"
|
||||
},
|
||||
"ffmpeg_hwaccel": {
|
||||
"type": "string",
|
||||
"enum": ["auto", "nvenc", "qsv", "amf", "vaapi", "none"],
|
||||
"default": "auto",
|
||||
"description": "Hardware acceleration: auto (recommended), nvenc (NVIDIA), qsv (Intel), amf (AMD), vaapi (Linux), none (software only)"
|
||||
},
|
||||
"ffmpeg_threads": {
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"minimum": 0,
|
||||
"description": "FFmpeg encoding thread count (0 = auto-detect optimal count)"
|
||||
},
|
||||
"ffmpeg_audio_codec": {
|
||||
"type": "string",
|
||||
"enum": ["aac", "libmp3lame"],
|
||||
"default": "aac",
|
||||
"description": "Audio codec for audio_only quality streams (aac recommended)"
|
||||
},
|
||||
"ffmpeg_audio_samplerate": {
|
||||
"type": "integer",
|
||||
"enum": [44100, 48000],
|
||||
"default": 48000,
|
||||
"description": "Audio sample rate in Hz (48000 recommended for broadcasts, 44100 for CD quality)"
|
||||
},
|
||||
"ffmpeg_audio_bitrate": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+k$",
|
||||
"default": "192k",
|
||||
"description": "Audio bitrate (e.g., 128k, 192k, 256k, 320k)"
|
||||
},
|
||||
"ffmpeg_error_recovery": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 1,
|
||||
"description": "Enable error recovery for corrupted/incomplete streams: 0 = disabled, 1 = enabled"
|
||||
},
|
||||
"ffmpeg_faststart": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 1,
|
||||
"description": "Enable MP4 faststart flag for better streaming/playback: 0 = disabled, 1 = enabled"
|
||||
},
|
||||
"ffmpeg_progress": {
|
||||
"type": "integer",
|
||||
"enum": [0, 1],
|
||||
"default": 0,
|
||||
"description": "Show FFmpeg encoding progress: 0 = silent, 1 = verbose output"
|
||||
}
|
||||
}
|
||||
}
|
||||
5
config/streamers/streamer.json.example
Normal file
5
config/streamers/streamer.json.example
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"$schema": "./streamer.schema.json",
|
||||
"username": "streamer_username",
|
||||
"enabled": false
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue