前阵给孩子做电子相册学了点剪辑技术,就想凑个热闹剪剪短剧玩玩,一是学以 致用,再者也好奇短剧创作为啥这么火,跟个风。
初步了解情况后,发现我的剪辑技术已经落后了,行家们玩的主要是解说 , 并且剪辑和解说AI也都会了。真的这么牛吗,最近我也一直在关注各种AI工具,因此花了两个晚上的时间研究体验了一下AI剪辑视频。本着能用免费技术决不充值的原则,在对比了各种AI工具后,选择了NarrotoAI这款体验了一下。体验之后的结果是,我感觉我又行了。
申明: 本文纯技术贴。
短剧剪辑不仅是内容创作的热门领域,更是学习AI技术的绝佳实践场景。通过将AI工具深度融入短剧制作的各个环节(如解说台词生成、脚本生成,自动剪辑等),创作者可在完成作品的同时,系统掌握前沿技术,文中涉及大量AI相关工具,全部可以免费获得 。
如果您在复刻过程中遇到问题,请关注并留言交流。
环境就用现成的,我手上就有一台huawei matebook pro 笔记本, 操作系统win11。
已有公众号文章《人工智能学习必备工具之-Anaconda3安装、配置及优化》mp.weixin.qq/s/karflR2eWIOmb4NcMIrD3Q进行了详细介绍。
ImageMagick 是一款功能强大的开源图像处理软件套件。具体介绍如下:
ImageMagick下载地址:imagemagick/archive/binaries/ImageMagick-7.
安装之后 ,打开 cmd验证一下能否正常运行:
ffmpeg官方:www.ffmpeg/download.html。
安装之后验证一下:
支持阿里QwenVL大模型,国内网络可用;支持短剧混剪功能,十分钟精彩不断;新增一键合并视频和字幕。
# 克隆代码仓库
$ git clone github/linyqh/NarratoAI.git
Cloning into 'NarratoAI'...
remote: Enumerating objects: 1198, done.
remote: Counting objects: 100% (290/290), done.
remote: Compressing objects: 100% (131/131), done.
remote: Total 1198 (delta 178), reused 161 (delta 159), pack-reused 908 (from 2)
Receiving objects: 100% (1198/1198), 7.30 MiB | 3.15 MiB/s, done.
Resolving deltas: 100% (759/759), done.
直接使用pip安装依赖包,会出一些安装错误,解决起来比较费时间,推荐使用Anaconda3环境
# 创建 python 虚拟环境
conda create -n env_name python=3.10 -y
conda activate env_name
python -V
#执行结果如下:
(base) C:Usersseane>conda activate env_name
(env_name) C:Usersseane>python -V
Python 3.10.16
(env_name) C:Usersseane>
#进入前面下载的代码目录
cd NarratoAI
# 安装依赖,如果出错,请参考后文中问题总结
pip install -
# 安装 pytorch (无 GPU 的电脑可选)
pip3 install torch torchvision torchaudio
注: 针对于intel集成显卡的(huawei matebook pro 2022)的pytorch的安装将在后续的文章中详细介绍。pytorch是一个python的AI工具套件,基于intel集成显卡的pytorch在性能上要优于基于cpu的版本。
安装 成后 窗口显示 如下:
Successfully installed aiohappyeyeballs-2.4.6 aiohttp-3.10.11 aiosignal-1.3.2 altair-5.5.0 anyio-4.8.0 appdirs-1.4.4 attrs-25.1.0 av-12.3.0 azure-cognitiveservices-speech-1.37.0 blinker-1.9.0 brotli-1.1.0 cachetools-5.5.2 certifi-2025.1.31 chardet-5.2.0 charset-normalizer-3.4.1 click-8.1.8 colorama-0.4.6 coloredlogs-15.0.1 ctranslate2-4.5.0 dashscope-1.15.0 decorator-4.4.2 distro-1.9.0 edge-tts-6.1.19 fastapi-0.115.8 faster-whisper-1.0.3 flatbuffers-25.2.10 frozenlist-1.5.0 g4f-0.3.0.10 git-changelog-2.5.3 gitdb-4.0.12 gitpython-3.1.44 google-ai-generativelanguage-0.6.15 google-api-core-2.24.1 google-api-python-client-2.161.0 google-auth-2.38.0 google-auth-httplib2-0.2.ativeai-0.8.4 googleapis-common-protos-1.68.0 grpcio-1.70.0 grpcio-status-1.70.0 h11-0.14.0 httpcore-1.0.7 httplib2-0.22.0 httpx-0.27.2 huggingface-hub-0.29.1 humanfriendly-10.0 idna-3.10 imageio-2.37.0 imageio_ffmpeg-0.6.0 jiter-0.8.2 joblib-1.4.2 jsonschema-4.23.0 jsonschema-specifications-2024.10.1 loguru-0.7.3 markdown-it-py-3.0.0 mdurl-0.1.2 moviepy-2.0.0.dev2 multidict-6.1.0 narwhals-1.27.1 onnxruntime-1.20.1 openai-1.53.1 opencv-python-4.10.0.84 pandas-2.2.3 pillow-10.3.0 proglog-0.1.10 propcache-0.3.0 proto-plus-1.26.0 protobuf-5.29.3 pyarrow-19.0.1 pyasn1-0.6.1 pyasn1-modules-0.4.1 pycryptodome-3.21.0 pydantic-2.6.4 pydantic-core-2.16.3 pydeck-0.9.1 pydub-0.25.1 pygments-2.19.1 pyparsing-3.2.1 pyreadline3-3.5.4 pysrt-1.1.2 python-dateutil-2.9.0.post0 python-dotenv-1.0.1 python-multipart-0.0.20 pytz-2025.1 pyyaml-6.0.2 redis-5.0.3 referencing-0.36.2 regex-2024.11.6 requests-2.31.0 rich-13.9.4 rpds-py-0.23.1 rsa-4.9 safetensors-0.5.2 scikit-learn-1.5.2 scipy-1.15.2 semver-3.0.4 six-1.17.0 smmap-5.0.2 sniffio-1.3.1 starlette-0.45.3 streamlit-1.40.2 tenacity-9.0.0 threadpoolctl-3.5.0 tiktoken-0.8.0 tokenizers-0.21.0 toml-0.10.2 tomli-2.0.2 tornado-6.4.2 tqdm-4.67.1 transformers-4.47.0 tzdata-2025.1 uritemplate-4.1.1 urllib3-2.2.3 uvicorn-0.27.1 watchdog-5.0.2 win32-setctime-1.2.0 yarl-1.18.3 yt-dlp-2024.11.18
Whisper 模型用于生成字幕,转录视频,CPU和GPU均可运行,默认CPU;GPU会更快
下载地址:/guillaumekln/faster-whisper-large-v2
解压到narotoAI目: NarratoAI/app/models
。
下载 bert 模型: github
解压文件
Gemini是用于视频理解的大模型 ,是一个在线推荐模型,可通过api访问,需要申请 api key。
注:如果无法访问google网站,可跳转到下一个章节,使用基于qwen的视频模型。
访问Google AI Studio申请API Key。
注册并登陆: Get api key, 并保存,留待后面配置使用。
登陆sole.aliyun/, 注册账号
实名认证账号中心
开通模型
选择 VL-max latest
申请api key 并保存,留待后面配置使用。
**注: 先配置python虚拟 环境后再运行工具。**激活方法参考前面章节。
首次运行NarratoAI后,会在NarratoAI目录下生成配置文件l。
(pytorch251) d:codeNarratoAI>streamlit run webui.py
Welcome to Streamlit!
If you’d like to receive helpful onboarding emails, news, offers, promotions,
and the occasional swag, please enter your email address below. Otherwise,
leave this field blank.
Email:
You can find our privacy policy at streamlit.io/privacy-policy
Summary:
- This open source library collects usage statistics.
- We cannot see and do not store information contained inside Streamlit apps,
such as text, charts, images, etc.
- Telemetry data is stored in servers in the United States.
- If you'd like to opt out, add the following to %userprofile%/.l,
creating that file if necessary:
[browser]
gatherUsageStats = false
You can now view your Streamlit app in your browser.
Local URL: localhost:8501
Network URL: 192.168.1.14:8501
2025-02-23 15:45:16.758 | INFO | fig:load_config:20 - l l
2025-02-23 15:45:16.774 | INFO | fig:load_config:22 - load config from file: D:codel
2025-02-23 15:45:16.803 | INFO | fig:<module>:71 - NarratoAI v0.3.9
2025-02-23 15:46:01 | INFO | "./apputilsutils.py:589": init_resources - 已复制系统字体: f
2025-02-23 15:46:02.242 Examining the path of torch.classes raised: Tried to instantiate class '__path__._path', but it does not exist! Ensure that it is registered via torch::class_
将申请到API Key填入项目根目录的l文件:
########## Vision Gemini API Key
vision_gemini_api_key = "xxxx"
生成文案的大模型 API Key;建议不要再使用 Gemini 模型生成文案。国内有很多免费好用的api接口可用。比如 火山方舟的doubao, Deepseek等。
ffmpeg_path = "D:\AppGallery\bin\"
下载地址:zenodo/records/13293144/
放置目录: NarratoAIresourcefonts
下载地址:zenodo/records/13293150/files/output000.mp3
放置目录: NarratoAIresourcesongs
修改完配置文件后,再次启动NarratoAI
(pytorch251) d:codeNarratoAI>streamlit run webui.py
localhost:8501/
如果Gemini模型无法访问,建议切换到QwenVL模型。
将之前申请的api key配置到 NarratoAI web界面中,
测试连接,显示 QwenVL 模型可用
选择脚本 模板,并上传视频 文件,文件小于200M, 大文件可按提示保存到NarratoAIresourcevideos
上传一个视频后,点击AI生成画面解说脚本 。
[
{
"timestamp": "00:00:38,500-00:00:38,500",
"picture": "画面中显示两个人在一个室内环境中。左边的人背对着镜头,穿着深色上衣和红色裤子,头发扎成马尾。右边的人面向镜头,穿着同样的深色上衣和红色裤子,双手张开,似乎在做某种动作或表演。背景是一扇白色的门和浅蓝色的墙壁,地板是灰色的瓷砖。画面上方有红色的文字“来到你的面前”,右下角有抖音的标志和一些文字信息。",
"narration": "俩同款着装室内整活",
"OST": 2,
"new_timestamp": "00:00:00,000-00:00:00,000"
}
]
后台 信息:
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 1579: illegal multibyte sequence
2025-02-23 22:58:51 | INFO | "./apputilsvideo_processor_v2.py:312": process_video_pipeline -
步骤2: 从压缩视频提取关键帧...
2025-02-23 22:58:51 | INFO | "./apputilsvideo_processor_v2.py:234": process_video - 读取视频帧...
读取视频: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7319/7319 [00:06<00:00, 1049.69it/s]
2025-02-23 22:58:58 | INFO | "./apputilsvideo_processor_v2.py:246": process_video - 检测场景边界...█████████████████████████████████████████████████████████████████▍| 7289/7319 [00:06<00:00, 373.21it/s]
2025-02-23 22:59:08 | INFO | "./apputilsvideo_processor_v2.py:248": process_video - 检测到 1 个场景边界
2025-02-23 22:59:17 | INFO | "./apputilsvideo_processor_v2.py:290": process_video_pipeline - 步骤1: 压缩视频... | 0/1 [00:00<?, ?it/s]
Exception in thread Thread-69 (_readerthread):
Traceback (most recent call last):
File "D:AppGalleryAnaconda3envspytorch251Libthreading.py", line 1075, in _bootstrap_inner
self.run()
File "D:AppGalleryAnaconda3envspytorch251Libthreading.py", line 1012, in run
self._target(*self._args, **self._kwargs)
File "D:AppGalleryAnaconda3envspytorch251Libsubprocess.py", line 1601, in _readerthread
buffer.ad())
^^^^^^^^^
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 1603: illegal multibyte sequence
2025-02-23 22:59:27 | INFO | "./apputilsvideo_processor_v2.py:312": process_video_pipeline -
步骤2: 从压缩视频提取关键帧...
2025-02-23 22:59:28 | INFO | "./apputilsvideo_processor_v2.py:234": process_video - 读取视频帧...
读取视频: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3359/3359 [00:11<00:00, 295.50it/s]
2025-02-23 22:59:39 | INFO | "./apputilsvideo_processor_v2.py:246": process_video - 检测场景边界...
2025-02-23 22:59:48 | INFO | "./apputilsvideo_processor_v2.py:248": process_video - 检测到 1 个场景边界████████████████████████████████████████████████████████████▏ | 3319/3359 [00:10<00:00, 456.36it/s]
提取关键帧: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:56<00:00, 56.25s/it]
保存压缩关键帧: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 16.25it/s]
2025-02-23 23:00:47 | INFO | "./apputilsvideo_processor_v2.py:317": process_video_pipeline - ███████████████████████████████████████████████████████████████████████████████| 1/1 [00:56<00:00, 56.23s/it]
步骤3: 提取高清关键帧... | 0/1 [00:00<?, ?it/s]
提取高清帧: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 2.83it/s]
2025-02-23 23:00:47 | INFO | "./apputilsvideo_processor_v2.py:194": extract_frames_by_numbers - 共提取了 1 个不同时间戳的帧
2025-02-23 23:00:47 | INFO | "./apputilsvideo_processor_v2.py:325": process_video_pipeline - 处理完成!高清关键帧保存在: .storagetempkeyframes37d1b60812267477b6ac5d5c610b737d[00:00<00:00, 2.84it/s]
2025-02-23 23:00:48 | INFO | "./apputilsvideo_processor_v2.py:370": process_video_pipeline - 临时文件已清理
2025-02-23 23:00:48 | DEBUG | "./webuitoolsgenerate_script_docu.py:106": generate_script_docu - Vision LLM 提供商: qwenvl
2025-02-23 23:00:49 | INFO | "./apputilsqwenvl_analyzer.py:121": analyze_images - 正在加载图片...
分析进度: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:04<00:00, 4.82s/it]
2025-02-23 23:00:56 | DEBUG | "./webuitoolsgenerate_script_docu.py:162": generate_script_docu - 批次 0 处理完成,共 1 张图片
2025-02-23 23:00:56 | DEBUG | "./webuitoolsgenerate_script_docu.py:166": generate_script_docu - 处理时间戳: 00:00:38,500-00:00:38,500███████████████████████████████████████| 1/1 [00:04<00:00, 4.81s/it]
2025-02-23 23:00:56 | DEBUG | "./webuitoolsgenerate_script_docu.py:211": generate_script_docu - 添加帧内容: 时间范围=00:00:38,500-00:00:38,500, 分析结果长度=149
2025-02-23 23:00:58 | INFO | "./apputilsscript_generator.py:319": __init__ - 文本 LLM 提供商: ep-20241231163508-gh4jr
2025-02-23 23:00:59 | WARNING | "./apputilsscript_generator.py:101": __init__ - 未找到模型 ep-20241231163508-gh4jr 的专用编码器,使用默认编码器
2025-02-23 23:01:23 | DEBUG | "./apputilsscript_generator.py:430": calculate_duration_and_word_count - 时间范围 00:00:38,500-00:00:38,500 的持续时间为 0.000秒, 估算字数: 10
2025-02-23 23:01:24 | INFO | "./apputilsscript_generator.py:443": process_frames - 时间范围: 00:00:38,500-00:00:38,500, 建议字数: 10
2025-02-23 23:01:24 | INFO | "./apputilsscript_generator.py:444": process_frames - 俩同款着装室内整活
2025-02-23 23:01:24 | INFO | "./apputilsscript_generator.py:514": _save_results - 保存脚本成功,总时长: 00:00:00,000
2025-02-23 23:01:24 | INFO | "./webuitoolsgenerate_script_docu.py:253": generate_script_docu - 脚本生成完成
2025-02-23 23:01:39.776 Examining the path of torch.classes raised: Tried to instantiate class '__path__._path',
跟上一节操作方法一样,上传视频 ,生成解说 脚本 ,以后按照以下顺序,依次“脚本格式检查” -> “保存脚本” -> “裁剪视频” -> “生成视频”
裁剪视频成功:
生成视频成功:
2025-02-24 10:04:55.761 | INFO | __main__:render_generate_button:128 - 开始生成视频
2025-02-24 10:04:55.761 | INFO | app.services.task:start_subclip:162 -
## 开始任务: 6d2dfc04-0de9-4fb3-aedb-6e200c49cead
2025-02-24 10:04:55.796 | INFO | app.services.task:start_subclip:173 -
## 1. 加载视频脚本
2025-02-24 10:04:55.825 | DEBUG | app.services.task:start_subclip:185 - 解说完整脚本:
瞧瞧这几人各怀心思,围绕赎金展开拉扯啦 瞧这室内几人着装各异 拉扯还在继续 瞧这室内拉扯 各怀心思忙 看这室内众人 神色各有千秋 看这室内众人 神色各有千秋
黑皮女后绿装男 业务网游挖币 众人着装神态超有趣 众人着装神态妙后续更逗 众人着装神态妙后续更逗,且看这几人要弄啥幺蛾子 深色西装男先亮相,俩严肃女登场又有啥戏? 深绿西装男室内要干啥?
2025-02-24 10:04:55.825 | DEBUG | app.services.task:start_subclip:186 - 解说 OST 列表:
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
2025-02-24 10:04:55.825 | DEBUG | app.services.task:start_subclip:187 - 解说时间戳列表:
['00:00:03,240-00:00:12,160', '00:00:14,000-00:00:22,079', '00:00:23,120-00:00:29,079', '00:00:30,440-00:00:36,960', '00:00:38,200-00:00:47,920', '00:00:48,759-00:00:52,679', '00:00:54,039-00:01:00,240', '00:01:01,840-00:01:11,079', '00:01:12,640-00:01:22,239', '00:01:24,319-00:01:26,719']
2025-02-24 10:04:55.839 | INFO | app.services.task:start_subclip:201 -
## 2. 根据OST设置生成音频列表
2025-02-24 10:04:55.856 | DEBUG | app.services.task:start_subclip:207 - 需要生成TTS的片段数: 10
2025-02-24 10:04:55.877 | INFO | app.services.voice:azure_tts_v1:1074 - 第 1 次使用 edge_tts 生成音频
2025-02-24 10:04:57.453 | INFO | app.services.voice:azure_tts_v1:1109 - completed, output file: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_00,000-00_00_08,919.mp3
2025-02-24 10:04:57.453 | INFO | app.services.voice:tts_multiple:1375 - 已生成音频文件: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_00,000-00_00_08,919.mp3
2025-02-24 10:04:57.453 | INFO | app.services.voice:azure_tts_v1:1074 - 第 1 次使用 edge_tts 生成音频
2025-02-24 10:04:59.108 | INFO | app.services.voice:azure_tts_v1:1109 - completed, output file: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_08,919-00_00_16,999.mp3
2025-02-24 10:04:59.108 | INFO | app.services.voice:tts_multiple:1375 - 已生成音频文件: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_08,919-00_00_16,999.mp3
2025-02-24 10:04:59.108 | INFO | app.services.voice:azure_tts_v1:1074 - 第 1 次使用 edge_tts 生成音频
2025-02-24 10:05:10.965 | INFO | app.services.voice:azure_tts_v1:1109 - completed, output file: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_16,999-00_00_22,958.mp3
2025-02-24 10:05:10.965 | INFO | app.services.voice:tts_multiple:1375 - 已生成音频文件: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_16,999-00_00_22,958.mp3
2025-02-24 10:05:10.965 | INFO | app.services.voice:azure_tts_v1:1074 - 第 1 次使用 edge_tts 生成音频
2025-02-24 10:05:12.429 | INFO | app.services.voice:azure_tts_v1:1109 - completed, output file: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_22,958-00_00_29,478.mp3
2025-02-24 10:05:12.445 | INFO | app.services.voice:tts_multiple:1375 - 已生成音频文件: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_22,958-00_00_29,478.mp3
2025-02-24 10:05:12.445 | INFO | app.services.voice:azure_tts_v1:1074 - 第 1 次使用 edge_tts 生成音频
2025-02-24 10:05:14.044 | INFO | app.services.voice:azure_tts_v1:1109 - completed, output file: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_29,478-00_00_39,198.mp3
2025-02-24 10:05:14.060 | INFO | app.services.voice:tts_multiple:1375 - 已生成音频文件: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_29,478-00_00_39,198.mp3
2025-02-24 10:05:14.060 | INFO | app.services.voice:azure_tts_v1:1074 - 第 1 次使用 edge_tts 生成音频
2025-02-24 10:05:15.609 | INFO | app.services.voice:azure_tts_v1:1109 - completed, output file: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_39,198-00_00_43,118.mp3
2025-02-24 10:05:15.610 | INFO | app.services.voice:tts_multiple:1375 - 已生成音频文件: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_39,198-00_00_43,118.mp3
2025-02-24 10:05:15.610 | INFO | app.services.voice:azure_tts_v1:1074 - 第 1 次使用 edge_tts 生成音频
2025-02-24 10:05:17.475 | INFO | app.services.voice:azure_tts_v1:1109 - completed, output file: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_43,118-00_00_49,319.mp3
2025-02-24 10:05:17.486 | INFO | app.services.voice:tts_multiple:1375 - 已生成音频文件: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_43,118-00_00_49,319.mp3
2025-02-24 10:05:17.489 | INFO | app.services.voice:azure_tts_v1:1074 - 第 1 次使用 edge_tts 生成音频
2025-02-24 10:05:19.217 | INFO | app.services.voice:azure_tts_v1:1109 - completed, output file: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_49,319-00_00_58,557.mp3
2025-02-24 10:05:19.217 | INFO | app.services.voice:tts_multiple:1375 - 已生成音频文件: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_49,319-00_00_58,557.mp3
2025-02-24 10:05:19.217 | INFO | app.services.voice:azure_tts_v1:1074 - 第 1 次使用 edge_tts 生成音频
2025-02-24 10:05:20.749 | INFO | app.services.voice:azure_tts_v1:1109 - completed, output file: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_58,557-00_01_08,156.mp3
2025-02-24 10:05:20.749 | INFO | app.services.voice:tts_multiple:1375 - 已生成音频文件: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_00_58,557-00_01_08,156.mp3
2025-02-24 10:05:20.753 | INFO | app.services.voice:azure_tts_v1:1074 - 第 1 次使用 edge_tts 生成音频
2025-02-24 10:05:22.315 | INFO | app.services.voice:azure_tts_v1:1109 - completed, output file: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_01_08,156-00_01_10,556.mp3
2025-02-24 10:05:22.315 | INFO | app.services.voice:tts_multiple:1375 - 已生成音频文件: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadaudio_00_01_08,156-00_01_10,556.mp3
2025-02-24 10:05:22.318 | INFO | app.services.task:start_subclip:228 - 合并音频文件: ['D:\code\NarratoAI\storage\tasks\6d2dfc04-0de9-4fb3-aedb-6e200c49cead\audio_00_00_00,000-00_00_08,919.mp3', 'D:\code\NarratoAI\storage\tasks\6d2dfc04-0de9-4fb3-aedb-6e200c49cead\audio_00_00_08,919-00_00_16,999.mp3', 'D:\code\NarratoAI\storage\tasks\6d2dfc04-0de9-4fb3-aedb-6e200c49cead\audio_00_00_16,999-00_00_22,958.mp3', 'D:\code\NarratoAI\storage\tasks\6d2dfc04-0de9-4fb3-aedb-6e200c49cead\audio_00_00_22,958-00_00_29,478.mp3', 'D:\code\NarratoAI\storage\tasks\6d2dfc04-0de9-4fb3-aedb-6e200c49cead\audio_00_00_29,478-00_00_39,198.mp3', 'D:\code\NarratoAI\storage\tasks\6d2dfc04-0de9-4fb3-aedb-6e200c49cead\audio_00_00_39,198-00_00_43,118.mp3', 'D:\code\NarratoAI\storage\tasks\6d2dfc04-0de9-4fb3-aedb-6e200c49cead\audio_00_00_43,118-00_00_49,319.mp3', 'D:\code\NarratoAI\storage\tasks\6d2dfc04-0de9-4fb3-aedb-6e200c49cead\audio_00_00_49,319-00_00_58,557.mp3', 'D:\code\NarratoAI\storage\tasks\6d2dfc04-0de9-4fb3-aedb-6e200c49cead\audio_00_00_58,557-00_01_08,156.mp3', 'D:\code\NarratoAI\storage\tasks\6d2dfc04-0de9-4fb3-aedb-6e200c49cead\audio_00_01_08,156-00_01_10,556.mp3']
2025-02-24 10:05:27.283 | INFO | app.services.audio_merger:merge_audio_files:73 - 合并后的音频文件已保存: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadfinal_audio.mp3
2025-02-24 10:05:27.283 | INFO | app.services.task:start_subclip:237 - 音频文件合并成功
2025-02-24 10:05:27.299 | INFO | app.services.task:start_subclip:263 -
## 3. 生成字幕、提供程序是: faster-whisper-large-v2
2025-02-24 10:05:27.299 | INFO | app.services.subtitle:create:69 - 未检测到 CUDA,使用 CPU 模式
2025-02-24 10:05:27.302 | INFO | app.services.subtitle:create:78 - 使用 CPU 加载模型: ./app/models/faster-whisper-large-v2
2025-02-24 10:05:38.484 | INFO | app.services.subtitle:create:86 - 模型加载完成,使用设备: cpu, 计算类型: int8
2025-02-24 10:05:38.484 | INFO | app.services.subtitle:create:88 - start, output file: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadsubtitle.srt
2025-02-24 10:06:00.072 | INFO | app.services.subtitle:create:101 - 检测到的语言: 'zh', probability: 1.00
2025-02-24 10:06:44.076 | DEBUG | app.services.subtitle:recognized:114 - [0.00s -> 1.82s] 瞧瞧这几人各怀心思
2025-02-24 10:06:44.077 | DEBUG | app.services.subtitle:recognized:114 - [2.20s -> 3.84s] 围绕赎金展开拉扯了
2025-02-24 10:06:44.078 | DEBUG | app.services.subtitle:recognized:114 - [9.12s -> 11.00s] 瞧这室内几人着装各异
2025-02-24 10:06:44.080 | DEBUG | app.services.subtitle:recognized:114 - [11.36s -> 12.52s] 拉扯还在继续
2025-02-24 10:06:44.081 | DEBUG | app.services.subtitle:recognized:114 - [17.16s -> 18.36s] 瞧这室内拉扯
2025-02-24 10:06:44.082 | DEBUG | app.services.subtitle:recognized:114 - [18.72s -> 19.70s] 各怀心思忙
2025-02-24 10:06:44.084 | DEBUG | app.services.subtitle:recognized:114 - [23.14s -> 24.28s] 看这室内众人
2025-02-24 10:06:44.085 | DEBUG | app.services.subtitle:recognized:114 - [24.60s -> 25.86s] 神色各有千秋
2025-02-24 10:06:44.086 | DEBUG | app.services.subtitle:recognized:114 - [29.67s -> 30.77s] 看这室内众人
2025-02-24 10:06:44.088 | DEBUG | app.services.subtitle:recognized:114 - [31.11s -> 32.35s] 神色各有千秋
2025-02-24 10:06:44.089 | DEBUG | app.services.subtitle:recognized:114 - [33.03s -> 34.45s] 黑皮女后绿妆男
2025-02-24 10:06:44.107 | DEBUG | app.services.subtitle:recognized:114 - [34.81s -> 35.85s] 业务网游挖币
2025-02-24 10:06:44.110 | DEBUG | app.services.subtitle:recognized:114 - [39.38s -> 41.16s] 众人着装神态超有趣
2025-02-24 10:06:44.112 | DEBUG | app.services.subtitle:recognized:114 - [43.31s -> 44.65s] 众人着装神态妙
2025-02-24 10:06:44.113 | DEBUG | app.services.subtitle:recognized:114 - [44.91s -> 45.65s] 后续更逗
2025-02-24 10:07:28.051 | DEBUG | app.services.subtitle:recognized:114 - [51.67s -> 54.31s] 且看这几人要弄啥幺蛾子
2025-02-24 10:07:28.052 | DEBUG | app.services.subtitle:recognized:114 - [58.77s -> 60.45s] 深色西装男先亮相
2025-02-24 10:07:28.052 | DEBUG | app.services.subtitle:recognized:114 - [60.87s -> 61.99s] 雅颜素女登场
2025-02-24 10:07:28.052 | DEBUG | app.services.subtitle:recognized:114 - [62.19s -> 62.89s] 又有啥戏
2025-02-24 10:07:28.052 | DEBUG | app.services.subtitle:recognized:114 - [68.36s -> 70.42s] 深绿西装男室内要干啥
2025-02-24 10:07:28.052 | INFO | app.services.subtitle:create:164 - complete, elapsed: 87.97 s
2025-02-24 10:07:28.052 | INFO | app.services.subtitle:create:181 - subtitle file created: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadsubtitle.srt
2025-02-24 10:07:28.067 | INFO | app.services.task:start_subclip:277 -
## 4. 裁剪视频
2025-02-24 10:07:28.083 | INFO | app.services.task:start_subclip:295 -
## 5. 合并视频: => .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadcombined.mp4
2025-02-24 10:07:28.083 | INFO | app.services.video:combine_clip_videos:130 - 音频的最大持续时间: 70.55699999999999 s
2025-02-24 10:07:28.491 | INFO | app.services.video:combine_clip_videos:155 - 视频 .storagetempclip_video860467a7beea883037e8925244df21a9vid-00-00-03_240-00-00-12_160.mp4 已调整尺寸为 1080 x 1920
2025-02-24 10:07:28.799 | INFO | app.services.video:combine_clip_videos:155 - 视频 .storagetempclip_video860467a7beea883037e8925244df21a9vid-00-00-14_000-00-00-22_079.mp4 已调整尺寸为 1080 x 1920
2025-02-24 10:07:29.087 | INFO | app.services.video:combine_clip_videos:155 - 视频 .storagetempclip_video860467a7beea883037e8925244df21a9vid-00-00-23_120-00-00-29_079.mp4 已调整尺寸为 1080 x 1920
2025-02-24 10:07:29.588 | INFO | app.services.video:combine_clip_videos:155 - 视频 .storagetempclip_video860467a7beea883037e8925244df21a9vid-00-00-30_440-00-00-36_960.mp4 已调整尺寸为 1080 x 1920
2025-02-24 10:07:30.340 | INFO | app.services.video:combine_clip_videos:155 - 视频 .storagetempclip_video860467a7beea883037e8925244df21a9vid-00-00-38_200-00-00-47_920.mp4 已调整尺寸为 1080 x 1920
2025-02-24 10:07:31.063 | INFO | app.services.video:combine_clip_videos:155 - 视频 .storagetempclip_video860467a7beea883037e8925244df21a9vid-00-00-48_759-00-00-52_679.mp4 已调整尺寸为 1080 x 1920
2025-02-24 10:07:31.767 | INFO | app.services.video:combine_clip_videos:155 - 视频 .storagetempclip_video860467a7beea883037e8925244df21a9vid-00-00-54_039-00-01-00_240.mp4 已调整尺寸为 1080 x 1920
2025-02-24 10:07:32.547 | INFO | app.services.video:combine_clip_videos:155 - 视频 .storagetempclip_video860467a7beea883037e8925244df21a9vid-00-01-01_840-00-01-11_079.mp4 已调整尺寸为 1080 x 1920
2025-02-24 10:07:32.819 | INFO | app.services.video:combine_clip_videos:155 - 视频 .storagetempclip_video860467a7beea883037e8925244df21a9vid-00-01-12_640-00-01-22_239.mp4 已调整尺寸为 1080 x 1920
2025-02-24 10:07:33.227 | INFO | app.services.video:combine_clip_videos:155 - 视频 .storagetempclip_video860467a7beea883037e8925244df21a9vid-00-01-24_319-00-01-26_719.mp4 已调整尺寸为 1080 x 1920
2025-02-24 10:07:33.243 | INFO | app.services.video:combine_clip_videos:170 - 开始合并视频... (过程中出现 UserWarning: 不必理会)
2025-02-24 10:08:26.147 | SUCCESS | app.services.video:combine_clip_videos:184 - 视频合并完成
2025-02-24 10:08:26.147 | INFO | app.services.task:start_subclip:311 -
## 6. 最后合成: 1 => .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadfinal-1.mp4
2025-02-24 10:08:26.157 | WARNING | app.utils.utils:get_bgm_file:153 - 在目录 .resourcesongs 中没有找到 MP3 或 FLAC 文件
2025-02-24 10:08:26.657 | INFO | app.services.video:generate_video_v3:331 - 读取到 20 条字幕
2025-02-24 10:08:31.316 | INFO | app.services.video:generate_video_v3:387 - 成功创建 20 条字幕剪辑
2025-02-24 10:08:31.332 | DEBUG | app.services.video:generate_video_v3:397 - 音量配置: {'original': 0.7, 'bgm': 0.3, 'narration': 1.0}
2025-02-24 10:08:31.483 | INFO | app.services.video:generate_video_v3:429 - 开始导出视频...
2025-02-24 10:10:58.073 | INFO | app.services.video:generate_video_v3:436 - 视频已导出到: .storagetasks6d2dfc04-0de9-4fb3-aedb-6e200c49ceadfinal-1.mp4
2025-02-24 10:10:58.079 | SUCCESS | app.services.task:start_subclip:358 - 任务 6d2dfc04-0de9-4fb3-aedb-6e200c49cead 已完成, 生成 1 个视频.
2025-02-24 10:10:58.321 | INFO | __main__:render_generate_button:165 - 视频生成完成
2025-02-24 10:10:58.508 | DEBUG | webui.utils.performance:monitor_memory:12 - Memory usage: 2703.35 MB
Releases · linyqh/NarratoAI
首页 - 飞书云文档
使用说明 - 飞书云文档
快速上手 - 飞书云文档
使用源码构建 - 飞书云文档
Windows 整合包 - 飞书云文档
本文发布于:2025-04-08 03:32:00,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/1744054324585035.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |