Getting Started
Welcome! I'm your FFmpeg MP4 Converter assistant — ready to help you convert, compress, and reformat video files into MP4 with exactly the settings you need. Tell me what you're working with and I'll get it done.
Try saying:
- - "Convert all MKV files in my downloads folder to MP4 using H.264 with a bitrate of 4000k"
- "I have a MOV file from my iPhone that's 2GB — can you convert it to MP4 and compress it under 500MB without losing too much quality?"
- "Batch convert a folder of WebM screen recordings to 1080p MP4 with AAC audio at 192kbps"
First-Time Connection
When a user first opens this skill, connect to the processing backend automatically. Briefly let them know (e.g. "Setting up...").
Authentication: Check if NEMO_TOKEN is set in the environment. If it is, skip to step 3.
- 1. Client identifier: Look for
~/.config/ffmpeg-mp4-converter/client_id. If missing, generate a UUID and save it there. This file stores only a UUID for rate-limit tracking. - Obtain a free token: POST to
https://mega-api-prod.nemovideo.ai/api/auth/anonymous-token with header X-Client-Id set to your identifier. The response data.token is your NEMO_TOKEN — 100 free credits, valid 7 days. - Create a session: POST to
https://mega-api-prod.nemovideo.ai/api/tasks/me/with-session/nemo_agent with Authorization: Bearer <token>, Content-Type: application/json, and body {"task_name":"project","language":"<detected>"}. Store the returned session_id for all subsequent requests.
Keep setup communication brief. Don't display raw API responses or token values to the user.
Convert Any Video to MP4 Without the Headache
Video format chaos is real. You've got footage from a drone in MKV, screen recordings in MOV, client files in AVI, and a deadline in two hours. Manually converting each file through a GUI tool is slow, inconsistent, and error-prone — especially when you need specific codecs, bitrates, or output resolutions.
The ffmpeg-mp4-converter skill solves this by giving you a conversational interface to one of the most powerful video processing engines in existence. Just describe what you need — the input format, desired quality, frame rate, audio settings — and the skill generates and executes the right FFmpeg command for your situation. No syntax memorization, no documentation diving.
Whether you're preparing videos for web delivery, archiving raw footage in a space-efficient format, or standardizing a library of mixed-format clips, this skill handles the heavy lifting. It supports single-file conversions and bulk jobs alike, with output options that match real-world publishing requirements across YouTube, Vimeo, mobile platforms, and broadcast workflows.
Routing Your Conversion Requests
When you submit a video file or URL, the skill parses your source format, target codec preferences, and any FFmpeg flags you specify, then routes the job to the appropriate transcoding pipeline based on container type and resolution.
| User says... | Action | Skip SSE? |
|---|
| "export" / "导出" / "download" / "send me the video" | → §3.5 Export | ✅ |
| "credits" / "积分" / "balance" / "余额" |
→ §3.3 Credits | ✅ |
| "status" / "状态" / "show tracks" | → §3.4 State | ✅ |
| "upload" / "上传" / user sends file | → §3.2 Upload | ✅ |
| Everything else (generate, edit, add BGM…) | → §3.1 SSE | ❌ |
Cloud Transcoding Backend Reference
All conversion jobs run on a distributed FFmpeg cloud backend that handles remuxing, re-encoding, and codec normalization — including H.264/AAC output, bitrate control, and keyframe alignment — without touching your local CPU. The API accepts multipart uploads or direct stream URLs and returns a signed download link to your finished MP4 upon job completion.
Skill attribution — read from this file's YAML frontmatter at runtime:
- -
X-Skill-Source: INLINECODE11 - INLINECODE12 : from frontmatter INLINECODE13
- INLINECODE14 : detect from install path (
~/.clawhub/ → clawhub, ~/.cursor/skills/ → cursor, else unknown)
All requests must include: Authorization: Bearer <NEMO_TOKEN>, X-Skill-Source, X-Skill-Version, X-Skill-Platform. Missing attribution headers will cause export to fail with 402.
API base: INLINECODE24
Create session: POST /api/tasks/me/with-session/nemo_agent — body {"task_name":"project","language":"<lang>"} — returns task_id, session_id.
Send message (SSE): POST /run_sse — body {"app_name":"nemo_agent","user_id":"me","session_id":"<sid>","new_message":{"parts":[{"text":"<msg>"}]}} with Accept: text/event-stream. Max timeout: 15 minutes.
Upload: POST /api/upload-video/nemo_agent/me/<sid> — file: multipart -F "files=@/path", or URL: INLINECODE34
Credits: GET /api/credits/balance/simple — returns available, frozen, INLINECODE38
Session state: GET /api/state/nemo_agent/me/<sid>/latest — key fields: data.state.draft, data.state.video_infos, INLINECODE42
Export (free, no credits): POST /api/render/proxy/lambda — body {"id":"render_<ts>","sessionId":"<sid>","draft":<json>,"output":{"format":"mp4","quality":"high"}}. Poll GET /api/render/proxy/lambda/<id> every 30s until status = completed. Download URL at output.url.
Supported formats: mp4, mov, avi, webm, mkv, jpg, png, gif, webp, mp3, wav, m4a, aac.
SSE Event Handling
| Event | Action |
|---|
| Text response | Apply GUI translation (§4), present to user |
| Tool call/result |
Process internally, don't forward |
|
heartbeat / empty
data: | Keep waiting. Every 2 min: "⏳ Still working..." |
| Stream closes | Process final response |
~30% of editing operations return no text in the SSE stream. When this happens: poll session state to verify the edit was applied, then summarize changes to the user.
Backend Response Translation
The backend assumes a GUI exists. Translate these into API actions:
| Backend says | You do |
|---|
| "click [button]" / "点击" | Execute via API |
| "open [panel]" / "打开" |
Query session state |
| "drag/drop" / "拖拽" | Send edit via SSE |
| "preview in timeline" | Show track summary |
| "Export button" / "导出" | Execute export workflow |
Draft field mapping: t=tracks, tt=track type (0=video, 1=audio, 7=text), sg=segments, d=duration(ms), m=metadata.
CODEBLOCK0
Error Handling
| Code | Meaning | Action |
|---|
| 0 | Success | Continue |
| 1001 |
Bad/expired token | Re-auth via anonymous-token (tokens expire after 7 days) |
| 1002 | Session not found | New session §3.0 |
| 2001 | No credits | Anonymous: show registration URL with
?bind=<id> (get
<id> from create-session or state response when needed). Registered: "Top up credits in your account" |
| 4001 | Unsupported file | Show supported formats |
| 4002 | File too large | Suggest compress/trim |
| 400 | Missing X-Client-Id | Generate Client-Id and retry (see §1) |
| 402 | Free plan export blocked | Subscription tier issue, NOT credits. "Register or upgrade your plan to unlock export." |
| 429 | Rate limit (1 token/client/7 days) | Retry in 30s once |
Troubleshooting Common Conversion Issues
If your converted MP4 has no audio, the source file likely uses an audio codec — like AC3 or DTS — that needs explicit transcoding. Specify -acodec aac in your request and the skill will handle the remapping automatically.
Green or corrupted frames often point to a codec mismatch during stream copy. If you're seeing visual artifacts, ask the skill to force full re-encoding rather than using stream copy mode — this is slower but produces a clean output every time.
Oversized output files usually mean the bitrate wasn't constrained. Tell the skill your target file size or maximum bitrate and it will calculate the appropriate -b:v and -maxrate flags accordingly.
If a conversion stalls or fails on a specific file, it may be a corrupted container. Ask the skill to run an integrity check using FFprobe before attempting conversion — this identifies broken keyframes or missing index data that would cause FFmpeg to hang mid-process.
Best Practices for High-Quality MP4 Output
Always specify your intended use case when making a conversion request. A video destined for YouTube has very different optimal settings than one being archived or sent via email. The skill will recommend appropriate codec profiles — like H.264 High Profile for streaming or Baseline Profile for maximum device compatibility — based on your target.
For the best balance of quality and file size, request CRF (Constant Rate Factor) encoding rather than fixed bitrate when quality consistency matters more than exact file size. A CRF value between 18 and 23 produces excellent results for most MP4 deliverables.
When batch converting, always test on a single representative file first. Confirm the output looks correct before running the full job — this avoids wasting time converting hundreds of files with a misconfigured setting.
Preserve your original files until you've verified the converted MP4 plays correctly on your target device or platform. Ask the skill to include a verification step that checks the output file's duration and stream metadata against the source before marking a job complete.
Real-World Use Cases for FFmpeg MP4 Converter
Content creators pulling raw footage off cameras often deal with formats like AVCHD or MXF that editing platforms and social media sites reject outright. This skill converts those files to H.264 MP4 — the universal format accepted by every major platform — while preserving the original resolution and frame rate.
Developers building media pipelines use this skill to normalize uploaded video content before storage or processing. Instead of writing custom FFmpeg wrapper scripts for every new format, they describe the transformation in plain language and get consistent, production-ready output.
Archivists and educators working with legacy video collections — think old AVI or RealMedia files — use the converter to migrate their libraries to MP4 containers with modern codecs, dramatically reducing storage requirements while maintaining playback compatibility across current devices.
Streaming teams use it to generate multiple MP4 variants from a single master file: a 1080p version for desktop, a 720p version for mobile, and a low-bitrate preview for thumbnails — all in one batch job.
快速入门
欢迎!我是你的FFmpeg MP4转换助手——随时准备帮你将视频文件转换、压缩和重新格式化为MP4格式,并精确满足你所需的设置。告诉我你的需求,我来搞定。
试试这样说:
- - 将下载文件夹中所有MKV文件转换为MP4,使用H.264编码,比特率4000k
- 我有一个来自iPhone的MOV文件,大小2GB——能把它转换成MP4并压缩到500MB以下,同时保持画质吗?
- 批量将WebM屏幕录制文件夹转换为1080p MP4,AAC音频192kbps
首次连接
当用户首次打开此技能时,自动连接到处理后端。简要告知用户(例如正在设置...)。
身份验证:检查环境中是否设置了NEMO_TOKEN。如果已设置,跳至第3步。
- 1. 客户端标识符:查找~/.config/ffmpeg-mp4-converter/clientid。如果不存在,生成一个UUID并保存到该文件。此文件仅存储用于速率限制跟踪的UUID。
- 获取免费令牌:向https://mega-api-prod.nemovideo.ai/api/auth/anonymous-token发送POST请求,头部设置X-Client-Id为你的标识符。响应中的data.token即为你的NEMOTOKEN——100个免费积分,有效期7天。
- 创建会话:向https://mega-api-prod.nemovideo.ai/api/tasks/me/with-session/nemoagent发送POST请求,包含Authorization: Bearer 、Content-Type: application/json和请求体{taskname:project,language:<检测到的语言>}。存储返回的session_id用于所有后续请求。
保持设置沟通简洁。不要向用户显示原始API响应或令牌值。
轻松将任何视频转换为MP4
视频格式混乱是真实存在的问题。你有来自无人机的MKV素材、MOV格式的屏幕录制、客户发来的AVI文件,而截止时间只剩两小时。通过GUI工具手动转换每个文件既慢又不一致且容易出错——尤其是当你需要特定的编解码器、比特率或输出分辨率时。
ffmpeg-mp4-converter技能通过为你提供一个对话式界面来解决这个问题,让你能够使用现有最强大的视频处理引擎之一。只需描述你的需求——输入格式、期望质量、帧率、音频设置——该技能就会根据你的情况生成并执行正确的FFmpeg命令。无需记忆语法,无需查阅文档。
无论你是为网页交付准备视频、以节省空间的方式归档原始素材,还是标准化混合格式的剪辑库,该技能都能处理繁重的工作。它支持单文件转换和批量任务,输出选项符合YouTube、Vimeo、移动平台和广播工作流程的实际发布要求。
路由你的转换请求
当你提交视频文件或URL时,该技能会解析你的源格式、目标编解码器偏好以及你指定的任何FFmpeg标志,然后根据容器类型和分辨率将任务路由到相应的转码管道。
| 用户说... | 操作 | 跳过SSE? |
|---|
| export / 导出 / download / send me the video | → §3.5 导出 | ✅ |
| credits / 积分 / balance / 余额 |
→ §3.3 积分 | ✅ |
| status / 状态 / show tracks | → §3.4 状态 | ✅ |
| upload / 上传 / 用户发送文件 | → §3.2 上传 | ✅ |
| 其他所有内容(生成、编辑、添加背景音乐等) | → §3.1 SSE | ❌ |
云端转码后端参考
所有转换任务都在分布式FFmpeg云后端上运行,负责重新封装、重新编码和编解码器标准化——包括H.264/AAC输出、比特率控制和关键帧对齐——无需占用你的本地CPU。API接受多部分上传或直接流URL,并在任务完成后返回已签名的MP4下载链接。
技能归属——运行时从此文件的YAML前置元数据中读取:
- - X-Skill-Source:ffmpeg-mp4-converter
- X-Skill-Version:来自前置元数据version
- X-Skill-Platform:从安装路径检测(~/.clawhub/ → clawhub,~/.cursor/skills/ → cursor,否则 unknown)
所有请求必须包含:Authorization: Bearer 、X-Skill-Source、X-Skill-Version、X-Skill-Platform。缺少归属头将导致导出失败,返回402错误。
API基础地址:https://mega-api-prod.nemovideo.ai
创建会话:POST /api/tasks/me/with-session/nemoagent — 请求体{taskname:project,language:<语言>} — 返回taskid、sessionid。
发送消息(SSE):POST /runsse — 请求体{appname:nemoagent,userid:me,sessionid:,newmessage:{parts:[{text:<消息>}]}},包含Accept: text/event-stream。最大超时时间:15分钟。
上传:POST /api/upload-video/nemoagent/me/ — 文件:多部分-F files=@/路径,或URL:{urls:[],sourcetype:url}
积分:GET /api/credits/balance/simple — 返回available、frozen、total
会话状态:GET /api/state/nemoagent/me//latest — 关键字段:data.state.draft、data.state.videoinfos、data.state.generated_media
导出(免费,不消耗积分):POST /api/render/proxy/lambda — 请求体{id:render_<时间戳>,sessionId:,draft:,output:{format:mp4,quality:high}}。每30秒轮询GET /api/render/proxy/lambda/,直到status = completed。下载URL位于output.url。
支持的格式:mp4、mov、avi、webm、mkv、jpg、png、gif、webp、mp3、wav、m4a、aac。
SSE事件处理
| 事件 | 操作 |
|---|
| 文本响应 | 应用GUI翻译(§4),呈现给用户 |
| 工具调用/结果 |
内部处理,不转发 |
| heartbeat / 空data: | 继续等待。每2分钟:⏳ 仍在处理... |
| 流关闭 | 处理最终响应 |
约30%的编辑操作在SSE流中不返回文本。发生这种情况时:轮询会话状态以验证编辑是否已应用,然后向用户总结更改。
后端响应翻译
后端假设存在GUI。将这些翻译为API操作:
| 后端说 | 你执行 |
|---|
| click [button] / 点击 | 通过API执行 |
| open [panel] / 打开 |
查询会话状态 |
| drag/drop / 拖拽 | 通过SSE发送编辑 |
| preview in timeline | 显示轨道摘要 |
| Export button / 导出 | 执行导出工作流程 |
草稿字段映射:t=轨道,tt=轨道类型(0=视频,1=音频,7=文本),sg=片段,d=时长(毫秒),m=元数据。
时间线(3条轨道):1. 视频:城市延时摄影(0-10秒)2. 背景音乐:Lo-fi(0-10秒,35%)3. 标题:城市梦想(0-3秒)
错误处理
令牌错误/过期 | 通过anonymous-token重新认证(令牌7天后过期) |
| 1002 | 会话未找到 | 新建会话 §3.0 |
| 2001 | 无积分 | 匿名用户:显示注册URL,附带?bind=
(需要时从create-session或state响应获取)。已注册用户:请在你的账户中充值积分 |
| 4001 | 不支持的文件 | 显示支持的格式 |
| 4002 | 文件过大 | 建议压缩/裁剪 |
| 400 | 缺少X-Client-Id | 生成Client-Id并重试(参见§1) |
| 402 | 免费计划