News Video Maker
Convert news content into a video with voiceover and subtitles.
Input
- - News topic/keywords (get via search tool in real-time)
- Background image path (provided by user)
- Output directory (user-defined, default:
C:\Users\hyzu\Documents\openclaw\)
Steps
1. Get News
Use search tool to get today's news:
- - Use
freeUnlimited-websearch or ollama_web_search or tavily-search skill to search for today's news - Keywords like: "today news", "2026 March news", etc.
Example prompt:
CODEBLOCK0
2. Generate Speech
Use TTS tool to convert news text to speech:
- - Call tts tool to generate mp3 audio
3. Create Video
Use FFmpeg to combine background image, audio, and add subtitles.
Subtitle calculation rules:
- - Video width: 1280px
- Font size: 36px (about 20-25 Chinese characters per line)
- Gold subtitles: PrimaryColour=&HFFD700&
Command:
CODEBLOCK1
4. Subtitle File Format (SRT)
Subtitle rules:
- - Max 20 Chinese characters per line
- Timestamp format: HH:MM:SS,mmm --> HH:MM:SS,mmm
Example:
CODEBLOCK2
Output
MP4 video file saved to user-specified output directory.
Notes
- - Split long subtitles into multiple lines, keep each line under 20 characters
- Backslashes in paths need escaping or use double quotes
- Audio file can reuse MP3 generated by TTS tool
新闻视频制作工具
将新闻内容转换为带有配音和字幕的视频。
输入
- - 新闻主题/关键词(通过搜索工具实时获取)
- 背景图片路径(由用户提供)
- 输出目录(用户自定义,默认:C:\Users\hyzu\Documents\openclaw\)
步骤
1. 获取新闻
使用搜索工具获取今日新闻:
- - 使用 freeUnlimited-websearch 或 ollamawebsearch 或 tavily-search 技能搜索今日新闻
- 关键词如:今日新闻、2026年3月新闻等
示例提示词:
搜索今天的重要新闻,包括国际和国内新闻
2. 生成语音
使用TTS工具将新闻文本转换为语音:
3. 创建视频
使用FFmpeg合成背景图片、音频,并添加字幕。
字幕计算规则:
- - 视频宽度:1280px
- 字号:36px(每行约20-25个中文字符)
- 金色字幕:PrimaryColour=&HFFD700&
命令:
bash
ffmpeg -y -loop 1 -i {backgroundimage} -i {audiofile} -vf subtitles={subtitlefile}:forcestyle=Fontsize=36,PrimaryColour=&HFFD700&,BorderStyle=3,Outline=2,MarginV=50,scale=1280:720:forceoriginalaspectratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2 -shortest -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pixfmt yuv420p {output_video}
4. 字幕文件格式(SRT)
字幕规则:
- - 每行最多20个中文字符
- 时间戳格式:HH:MM:SS,mmm --> HH:MM:SS,mmm
示例:
1
00:00:00,000 --> 00:00:04,000
2026年3月11日新闻简报
输出
MP4视频文件保存到用户指定的输出目录。
注意事项
- - 长字幕需拆分为多行,每行不超过20个字符
- 路径中的反斜杠需要转义或使用双引号
- 音频文件可直接复用TTS工具生成的MP3文件