video-background-removal

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Video Background Removal

视频背景移除

Remove and replace video backgrounds using each::sense. This skill enables transparent backgrounds, virtual environments, professional compositing, and creative background effects for any video content.
借助each::sense移除并替换视频背景。该功能可为任意视频内容实现透明背景、虚拟环境、专业合成以及创意背景效果。

Features

功能特性

  • Transparent Backgrounds: Remove backgrounds completely for compositing
  • Solid Color Replacement: Replace with any solid color (white, black, brand colors)
  • Image Backgrounds: Composite subjects onto static image backgrounds
  • Video Backgrounds: Place subjects into dynamic video backgrounds
  • Virtual Offices: Professional meeting backgrounds for remote work
  • Green Screen Effect: Achieve chroma key results without actual green screens
  • Background Blur: Privacy-preserving blur effects for video calls
  • Animated Backgrounds: Dynamic motion graphics behind subjects
  • Product Videos: Clean product footage with removed/replaced backgrounds
  • Talking Head Videos: Professional presenter backgrounds
  • 透明背景:完全移除背景以用于合成
  • 纯色替换:替换为任意纯色(白色、黑色、品牌色)
  • 图片背景:将主体合成到静态图片背景上
  • 视频背景:将主体置于动态视频背景中
  • 虚拟办公场景:适用于远程办公的专业会议背景
  • 绿幕效果:无需实际绿幕即可实现抠像效果
  • 背景模糊:视频通话中的隐私保护模糊效果
  • 动态背景:主体后方添加动态运动图形
  • 产品视频:移除/替换背景后的干净产品素材
  • 主讲人视频:专业的主讲人背景

Quick Start

快速开始

bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background from this video and make it transparent"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/my-video.mp4"]
  }'
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background from this video and make it transparent"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/my-video.mp4"]
  }'

Use Case Examples

使用场景示例

1. Remove Video Background (Transparent)

1. 移除视频背景(透明)

Create a video with transparent background for compositing in video editors.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background from this video completely. Output should have a transparent background so I can composite it in my video editor. Keep the subject cleanly isolated with smooth edges."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/presenter-video.mp4"]
  }'
创建带有透明背景的视频,以便在视频编辑器中进行合成。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background from this video completely. Output should have a transparent background so I can composite it in my video editor. Keep the subject cleanly isolated with smooth edges."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/presenter-video.mp4"]
  }'

2. Replace with Solid Color

2. 替换为纯色背景

Replace background with a clean solid color for professional content.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Replace the background of this video with a solid white background. Keep the subject sharp and well-isolated. Clean edges, professional look suitable for corporate presentations."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/interview-clip.mp4"]
  }'
将背景替换为干净的纯色,用于专业内容制作。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Replace the background of this video with a solid white background. Keep the subject sharp and well-isolated. Clean edges, professional look suitable for corporate presentations."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/interview-clip.mp4"]
  }'

3. Replace with Image Background

3. 替换为图片背景

Composite subject onto a static image background.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background from this video and replace it with the provided image. Blend the subject naturally into the new scene with appropriate lighting and shadows."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/person-talking.mp4"],
    "image_urls": ["https://example.com/beach-sunset-background.jpg"]
  }'
将主体合成到静态图片背景上。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background from this video and replace it with the provided image. Blend the subject naturally into the new scene with appropriate lighting and shadows."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/person-talking.mp4"],
    "image_urls": ["https://example.com/beach-sunset-background.jpg"]
  }'

4. Replace with Video Background

4. 替换为视频背景

Create dynamic composites with moving video backgrounds.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background from my video and replace it with the second video as the new background. Sync the timing and make the composite look natural."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": [
      "https://example.com/foreground-subject.mp4",
      "https://example.com/cityscape-background.mp4"
    ]
  }'
创建带有动态视频背景的合成内容。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background from my video and replace it with the second video as the new background. Sync the timing and make the composite look natural."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": [
      "https://example.com/foreground-subject.mp4",
      "https://example.com/cityscape-background.mp4"
    ]
  }'

5. Virtual Office Background

5. 虚拟办公背景

Create professional virtual meeting backgrounds.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Replace the background with a professional modern office environment. Clean minimalist design with bookshelves, plants, and soft natural lighting. Suitable for executive video calls and professional meetings."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/webcam-recording.mp4"]
  }'
创建专业的虚拟会议背景。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Replace the background with a professional modern office environment. Clean minimalist design with bookshelves, plants, and soft natural lighting. Suitable for executive video calls and professional meetings."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/webcam-recording.mp4"]
  }'

6. Green Screen Replacement (Without Green Screen)

6. 无绿幕抠像替换

Achieve chroma key quality results from any video, no green screen needed.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Extract the person from this video as if it was shot on a green screen. Clean matte extraction with no background spill. Output with transparent background or green screen color for post-production keying."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/filmed-at-home.mp4"]
  }'
无需绿幕即可实现专业抠像效果。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Extract the person from this video as if it was shot on a green screen. Clean matte extraction with no background spill. Output with transparent background or green screen color for post-production keying."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/filmed-at-home.mp4"]
  }'

7. Blur Background in Video

7. 视频背景模糊

Apply privacy-preserving background blur for video calls and content.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Apply a smooth gaussian blur to the background while keeping the person in focus. Moderate blur intensity - enough to hide details but keep sense of depth. Natural bokeh effect like a portrait mode camera."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/home-office-call.mp4"]
  }'
为视频通话和内容添加隐私保护型背景模糊效果。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Apply a smooth gaussian blur to the background while keeping the person in focus. Moderate blur intensity - enough to hide details but keep sense of depth. Natural bokeh effect like a portrait mode camera."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/home-office-call.mp4"]
  }'

8. Replace with Animated Background

8. 替换为动态背景

Add dynamic motion graphics or animated backgrounds.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background and replace it with an animated gradient background. Smooth flowing colors transitioning between blue and purple. Subtle movement, not distracting. Professional motion graphics style."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/content-creator.mp4"]
  }'
添加动态运动图形或动态背景。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background and replace it with an animated gradient background. Smooth flowing colors transitioning between blue and purple. Subtle movement, not distracting. Professional motion graphics style."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/content-creator.mp4"]
  }'

9. Product Video Background Removal

9. 产品视频背景移除

Clean product footage for e-commerce and marketing.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background from this product video. The product is a rotating sneaker on a turntable. Make the background pure white for e-commerce use. Maintain all product details, reflections, and shadows."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/product-360-spin.mp4"]
  }'
为电商和营销制作干净的产品素材。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the background from this product video. The product is a rotating sneaker on a turntable. Make the background pure white for e-commerce use. Maintain all product details, reflections, and shadows."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/product-360-spin.mp4"]
  }'

10. Talking Head Background Swap

10. 主讲人背景替换

Professional presenter and talking head video backgrounds.
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Replace the background in this talking head video with a professional studio setting. Dark backdrop with subtle colored accent lighting like a podcast studio or news desk. Keep the presenter well-lit and naturally composited."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/youtube-video.mp4"]
  }'
为主讲人视频提供专业背景。
bash
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Replace the background in this talking head video with a professional studio setting. Dark backdrop with subtle colored accent lighting like a podcast studio or news desk. Keep the presenter well-lit and naturally composited."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/youtube-video.mp4"]
  }'

Multi-Turn Workflow Example

多轮工作流示例

Use
session_id
to iterate on background replacements across multiple requests.
bash
undefined
使用
session_id
在多个请求中迭代进行背景替换。
bash
undefined

Initial background removal

初始背景移除

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Remove the background from this video of me presenting"}], "model": "eachsense/beta", "stream": true, "session_id": "bg-removal-project-001", "video_urls": ["https://example.com/presentation.mp4"] }'
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Remove the background from this video of me presenting"}], "model": "eachsense/beta", "stream": true, "session_id": "bg-removal-project-001", "video_urls": ["https://example.com/presentation.mp4"] }'

Iterate with different background

替换为不同背景

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Now replace it with a modern tech office background instead"}], "model": "eachsense/beta", "stream": true, "session_id": "bg-removal-project-001" }'
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Now replace it with a modern tech office background instead"}], "model": "eachsense/beta", "stream": true, "session_id": "bg-removal-project-001" }'

Fine-tune the result

优化结果

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "The edges look a bit rough around my hair. Can you refine the matte for better edge quality?"}], "model": "eachsense/beta", "stream": true, "session_id": "bg-removal-project-001" }'
undefined
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "The edges look a bit rough around my hair. Can you refine the matte for better edge quality?"}], "model": "eachsense/beta", "stream": true, "session_id": "bg-removal-project-001" }'
undefined

Mode Selection

模式选择

Choose the appropriate mode based on your needs:
ModeBest ForSpeedQuality
max
Final production videos, client deliverablesSlowerHighest quality, best edge detection
eco
Quick previews, concept testing, draftsFasterGood quality, suitable for review
Recommendation: Use
eco
mode for testing backgrounds and
max
mode for final renders.
根据需求选择合适的模式:
模式适用场景速度质量
max
最终成品视频、客户交付内容较慢最高质量,边缘检测效果最佳
eco
快速预览、概念测试、草稿较快良好质量,适合用于审核
建议:测试背景时使用
eco
模式,最终渲染时使用
max
模式。

Best Practices

最佳实践

For Clean Extractions

实现干净抠像

  • Lighting: Well-lit subjects extract better than low-light footage
  • Contrast: Higher contrast between subject and background helps
  • Movement: Slower movements produce cleaner mattes
  • Hair/Fine Details: Request "refined edges" for subjects with complex hair
  • 光线:光线充足的主体比低光素材抠像效果更好
  • 对比度:主体与背景的对比度越高越有助于抠像
  • 动作:较慢的动作能产生更干净的遮罩
  • 头发/精细细节:针对有复杂发型的主体,可要求“优化边缘”

For Natural Composites

实现自然合成

  • Lighting Match: Request backgrounds that match your footage lighting
  • Color Grading: Ask for color matching between subject and background
  • Shadows: Request natural shadow placement for grounded composites
  • Depth of Field: Match background blur to your camera's depth of field
  • 光线匹配:选择与素材光线一致的背景
  • 色彩分级:要求主体与背景进行色彩匹配
  • 阴影处理:要求添加自然阴影,让合成效果更真实
  • 景深匹配:让背景模糊程度与相机景深一致

For Professional Results

获得专业效果

  • Specify your use case (corporate, social media, broadcast)
  • Mention output requirements (resolution, format)
  • Request specific background styles that match your brand
  • 指定使用场景(企业宣传、社交媒体、广播)
  • 说明输出要求(分辨率、格式)
  • 要求与品牌风格匹配的特定背景样式

Prompt Tips

提示词技巧

When requesting background removal/replacement, include:
  1. Source Description: What's in your video (person, product, etc.)
  2. Background Goal: Transparent, solid color, specific scene, blur
  3. Quality Requirements: Edge quality, shadow handling, reflections
  4. Use Case: Where will this video be used
  5. Style Matching: Lighting, color tone, atmosphere
请求背景移除/替换时,需包含以下信息:
  1. 素材描述:视频中的内容(人物、产品等)
  2. 背景目标:透明、纯色、特定场景、模糊
  3. 质量要求:边缘质量、阴影处理、反光效果
  4. 使用场景:视频的使用平台/场景
  5. 风格匹配:光线、色调、氛围

Example Prompt Structure

提示词结构示例

"Remove/replace the background from this [subject type] video.
[New background description or transparent/solid color].
[Edge quality and compositing requirements].
For use in [context/platform]."
"移除/替换这个[主体类型]视频的背景。
[新背景描述或透明/纯色要求]。
[边缘质量与合成要求]。
用于[使用场景/平台]。"

Error Handling

错误处理

ErrorCauseSolution
Failed to create prediction: HTTP 422
Insufficient balanceTop up at eachlabs.ai
TimeoutVideo processing takes timeSet client timeout to minimum 10 minutes
Poor edge qualityComplex hair/fine detailsRequest "refined edge detection" in prompt
Subject detection failedLow contrast footageTry with better lit footage or specify subject location
错误信息原因解决方案
Failed to create prediction: HTTP 422
余额不足在eachlabs.ai进行充值
超时视频处理需要时间将客户端超时设置为至少10分钟
边缘质量差头发/精细细节复杂在提示词中要求“优化边缘检测”
主体检测失败素材对比度低使用光线更好的素材,或指定主体位置

Timeout Configuration

超时配置

Video background removal is computationally intensive. Configure your HTTP client with adequate timeout:
  • Minimum recommended timeout: 10 minutes (600 seconds)
  • For longer videos: Increase proportionally (1 minute timeout per 10 seconds of video)
bash
undefined
视频背景移除计算量较大,请为HTTP客户端配置足够的超时时间:
  • 最低推荐超时时间:10分钟(600秒)
  • 长视频处理:按比例增加(每10秒视频对应1分钟超时)
bash
undefined

Example with explicit timeout using curl

使用curl设置明确超时的示例

curl --max-time 600 -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Remove background from this video"}], "model": "eachsense/beta", "stream": true, "mode": "max", "video_urls": ["https://example.com/long-video.mp4"] }'
undefined
curl --max-time 600 -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Remove background from this video"}], "model": "eachsense/beta", "stream": true, "mode": "max", "video_urls": ["https://example.com/long-video.mp4"] }'
undefined

Related Skills

相关功能

  • each-sense
    - Core API documentation
  • product-video-generation
    - E-commerce video creation
  • video-generation
    - AI video generation
  • image-background-removal
    - Static image background removal
  • each-sense
    - 核心API文档
  • product-video-generation
    - 电商视频制作
  • video-generation
    - AI视频生成
  • image-background-removal
    - 静态图片背景移除