2026-02-09 22:20:04 +01:00
|
|
|
{
|
|
|
|
|
"$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": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": false,
|
|
|
|
|
"description": "Email notifications: false = disabled, true = enabled"
|
2026-02-09 22:20:04 +01:00
|
|
|
},
|
|
|
|
|
"downloadMETADATA": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Download stream metadata: false = disabled, true = enabled"
|
2026-02-09 22:20:04 +01:00
|
|
|
},
|
|
|
|
|
"downloadVOD": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Download VODs after stream ends: false = disabled, true = enabled"
|
2026-02-09 22:20:04 +01:00
|
|
|
},
|
|
|
|
|
"downloadCHAT": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Download and render chat from VOD: false = disabled, true = enabled"
|
2026-02-09 22:20:04 +01:00
|
|
|
},
|
|
|
|
|
"downloadLiveCHAT": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Download chat during live stream: false = disabled, true = enabled"
|
2026-02-09 22:20:04 +01:00
|
|
|
},
|
2026-02-10 00:06:49 +01:00
|
|
|
"mergeVideoChat": {
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Merge video and chat into a single file: false = disabled, true = enabled"
|
|
|
|
|
},
|
|
|
|
|
"mergeChatLayout": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"enum": ["side-by-side", "overlay"],
|
|
|
|
|
"default": "side-by-side",
|
|
|
|
|
"description": "Chat merge layout: side-by-side (video + chat horizontally) or overlay (chat overlaid on video)"
|
|
|
|
|
},
|
2026-02-09 22:20:04 +01:00
|
|
|
"vodTimeout": {
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"default": 300,
|
|
|
|
|
"minimum": 0,
|
|
|
|
|
"description": "Seconds to wait for VOD to appear after stream ends"
|
|
|
|
|
},
|
|
|
|
|
"uploadCloud": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Upload to rclone remote: false = disabled, true = enabled"
|
2026-02-09 22:20:04 +01:00
|
|
|
},
|
feat: add upload options for pre-merge, merged, and standalone chat videos
- Updated global schema to include options for uploading original videos before merging, merged videos, and standalone chat videos.
- Modified constants to set default values for new upload options.
- Enhanced FileManager to handle new upload options, including conditional file uploads and deletions based on user configuration.
- Introduced unit tests for command-line argument parsing, configuration loading, and merging logic, ensuring robust handling of new features.
- Added tests for filtering logic, default configurations, and enabled streamer handling.
2026-02-11 17:44:34 +01:00
|
|
|
"uploadPreMergeVideo": {
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Upload original videos before merging with chat (LIVE and VOD files): false = skip, true = upload"
|
|
|
|
|
},
|
|
|
|
|
"uploadMergedVideo": {
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Upload merged videos (video + chat combined): false = skip, true = upload"
|
|
|
|
|
},
|
|
|
|
|
"uploadChatVideo": {
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Upload standalone chat video files: false = skip, true = upload"
|
|
|
|
|
},
|
2026-02-09 22:20:04 +01:00
|
|
|
"deleteFiles": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": false,
|
|
|
|
|
"description": "Delete local files after upload: false = disabled, true = enabled (BE CAREFUL)"
|
2026-02-09 22:20:04 +01:00
|
|
|
},
|
|
|
|
|
"onlyRaw": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": false,
|
|
|
|
|
"description": "Keep only raw .ts files: false = convert to mp3/mp4, true = keep raw only"
|
2026-02-09 22:20:04 +01:00
|
|
|
},
|
|
|
|
|
"cleanRaw": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Delete raw .ts files after processing: false = keep, true = delete"
|
2026-02-09 22:20:04 +01:00
|
|
|
},
|
|
|
|
|
"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": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": false,
|
2026-02-09 22:20:04 +01:00
|
|
|
"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": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Enable error recovery for corrupted/incomplete streams: false = disabled, true = enabled"
|
2026-02-09 22:20:04 +01:00
|
|
|
},
|
|
|
|
|
"ffmpeg_faststart": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": true,
|
|
|
|
|
"description": "Enable MP4 faststart flag for better streaming/playback: false = disabled, true = enabled"
|
2026-02-09 22:20:04 +01:00
|
|
|
},
|
|
|
|
|
"ffmpeg_progress": {
|
2026-02-09 23:03:05 +01:00
|
|
|
"type": "boolean",
|
|
|
|
|
"default": false,
|
|
|
|
|
"description": "Show FFmpeg encoding progress: false = silent, true = verbose output"
|
2026-02-09 22:20:04 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|