2026-04-07 16:26:39 +08:00

39 lines
960 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: add_novocal_track
description: this skill sperates music video to pure video and pure audio files and use demucs sperates audio to get novocal audio file and compose pure video, pure audio and novocal audio into a singe KTV video file
---
# add_novocal_track
为歌曲视频增加伴奏音轨输出符合KTV音乐标准的视频文件
## 初始化
* 需要在GPU主机上执行
* 需要安装ffmpeg
* 需要安装demucs
* assets目录下的955717e8-8726e21a.th文件需要复制到~/.cache/torch/hub/checkpoints目录下
在此skill目录下执行
```
sudo apt install ffmpeg
python3 -m venv py3
py3/bin/pip install demucs
mkdir -p ~/.cache/torch/hub/checkpoints
cp assets/955717e8-8726e21a.th ~/.cache/torch/hub/checkpoints
```
## 添加伴奏音轨
### 输入参数
```
{
"video_file": # 输入音乐视频文件
}
```
### 输出参数
{
"ktv_file": # 输出ktv视频文件
}
### 执行命令
```
bash scripts/add_novocal_track.sh
```