Skip to content

Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.

Reduce configuration options and update README

沈浩940a2cf10746
diff --git a/.gitignore b/.gitignore
index 5fcb3074..7a021ea5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.idea
tasks/
cookies.txt
-.vscode/
\ No newline at end of file
+.vscode/
+config/config.toml
\ No newline at end of file
diff --git a/README.md b/README.md
index c66fa644..f7bf5b2c 100644
--- a/README.md
+++ b/README.md
@@ -20,3 +20,24 @@ Krillin AI 是一个专为追求高质量视频处理的用户和开发者设计
🔄 **自定义词汇替换**:支持一键替换词汇,优化翻译连贯性,适应特定领域或品牌的语言风格。
🌍 **专业级翻译**:整句翻译引擎,确保上下文一致,避免片段化表达。
🎙️ **多样化配音选择**:支持阿里云、Google Cloud、Azure等主流TTS服务,满足不同场景下的需求。
+
+---
+
+## 快速开始
+### 基本步骤
+1. 安装依赖:yt-dlp和ffmpeg
+2. 下载release中的可执行文件,放入空文件夹
+3. 在文件夹内创建config.toml文件,复制config目录下的config-example.toml文件的内容,并对照填写你的配置信息。
+4. 双击可执行文件,启动服务
+5. 打开浏览器,输入http://127.0.0.1:8888,开始使用 (8888替换成你在配置文件中填写的端口)
+
+### 依赖安装帮助
+todo
+
+### Cookie配置说明
+todo
+
+---
+## 贡献规范
+1. 不要提交无用文件,如.vscode、.idea等,请善于使用.gitignore过滤
+2. 不要提交config.toml,而是使用config-example.toml提交
\ No newline at end of file
diff --git a/config/config.toml b/config/config-example.toml
similarity index 71%
rename from config/config.toml
rename to config/config-example.toml
index 5b453c65..30f1cab0 100644
--- a/config/config.toml
+++ b/config/config-example.toml
@@ -1,5 +1,4 @@
[app]
- base_path = "./tasks"
segment_duration = 5
translate_parallel_num = 5
diff --git a/config/config.go b/config/config.go
index 7d59636a..9d6fff15 100644
--- a/config/config.go
+++ b/config/config.go
@@ -5,9 +5,8 @@ import (
)
type App struct {
- BasePath string `toml:"base_path"`
- SegmentDuration int `toml:"segment_duration"`
- TranslateParallelNum int `toml:"translate_parallel_num"`
+ SegmentDuration int `toml:"segment_duration"`
+ TranslateParallelNum int `toml:"translate_parallel_num"`
}
type Server struct {
diff --git a/internal/service/subtitle_service.go b/internal/service/subtitle_service.go
index 8a5510a0..bbdc1655 100644
--- a/internal/service/subtitle_service.go
+++ b/internal/service/subtitle_service.go
@@ -71,7 +71,7 @@ func (s Service) StartSubtitleTask(req dto.StartVideoSubtitleTaskReq) (*dto.Star
var err error
ctx := context.Background()
// 创建字幕任务文件夹
- taskBasePath := filepath.Join(config.Conf.App.BasePath, taskId)
+ taskBasePath := filepath.Join("./tasks", taskId)
if _, err = os.Stat(taskBasePath); os.IsNotExist(err) {
// 不存在则创建
err = os.MkdirAll(taskBasePath, os.ModePerm)