ffmpeg

Convert, resize, compress, and trim video and audio files using FFmpeg commands.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/X-manist/Cohmira --skill ffmpeg-x-manist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ffmpeg
Source: https://github.com/X-manist/Cohmira/tree/main/src/builtin-plugins/openmontage/.agents/skills/ffmpeg
Command: npx skills add https://github.com/X-manist/Cohmira --skill ffmpeg-x-manist

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Preparing video and audio assets for web playback, Remotion compositions, and social platform uploads requires many precise FFmpeg commands, and getting flags wrong causes broken playback, sync issues, or oversized files. ## Core Features & Use Cases - Format Conversion & Compression: Convert GIF to MP4, transcode audio formats, and compress video with CRF and preset controls. - Editing Operations: Trim, concatenate, speed up or slow down footage, add fades, and extract audio tracks. - Platform-Ready Exports: Generate optimized outputs for YouTube, Twitter/X, LinkedIn, and web embeds with correct resolution, bitrate, and faststart flags. - Use Case: You recorded a 60-second product demo that must fit a 20-second Remotion scene. Use this Skill to compute the speed factor, apply setpts and atempo filters, and produce a Remotion-ready 1080p MP4. ## Quick Start Use the ffmpeg skill to convert my screen recording into a 1080p 30fps MP4 optimized for Remotion.

Frequently Asked Questions about ffmpeg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a GIF to MP4 for web playback?

Use ffmpeg with -movflags faststart, -pix_fmt yuv420p, and a scale filter forcing even dimensions: ffmpeg -i input.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4. This ensures browser compatibility and valid codec dimensions.

How to speed up a video with FFmpeg without losing audio sync?

Use filter_complex combining setpts for video and atempo for audio, for example setpts=0.5*PTS with atempo=2.0 for 2x speed. For speeds above 2x, chain multiple atempo filters since each is limited to the 0.5-2.0 range.

Should I use FFmpeg or Remotion playbackRate to change video speed?

Use Remotion playbackRate for simple constant speeds, but use FFmpeg preprocessing for extreme speeds above 4x, variable speed changes, or when fitting a demo to exact voiceover timing. Remotion playbackRate must be constant and cannot interpolate over frames.

Why does FFmpeg fail with height not divisible by 2?

The H.264 codec requires even width and height dimensions, so odd input resolutions cause this error. Fix it by adding a scale filter: -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" to round dimensions down to even values.

What CRF value should I use when compressing video with libx264?

CRF 23 is the default for general use; use 18 for archive masters, 20-22 for production, 23-25 for web delivery, and 28 or higher for quick drafts. Lower CRF means better quality and larger files.

What are Twitter video requirements for FFmpeg export?

Twitter limits videos to 140 seconds, 512MB, and 1920x1200 resolution. Export with libx264 at CRF 24, scale to at most 1280x720, AAC audio at 128k and 44.1kHz, and add -movflags +faststart for reliable upload and playback.