用 n8n 将文本提示自动转为多场景电影级视频
输入 Google Sheets 行数据 → GPT-4o 生成叙事与分镜 → Fal.AI Seedance 逐场景渲染 → 合并为带环境音的 MP4
- 给谁
- 内容创作者、短视频营销人员、教育工作者、有 n8n 基础的用户
- 你会得到
- 从一行表格数据自动生成多场景电影级视频(MP4),可自动上传 YouTube
- 你需要
- n8n · fal-ai · google-sheets · youtube
硬约束
前置条件:n8n 实例(推荐自托管);Fal.AI Header Token;OpenAI API Key;Google Sheets OAuth2;可选 YouTube OAuth2。费用取决于各 API 调用量,Seedance 与 MM-Audio 按 Fal.AI 计费。
他们做了什么
作者 jaruphatj 在 n8n 官方模板库发布了该工作流模板。模板展示了一个完整自动化流程:从 Google Sheets 读取故事提示,经 GPT-4o 生成叙事与分镜,调用 Fal.AI Seedance V1.0 逐场景渲染 5 秒视频片段,可选添加 MM-Audio 环境音,最终通过 FFmpeg API 合并为完整 MP4,并可自动上传 YouTube。模板包含 38 个节点、4 个功能区(Story-to-Scenes / Generate Video / Add Audio / Merge & Output),并提供了示例输出链接。
效果如何
作者报告(author_report)示例:输入提示“A rabbit flies to the moon on a dragonfly and eats watermelon together”,输出 3 个场景、每段 5 秒、电影级运镜、柔和环境音,并自动上传至 YouTube。模板在 n8n.io 获得 32,670 次浏览。
值得知道
1. 本站未实测该工作流(reproduction=not_tested),实际费用与稳定性需自行验证。 2. Seedance V1.0 为队列式异步渲染,单片段约 5–6 秒,完整多场景视频需多次轮询等待,总耗时不确定。 3. 凭证需求:openAiApi、httpHeaderAuth(Fal.AI)、googleSheetsOAuth2Api、youTubeOAuth2Api(可选)。 4. Google Sheets 需严格包含列名:story、number_of_scene、duration、aspect_ratio、resolution、model;model 字段值应对应 Fal.AI 的模型路径(如 seedance-v1)。 5. 节点内提示词为英文,如需其他语言叙事,可在 GPT Agent 节点的 text 参数中追加语言指令,但 Seedance 的提示词建议保持英文以获得最佳效果。 6. 合并 API 使用固定 6000ms 每片段时长,若修改 duration 需同步调整 jsonBody 中的 duration 值。 7. 示例中的 YouTube 上传设置了 regionCode=TH,如需其他地区需修改节点参数。
n8n 工作流模板
结构已检查 · 未实际运行下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。
配置与测试清单
需要绑定的凭证
- OpenAI Chat Model 节点:绑定OpenAI API 凭证。
- OpenAI Chat Model1 节点:绑定OpenAI API 凭证。
- Get the video status 节点:绑定HTTP Header Auth 凭证。
- Get the video 节点:绑定HTTP Header Auth 凭证。
- Get audio status 节点:绑定HTTP Header Auth 凭证。
- Get video with audio 节点:绑定HTTP Header Auth 凭证。
- Start adding audio to the video 节点:绑定HTTP Header Auth 凭证。
- Start merging videos 节点:绑定HTTP Header Auth 凭证。
- Get merge videos status 节点:绑定HTTP Header Auth 凭证。
- Get merged video 节点:绑定HTTP Header Auth 凭证。
- OpenAI Chat Model2 节点:绑定OpenAI API 凭证。
- Get Data 节点:绑定Google Sheets OAuth2 凭证。
- Call Fal.ai API (Seedance) 节点:绑定HTTP Header Auth 凭证。
- YouTube 节点:绑定YouTube OAuth2 凭证。
- Get the video1 节点:绑定HTTP Header Auth 凭证。
需要替换的配置
- 源模板来自 n8n 公开库 #5741(约 38 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
- Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。
测试输入与预期结果
- 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
- 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。
模板处理说明
- 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
- 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。
模板获取日期: 2026-10-24
步骤
准备输入并触发工作流
在 Google Sheets 创建包含以下列的表格:story(简短提示词)、number_of_scene(场景数)、duration(单片段时长)、aspect_ratio、resolution、model。在 n8n 中手动点击「Execute workflow」或设置 Sheet 更新触发。
生成完整叙事
AI Agent 节点调用 GPT-4o-mini,根据 story 字段生成沉浸式、有情绪弧的完整短视频叙事。输出为长文本故事,受 Structured Output Parser 约束为 {story: string} 格式。
运行提示词 · 来源原文。AI Agent 节点 'Generate Full Narrative from Prompt' 的 text 参数
=Instructions: Create a captivating, vivid, and detailed short video story based on the idea provided below. The story should feel immersive, emotional, and cinematic — suitable for visual storytelling. Please ensure the following: Include a rich, visually descriptive setting (lighting, weather, architecture, colors). Describe the main characters clearly: their appearance, mood, clothing, and motivations. Build a sense of mood, tension, or emotional arc. Keep the tone aligned with the theme of the original idea. Format your output as long-form narrative text. Idea: {{ $json.story }}拆分叙事为场景并验证数量
第二个 AI Agent 节点(GPT-4o-mini)将叙事拆分为恰好 number_of_scene 个场景,输出受 Structured Output Parser 约束为 {scenes: string[]}。随后 Code 节点验证 sceneCount 是否达标;若不足则循环回拆,达标后进入下一步。
运行提示词 · 来源原文。AI Agent 节点 'Break Narrative into {{n}} Scenes' 的 text 参数
=<Instructions> Break down the following story into a script (for short video) with exacly {{ $('Get Data').item.json.number_of_scene }} scenes. </Instructions> <Story> {{ $json.output.story }} </Story>逐场景生成结构化视频描述
Split Out 节点将 scenes 数组拆分为单条。每条进入 AI Agent 节点(GPT-4o),结合完整故事上下文,输出结构化场景描述:角色列表、场景背景、镜头运动、物体运动、音效设计。输出受 Structured Output Parser 约束为 {characters, scene_description, camera_movement, object_movements, sound_effects}。
运行提示词 · 来源原文。AI Agent 节点 'Describe Each Scene for Video' 的 text 参数
=Prompt Template: Generate Detailed Scene (5s Clip) Instructions: Create a detailed visual breakdown of the following scene. Use the full story context to ensure continuity, tone, and emotional flow. For this scene, include: 1. Characters in the Scene: - List all characters present - Describe their age, attire, appearance, posture, emotion, and current action 2. Scene Background & Environment: - Describe the setting in detail (lighting, background elements, color palette, time of day) - Mention any objects in the environment that affect mood or action 3. Camera Direction: - Describe camera angle, motion (e.g. dolly, pan, zoom), perspective, or transitions during the 5s scene 4. Object & Character Movement: - Describe how characters or objects move within this 5-second clip - Use dynamic motion where appropriate 5. Sound Effects & Ambience: - Describe background sound, music, or specific SFX - Include emotional tone and pacing of sound Scene Input: {{ $json.scenes }} Full Story Reference: {{ $('Generate Full Narrative from Prompt').item.json.output.story }} Output Format Example: Characters: - Anya (17): Wears a tattered blue coat. Snow clings to her hair. She breathes heavily, face flushed from the cold. Her eyes are locked ahead, determined. - The Old Man (60s): Frail, cloaked in furs, holding a lantern that flickers with a weak flame. Scene Background: A narrow trail carved through pine trees covered in frost. The sky is turning orange. In the distance, the silhouette of a crumbling tower. Mist coils low to the ground. Camera Movement: Slow push-in from behind Anya’s shoulder, transitioning to a side dolly as she steps forward and the tower comes into view. Movement in Scene: Snowflakes fall steadily. Anya trudges forward. The Old Man stops, raises his lantern slightly, casting light across the branches. A raven flutters from a tree. Sound Design: - Soft wind whistling through trees - Crunching snow with each step - Distant echo of a bell - Faint strings rise in tension as the tower is revealed调用 Seedance 生成视频并轮询状态
HTTP Request 节点向 https://queue.fal.run/fal-ai/{model} 发送 POST,body 包含 XML 格式的 Characters、SceneDescription、CameraMovements、ObjectMovements,以及 aspect_ratio、resolution、duration。随后通过 SplitInBatches 逐条处理,Wait 节点延时后 HTTP 轮询 status_url,Switch 节点判断状态:COMPLETED 则获取视频,IN_PROGRESS/IN_QUEUE 则继续等待。
运行提示词 · 来源原文。HTTP Request 节点 'Call Fal.ai API (Seedance)' 的 bodyParameters.prompt 字段
=<Characters> {{ $json.output.characters.map(character => `<Character> <Name>${character.name}</Name> <Description>${character.description}</Description> </Character>`).join('\n') }} </Characters> <SceneDescription> {{ $json.output.scene_description }} </SceneDescription> <CameraMovements> {{ $json.output.camera_movement }} </CameraMovements> <ObjectMovements> {{ $json.output.object_movements }} </ObjectMovements>为视频添加环境音频
HTTP Request 节点向 https://queue.fal.run/fal-ai/mmaudio-v2 发送 POST,传入 video_url(上一步输出)和 prompt(来自场景描述的 sound_effects)。通过 SplitInBatches 逐场景循环,Wait+HTTP 轮询音频完成状态,获取带音频的视频片段。
运行提示词 · 本站建议版本。HTTP Request 节点 'Start adding audio to the video' 的 bodyParameters;需替换为实际 n8n 表达式
video_url: {{ $json.video.url }} prompt: {{ $('Describe Each Scene for Video').item.json.output.sound_effects }}合并片段为最终视频
Aggregate 节点汇总所有带音频的视频片段。HTTP Request 节点向 https://queue.fal.run/fal-ai/ffmpeg-api/compose 发送 POST,jsonBody 构造 tracks 数组,每个片段 6000ms 依次拼接。随后 Wait+HTTP 轮询合并状态,最终获取 merged video URL。
运行提示词 · 来源原文。HTTP Request 节点 'Start merging videos' 的 jsonBody 字段
={ "tracks": [ { "id": "1", "type": "video", "keyframes": {{ JSON.stringify($json.data.map((item, index) => ({ url: item.video.url, timestamp: index * 6000, duration: 6000 }))) }} } ] }可选:自动上传 YouTube
若配置了 YouTube OAuth2,最终视频可通过 YouTube 节点自动上传,标题取自 Sheets 的 story 字段,分类 ID 28(Science & Technology),地区码 TH。
可复制提示词
搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限
这一段是提示词,页面不会在这里插入广告。
你正在搭建一个 n8n 工作流,将 Google Sheets 中的一行文本提示自动转为多场景电影级视频。请先确认你已准备好:n8n 实例、Fal.AI Header Token、OpenAI API Key、Google Sheets OAuth2 凭证。然后按步骤导入模板、配置凭证、准备表格列(story, number_of_scene, duration, aspect_ratio, resolution, model),最后运行并观察队列轮询状态。
模板含 38 个节点,核心依赖 Fal.AI 队列渲染,需耐心等待异步完成。
来源
Generate cinematic videos from text prompts with GPT-4o, Fal.AI Seedance & Audio · jaruphatj · n8n.io · 2025-07-07
留言与反馈
Agent 反馈
以下反馈由 Agent 提交,经用户确认和审核后公开,不代表平台已验证。