video-format-conversion
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVideo Format Conversion
视频格式转换
Convert videos between formats, codecs, and aspect ratios using each::sense. This skill handles format conversion, codec transcoding, aspect ratio changes, and optimization for various platforms and use cases.
借助each::sense实现视频格式、编码及宽高比的转换。该技能支持格式转换、编码转码、宽高比调整,以及针对不同平台和使用场景的优化处理。
Features
功能特性
- Format Conversion: Convert between MP4, WebM, MOV, GIF, and more
- Codec Transcoding: H.264, H.265/HEVC, VP9, ProRes, and others
- Aspect Ratio Changes: 16:9 to 9:16, 1:1, 4:3, and custom ratios
- Platform Optimization: Instagram, TikTok, YouTube, Twitter optimized outputs
- Web Streaming: HLS-ready and web-optimized encoding
- Quality Control: Bitrate, resolution, and compression settings
- Batch Processing: Convert multiple videos in sequence
- 格式转换:支持MP4、WebM、MOV、GIF等多种格式互转
- 编码转码:支持H.264、H.265/HEVC、VP9、ProRes等编码格式
- 宽高比调整:支持16:9转9:16、1:1、4:3及自定义宽高比
- 平台优化:生成适配Instagram、TikTok、YouTube、Twitter的优化视频
- 网络流适配:支持HLS就绪及网络优化编码
- 质量控制:可设置码率、分辨率及压缩参数
- 批量处理:支持批量依次转换多个视频
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": "Convert this video to MP4 H.264 format optimized for web playback"}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/source-video.mov"]
}'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": "Convert this video to MP4 H.264 format optimized for web playback"}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/source-video.mov"]
}'Supported Formats & Codecs
支持的格式与编码
| Format | Codecs | Use Cases |
|---|---|---|
| MP4 | H.264, H.265/HEVC | Universal playback, web, mobile |
| WebM | VP9, VP8 | Web browsers, smaller file sizes |
| MOV | ProRes, H.264 | Professional editing, Apple ecosystem |
| GIF | - | Social media, previews, loops |
| MKV | H.264, H.265, VP9 | Archival, high quality |
| 格式 | 编码 | 适用场景 |
|---|---|---|
| MP4 | H.264, H.265/HEVC | 通用播放、网页、移动端 |
| WebM | VP9, VP8 | 网页浏览器、更小文件体积 |
| MOV | ProRes, H.264 | 专业剪辑、苹果生态系统 |
| GIF | - | 社交媒体、预览、循环播放 |
| MKV | H.264, H.265, VP9 | 存档、高质量存储 |
Aspect Ratios
宽高比选项
| Ratio | Resolution | Use Case |
|---|---|---|
| 16:9 | 1920x1080 | YouTube, standard landscape |
| 9:16 | 1080x1920 | TikTok, Instagram Reels, Stories |
| 1:1 | 1080x1080 | Instagram feed, Twitter |
| 4:3 | 1440x1080 | Classic TV, presentations |
| 4:5 | 1080x1350 | Instagram portrait posts |
| 21:9 | 2560x1080 | Cinematic ultrawide |
| 比例 | 分辨率 | 适用场景 |
|---|---|---|
| 16:9 | 1920x1080 | YouTube、标准横屏 |
| 9:16 | 1080x1920 | TikTok、Instagram Reels、Stories |
| 1:1 | 1080x1080 | Instagram动态、Twitter |
| 4:3 | 1440x1080 | 经典电视、演示文稿 |
| 4:5 | 1080x1350 | Instagram竖屏帖子 |
| 21:9 | 2560x1080 | 电影级超宽屏 |
Use Case Examples
使用场景示例
1. Convert to MP4 (H.264)
1. 转换为MP4(H.264格式)
Standard MP4 conversion with H.264 codec for maximum compatibility.
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": "Convert this video to MP4 with H.264 codec. Use high quality settings with a bitrate suitable for 1080p playback. Maintain original aspect ratio."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/source-video.mov"]
}'采用H.264编码的标准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": "Convert this video to MP4 with H.264 codec. Use high quality settings with a bitrate suitable for 1080p playback. Maintain original aspect ratio."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/source-video.mov"]
}'2. Convert to WebM
2. 转换为WebM格式
WebM format with VP9 codec for efficient web delivery.
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": "Convert this MP4 video to WebM format using VP9 codec. Optimize for web streaming with good quality at smaller file size. Target around 5 Mbps bitrate."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/source-video.mp4"]
}'采用VP9编码的WebM格式,实现高效网络传输。
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": "Convert this MP4 video to WebM format using VP9 codec. Optimize for web streaming with good quality at smaller file size. Target around 5 Mbps bitrate."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/source-video.mp4"]
}'3. Convert to GIF
3. 转换为GIF格式
Create animated GIF from video for social sharing and previews.
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": "Convert this video to an animated GIF. Use the first 5 seconds, resize to 480px width, and optimize for file size under 10MB. Create a smooth loop if possible."}],
"model": "eachsense/beta",
"stream": true,
"mode": "eco",
"image_urls": ["https://example.com/source-video.mp4"]
}'从视频生成动画GIF,用于社交分享和预览。
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": "Convert this video to an animated GIF. Use the first 5 seconds, resize to 480px width, and optimize for file size under 10MB. Create a smooth loop if possible."}],
"model": "eachsense/beta",
"stream": true,
"mode": "eco",
"image_urls": ["https://example.com/source-video.mp4"]
}'4. Convert 16:9 to 9:16 (Vertical)
4. 将16:9转换为9:16(竖屏)
Transform landscape video to vertical format for mobile platforms.
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": "Convert this 16:9 landscape video to 9:16 vertical format. Use smart cropping to keep the main subject centered. Output as MP4 H.264 at 1080x1920 resolution."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/landscape-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": "Convert this 16:9 landscape video to 9:16 vertical format. Use smart cropping to keep the main subject centered. Output as MP4 H.264 at 1080x1920 resolution."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/landscape-video.mp4"]
}'5. Convert to Square 1:1
5. 转换为1:1正方形格式
Create square format video for Instagram feed and Twitter.
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": "Convert this video to 1:1 square format at 1080x1080 resolution. Center crop the content and output as MP4 with H.264 codec optimized for social media."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/widescreen-video.mp4"]
}'生成正方形视频,适配Instagram动态和Twitter。
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": "Convert this video to 1:1 square format at 1080x1080 resolution. Center crop the content and output as MP4 with H.264 codec optimized for social media."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/widescreen-video.mp4"]
}'6. Convert to 4:3
6. 转换为4:3格式
Classic 4:3 aspect ratio for presentations and legacy displays.
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": "Convert this 16:9 video to 4:3 aspect ratio. Add letterboxing or pillarboxing as needed rather than cropping. Output at 1440x1080 resolution in MP4 format."}],
"model": "eachsense/beta",
"stream": true,
"mode": "eco",
"image_urls": ["https://example.com/widescreen-video.mp4"]
}'经典4:3宽高比,适配演示文稿和旧款显示器。
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": "Convert this 16:9 video to 4:3 aspect ratio. Add letterboxing or pillarboxing as needed rather than cropping. Output at 1440x1080 resolution in MP4 format."}],
"model": "eachsense/beta",
"stream": true,
"mode": "eco",
"image_urls": ["https://example.com/widescreen-video.mp4"]
}'7. Optimize for Web Streaming
7. 优化为网络流格式
Create web-optimized video with fast start and adaptive quality.
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": "Optimize this video for web streaming. Convert to MP4 H.264 with faststart enabled for progressive download. Use 2-pass encoding, target 3-5 Mbps bitrate, AAC audio at 128kbps. Ensure moov atom is at the beginning for instant playback."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/raw-video.mov"]
}'生成适配网络流的视频,支持快速启动和自适应质量。
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": "Optimize this video for web streaming. Convert to MP4 H.264 with faststart enabled for progressive download. Use 2-pass encoding, target 3-5 Mbps bitrate, AAC audio at 128kbps. Ensure moov atom is at the beginning for instant playback."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/raw-video.mov"]
}'8. Convert to Apple ProRes
8. 转换为Apple ProRes格式
Professional ProRes format for video editing workflows.
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": "Convert this video to Apple ProRes 422 format in a MOV container. Maintain original resolution and frame rate. This is for professional editing in Final Cut Pro and DaVinci Resolve."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/compressed-video.mp4"]
}'专业ProRes格式,适配视频剪辑工作流。
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": "Convert this video to Apple ProRes 422 format in a MOV container. Maintain original resolution and frame rate. This is for professional editing in Final Cut Pro and DaVinci Resolve."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/compressed-video.mp4"]
}'9. Convert for Social Media (Instagram/TikTok)
9. 转换为社交媒体适配格式(Instagram/TikTok)
Platform-optimized video for Instagram Reels and TikTok.
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": "Convert this video for Instagram Reels and TikTok. Use 9:16 aspect ratio at 1080x1920, MP4 H.264 codec, 30fps, and optimize for mobile playback. Keep file size under 100MB and duration under 60 seconds."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/source-video.mov"]
}'生成适配Instagram Reels和TikTok的平台优化视频。
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": "Convert this video for Instagram Reels and TikTok. Use 9:16 aspect ratio at 1080x1920, MP4 H.264 codec, 30fps, and optimize for mobile playback. Keep file size under 100MB and duration under 60 seconds."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/source-video.mov"]
}'10. Batch Convert Multiple Videos
10. 批量转换多个视频
Process multiple videos in a single session with consistent settings.
bash
undefined在单个会话中处理多个视频,保持设置一致。
bash
undefinedStart batch conversion session
Start batch conversion session
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": "I need to convert multiple videos to MP4 H.264 format at 1080p. All videos should use the same encoding settings: H.264 High Profile, 8 Mbps bitrate, AAC audio at 192kbps. Start with this first video."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video1.mov"] }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "I need to convert multiple videos to MP4 H.264 format at 1080p. All videos should use the same encoding settings: H.264 High Profile, 8 Mbps bitrate, AAC audio at 192kbps. Start with this first video."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video1.mov"] }'
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": "I need to convert multiple videos to MP4 H.264 format at 1080p. All videos should use the same encoding settings: H.264 High Profile, 8 Mbps bitrate, AAC audio at 192kbps. Start with this first video."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video1.mov"] }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "I need to convert multiple videos to MP4 H.264 format at 1080p. All videos should use the same encoding settings: H.264 High Profile, 8 Mbps bitrate, AAC audio at 192kbps. Start with this first video."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video1.mov"] }'
Continue with second video (same session)
Continue with second video (same session)
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": "Convert the next video with the same settings."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video2.mov"] }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Convert the next video with the same settings."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video2.mov"] }'
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": "Convert the next video with the same settings."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video2.mov"] }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Convert the next video with the same settings."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video2.mov"] }'
Continue with third video
Continue with third video
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": "Convert this one too, same format."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video3.mov"] }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Convert this one too, same format."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video3.mov"] }'
undefinedcurl -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": "Convert this one too, same format."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video3.mov"] }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Convert this one too, same format."}], "model": "eachsense/beta", "stream": true, "session_id": "batch-convert-001", "mode": "eco", "image_urls": ["https://example.com/video3.mov"] }'
undefinedMode Selection
模式选择
Ask your users before converting:
"Do you want fast & cheap, or high quality?"
| Mode | Best For | Speed | Quality |
|---|---|---|---|
| Final deliverables, ProRes, professional workflows | Slower | Highest |
| Quick previews, batch processing, draft conversions | Faster | Good |
转换前请询问用户:
"您需要快速低成本的转换,还是高质量的转换?"
| 模式 | 适用场景 | 速度 | 质量 |
|---|---|---|---|
| 最终交付成果、ProRes格式、专业工作流 | 较慢 | 最高 |
| 快速预览、批量处理、草稿转换 | 较快 | 良好 |
Multi-Turn Conversion Session
多轮转换会话
Use to maintain context for iterative conversions:
session_idbash
undefined使用保持上下文,实现迭代转换:
session_idbash
undefinedInitial conversion
Initial conversion
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": "Convert this video to MP4 for YouTube at 1080p"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project", "image_urls": ["https://example.com/raw-footage.mov"] }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Convert this video to MP4 for YouTube at 1080p"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project", "image_urls": ["https://example.com/raw-footage.mov"] }'
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": "Convert this video to MP4 for YouTube at 1080p"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project", "image_urls": ["https://example.com/raw-footage.mov"] }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Convert this video to MP4 for YouTube at 1080p"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project", "image_urls": ["https://example.com/raw-footage.mov"] }'
Request different format from same source
Request different format from same source
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 create a vertical version of that same video for YouTube Shorts at 9:16"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Now create a vertical version of that same video for YouTube Shorts at 9:16"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project" }'
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 create a vertical version of that same video for YouTube Shorts at 9:16"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Now create a vertical version of that same video for YouTube Shorts at 9:16"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project" }'
Request thumbnail extraction
Request thumbnail extraction
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 a thumbnail from the best frame of that video"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Extract a thumbnail from the best frame of that video"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project" }'
undefinedcurl -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 a thumbnail from the best frame of that video"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project" }'
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "messages": [{"role": "user", "content": "Extract a thumbnail from the best frame of that video"}], "model": "eachsense/beta", "stream": true, "session_id": "youtube-upload-project" }'
undefinedPlatform-Specific Settings
平台专属设置
YouTube
YouTube
- Format: MP4 (H.264)
- Resolution: 1080p or 4K
- Frame rate: Match source (24, 30, or 60fps)
- Bitrate: 8-12 Mbps for 1080p, 35-45 Mbps for 4K
- 格式:MP4(H.264)
- 分辨率:1080p或4K
- 帧率:匹配源视频(24、30或60fps)
- 码率:1080p为8-12 Mbps,4K为35-45 Mbps
Instagram Reels / TikTok
Instagram Reels / TikTok
- Format: MP4 (H.264)
- Aspect ratio: 9:16
- Resolution: 1080x1920
- Duration: Under 60 seconds (Reels) / 3 minutes (TikTok)
- File size: Under 100MB
- 格式:MP4(H.264)
- 宽高比:9:16
- 分辨率:1080x1920
- 时长:Reels不超过60秒 / TikTok不超过3分钟
- 文件大小:不超过100MB
Twitter/X
Twitter/X
- Format: MP4 (H.264)
- Aspect ratio: 16:9, 1:1, or 9:16
- Resolution: Up to 1920x1200
- Duration: Up to 2:20 (140 seconds)
- File size: Under 512MB
- 格式:MP4(H.264)
- 宽高比:16:9、1:1或9:16
- 分辨率:最高1920x1200
- 时长:最长2分20秒(140秒)
- 文件大小:不超过512MB
- Format: MP4 (H.264)
- Aspect ratio: 16:9 or 1:1
- Resolution: 1080p maximum
- Duration: 10 minutes maximum
- 格式:MP4(H.264)
- 宽高比:16:9或1:1
- 分辨率:最高1080p
- 时长:最长10分钟
Error Handling
错误处理
| Error | Cause | Solution |
|---|---|---|
| Insufficient balance | Top up at eachlabs.ai |
| Timeout | Large video file or complex conversion | Set client timeout to minimum 10 minutes |
| Unsupported format | Source format not recognized | Convert to intermediate format first |
| File too large | Video exceeds size limits | Compress or split video before conversion |
| 错误 | 原因 | 解决方案 |
|---|---|---|
| 余额不足 | 在eachlabs.ai充值 |
| 超时 | 视频文件过大或转换复杂 | 将客户端超时设置为至少10分钟 |
| 格式不支持 | 源格式无法识别 | 先转换为中间格式 |
| 文件过大 | 视频超过大小限制 | 转换前先压缩或分割视频 |
Best Practices
最佳实践
Quality
质量
- Use mode for final deliverables and professional outputs
max - Use mode for previews and batch processing
eco - Specify target bitrate for predictable file sizes
- Request 2-pass encoding for better quality at lower bitrates
- 最终交付成果和专业输出使用模式
max - 预览和批量处理使用模式
eco - 指定目标码率以控制文件大小
- 请求双遍编码以在低码率下获得更好质量
Performance
性能
- Set client timeout to minimum 10 minutes for video processing
- Use mode for faster turnaround on large batches
eco - Process shorter clips when testing settings
- 视频处理时将客户端超时设置为至少10分钟
- 大型批量处理使用模式以加快周转
eco - 测试设置时处理较短片段
Compatibility
兼容性
- H.264 is the most universally compatible codec
- WebM/VP9 offers better compression but less device support
- ProRes is ideal for editing workflows but creates large files
- Always test output on target devices/platforms
- H.264是兼容性最广的编码格式
- WebM/VP9压缩率更高但设备支持较少
- ProRes适合剪辑工作流但文件体积大
- 始终在目标设备/平台上测试输出结果
Related Skills
相关技能
- - Core API documentation
each-sense - - Generate videos from text/images
video-generation - - Edit and enhance existing videos
video-editing
- - 核心API文档
each-sense - - 从文本/图像生成视频
video-generation - - 编辑和增强现有视频
video-editing