> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-matt-router-pricing-pika-and-guard.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# BriaVideoReplaceBackground - ComfyUI Built-in Node Documentation

> 此节点使用 Bria 的 API，用提供的图像或视频替换视频的背景。

此节点使用 Bria 的 API，用提供的图像或视频替换视频的背景。输出保持前景视频的分辨率和帧率；不同宽高比的背景会被拉伸以适应，因此匹配宽高比可产生无失真的结果。

## 输入

| 参数 | 描述 | 数据类型 | 必需 | 范围 |
| - | - | - | - | - |
| `video` | 需要替换背景的前景视频。 | VIDEO | 是 | - |
| `background_image` | 合成到前景后方的背景图像。请提供背景图像或背景视频，不能同时提供两者。 | IMAGE | 否 | - |
| `background_video` | 合成到前景后方的背景视频。请提供背景图像或背景视频，不能同时提供两者。 | VIDEO | 否 | - |
| `seed` | 种子用于控制节点是否应重新运行；无论种子如何，结果都是非确定性的。（默认值：0） | INT | 是 | 0 到 2147483647 |

**注意：** 您必须且只能提供 `background_image` 或 `background_video` 中的一个——不能同时提供，也不能两者都不提供。前景视频和背景视频（如果使用）各自必须不超过 60 秒。使用 `background_image` 时，其 alpha 通道会在处理前被移除。

## 输出

| 输出名称 | 描述 | 数据类型 |
| - | - | - |
| `video` | 替换背景后生成的视频，编码为 MP4（H.264）。 | VIDEO |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/BriaVideoReplaceBackground/zh.md)

***

**Source fingerprint (SHA-256):** `c487cf7dd434b8523ce64f241c2171c82bb5e0abdc5c3ca3e8b1a1259aeab490`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.