optimize-video

Transcode videos to H.264 MP4 with AAC audio and faststart for web playback.

Updated Nov 4, 2025
One-click install
npx skills add https://github.com/chasemccoy/scripts --skill optimize-video
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize-video
Source: https://github.com/chasemccoy/scripts/tree/main/skills/optimize-video
Command: npx skills add https://github.com/chasemccoy/scripts --skill optimize-video

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ffmpeg.

What problem does it solve?

Transcodes and compresses videos for web playback.

Core Features & Use Cases

  • Transcodes to H.264 video with AAC audio and enables faststart for streaming.
  • Applies web-optimized encoding settings to balance quality and file size across delivery scenarios such as websites and social media.
  • Use Case: Prepare batches of videos for website embedding or social media with minimal manual setup.

Quick Start

Run the optimize.sh script with input and output file paths to produce a web-optimized MP4.

Frequently Asked Questions about optimize-video

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

FAQPage Schema
How do I compress video for web playback using ffmpeg?

Compress video for web playback by transcoding with ffmpeg using libx264 and AAC audio, applying CRF control and faststart to produce streaming-ready MP4 output. This balances quality and file size for website embedding and social media.

What is faststart in H.264 encoding and when do I need it?

Faststart is an ffmpeg flag that moves the MP4 metadata to the beginning of the file, enabling progressive streaming playback over HTTP. You need it when preparing videos for web delivery so browsers can start playback before downloading the entire file.

Do I need ffmpeg installed to transcode videos for websites?

Yes, ffmpeg is the required dependency to transcode and compress videos for websites. The optimization process runs through ffmpeg with libx264 video encoding and AAC audio settings to generate web-optimized MP4 files.

What's the best way to batch optimize videos for social media?

Batch optimize videos for social media by running the transcoding script with input and output paths for each file. Applying web-optimized encoding settings with libx264, AAC audio, and faststart ensures minimal manual setup across delivery scenarios.

Can I control video quality and file size balance with CRF in ffmpeg?

CRF in ffmpeg controls the constant rate factor to balance video quality and file size during web optimization. Lower CRF values yield higher quality with larger files, while higher values compress more aggressively for web playback.