mcpField
I
image-to-video

image-to-video

github.com/eachlabs创意与媒体46524 次安装1 天前更新
代码仓库

关于 image-to-video

image-to-video 是使用 each::sense 将静态图片转为动态视频的创意技能,适合制作照片动画、产品展示和社交媒体素材。支持多种运动效果,并可通过会话迭代调整。

主要功能

  1. 01照片与人像动画
  2. 02Ken Burns 平移与缩放
  3. 03局部循环动画
  4. 04产品与标志展示动画
  5. 05视差景深与风景动态

适用场景

  1. 01为静态肖像添加自然动作
  2. 02制作带局部动效的循环画面
  3. 03生成电商产品展示视频
  4. 04让社交媒体图片动起来

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/eachlabs/skills --skill image-to-video

安装后在 Claude Code 中输入/image-to-video确认已加载。

附带文件references/SSE-EVENTS.md

详细介绍

图片转视频动画

使用 each::sense 将静态图片转化为引人入胜的视频。此技能可为静态照片添加自然动作、Ken Burns 效果、电影感动图和电影级运镜。

功能

  • 照片动画:为静态照片注入逼真动感
  • Ken Burns 效果:通过平滑的平移和缩放讲述故事
  • 电影感动图制作:在特定区域创建微妙的循环动画
  • 产品展示:制作动态的 360 度风格产品展示
  • 肖像动画:添加自然的面部动作和表情
  • 风景动画:让云朵移动、水流淌、树木摇曳
  • 视差 3D 效果:通过基于景深的动态效果打造沉浸式视觉体验
  • Logo 动画:为静态 Logo 添加符合品牌调性的动效
  • 艺术作品动画:让绘画和艺术作品栩栩如生
  • 社交媒体动效:制作吸引眼球、提升互动的动画内容

快速开始

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": "Animate this photo with subtle natural movement, make it feel alive"}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/photo.jpg"],
    "mode": "max"
  }'

用例示例

1. 静态照片动画

为静态照片添加自然动作,将其转化为生动瞬间。

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": "Animate this photo with gentle, natural movement. Add subtle motion like hair moving slightly, clothes flowing, and ambient movement. Keep it realistic and cinematic, 5 seconds."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/portrait-photo.jpg"],
    "mode": "max"
  }'
2. Ken Burns 效果(平移/缩放)

通过纪录片风格的平移和缩放讲述故事。

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 Ken Burns effect to this image. Start zoomed out showing the full scene, then slowly zoom into the main subject in the center. Smooth, cinematic movement over 8 seconds."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/landscape-scene.jpg"],
    "mode": "max"
  }'
3. 电影感动图制作

制作令人着迷的循环动画,让特定元素单独运动。

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": "Create a cinemagraph from this coffee shop image. Keep the person still but animate only the steam rising from the coffee cup. Create a seamless loop, 3 seconds."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/coffee-shop.jpg"],
    "mode": "max"
  }'
4. 产品展示动画

制作动态产品展示,添加旋转或揭示效果。

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": "Animate this product photo into a showcase video. Add subtle camera orbit movement around the product, dramatic lighting transitions, and a premium feel. 6 seconds, perfect for e-commerce."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/product-watch.jpg"],
    "mode": "max"
  }'
5. 肖像动画(细微动作)

为肖像照片添加自然、细微的动作。

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": "Animate this portrait with very subtle, natural movement. Add gentle breathing motion, slight eye movement, and micro-expressions. Keep it realistic and not exaggerated - like a living photograph. 4 seconds."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/headshot.jpg"],
    "mode": "max"
  }'
6. 风景动画(云朵、水流)

通过环境动态让自然景色栩栩如生。

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": "Animate this landscape photo. Make the clouds drift slowly across the sky, add gentle ripples to the lake water, and subtle movement in the trees from a light breeze. Peaceful, serene mood. 10 seconds loop."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/mountain-lake.jpg"],
    "mode": "max"
  }'
7. 视差 3D 效果视频

通过基于景深的动态效果营造沉浸式 3D 体验。

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": "Create a 3D parallax effect video from this image. Separate the foreground, midground, and background layers and move them at different speeds to create depth. Subtle camera drift that reveals the 3D space. 5 seconds."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/street-scene.jpg"],
    "mode": "max"
  }'
8. 静态 Logo 动画

将静态 Logo 转化为动画片头。

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": "Animate this logo for a video intro. Create a smooth reveal animation - the logo assembles or fades in with elegant motion. Add subtle shine or glow effect. Professional and modern style. 3 seconds."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/company-logo.png"],
    "mode": "max"
  }'
9. 艺术作品动画(让绘画栩栩如生)

通过艺术化动态效果让艺术作品和绘画栩栩如生。

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": "Animate this painting and bring it to life. Add flowing motion to the water in the scene, make the figures move subtly, and add atmospheric effects like floating particles or shifting light. Maintain the painterly style. 8 seconds."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/oil-painting.jpg"],
    "mode": "max"
  }'
10. 社交媒体动态图形

为社交媒体制作引人注目的动画内容。

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": "Turn this static social media graphic into an eye-catching animated post. Add dynamic motion to the elements - pulsing, floating, or sliding effects. Make it loop seamlessly for Instagram. High energy, attention-grabbing. 3 seconds loop."}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/social-graphic.png"],
    "mode": "max"
  }'

模式选择

模式最适用场景速度质量
max最终视频、客户交付内容、高质量动画较慢最高
eco快速预览、概念测试、批量处理较快良好

多轮创意迭代

使用 session_id 迭代制作动画:

# Initial animation
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": "Animate this beach photo with waves and palm trees moving"}],
    "model": "eachsense/beta",
    "stream": true,
    "image_urls": ["https://example.com/beach.jpg"],
    "session_id": "beach-animation-001"
  }'

# Iterate based on feedback
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": "Make the waves more dramatic and add some birds flying in the sky"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "beach-animation-001"
  }'

# Request a variation
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": "Create a sunset version with golden hour lighting"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "beach-animation-001"
  }'

动画技巧

制作自然动作
  • 指定具体的动作类型(呼吸、头发、衣物)
  • 指定氛围(平静、活力、戏剧性)
  • 合理设置时长(大多数情况下为 3-10 秒)
制作电影感动图
  • 指定需要移动的具体元素
  • 要求无缝循环
  • 让运动区域保持小且独立
使用 Ken Burns 效果
  • 指定起始和结束构图
  • 指定缩放方向(放大/缩小)和平移方向
  • 使用较长时长,让运动更加平滑
制作产品镜头
  • 要求镜头环绕或旋转
  • 要求增强光效
  • 指定发布平台(电商、社交媒体、广告)

提示词技巧

制作动画时,请包含以下细节:

  1. 动作类型:动作类型(细微、戏剧性、流畅)
  2. 时长:视频应有多长(通常为 3-10 秒)
  3. 循环:是否需要无缝循环
  4. 焦点区域:哪些元素需要移动,哪些保持静止
  5. 风格:电影感、专业、活泼等
  6. 用途:社交媒体、广告、网站、演示文稿
提示词结构示例
"Animate this [image type] with [motion description].
[Specific elements to animate].
[Style/mood]. [Duration] seconds.
[Additional requirements like looping, aspect ratio]."

错误处理

错误原因解决方案
Failed to create prediction: HTTP 422余额不足前往 eachlabs.ai 充值
图片无法访问URL 无效或为私有链接使用可公开访问的图片 URL
超时动画过于复杂将客户端超时设置为至少 10 分钟
违反内容政策内容违规调整图片或提示词,使其符合政策

客户端超时要求

视频生成可能需要几分钟,具体取决于复杂度和时长。请为 HTTP 客户端配置:

  • 最短超时时间:10 分钟(600 秒)
  • 推荐超时时间:视频较长时设为 15 分钟

相关技能

  • each-sense - 核心 API 文档和 SSE 事件参考
  • meta-ad-creative-generation - 面向 Meta 平台的动画广告
  • product-photo-generation - 用于动画的源图像
  • video-generation - 文本生成视频

评论

支持 Markdown