portrait-resizer

Convert horizontal videos into 9:16 portrait formats using FFmpeg and OpenCV.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/akrindev/trimer-clip --skill portrait-resizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: portrait-resizer
Source: https://github.com/akrindev/trimer-clip/tree/main/skills/portrait-resizer
Command: npx skills add https://github.com/akrindev/trimer-clip --skill portrait-resizer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires opencv-python, mediapipe, and includes scripts (resource) components.

What problem does it solve?

Converts horizontal videos into vertical 9:16 formats while preserving important content and subject focus through smart cropping.

Core Features & Use Cases

  • Smart Crop: prioritizes faces and key elements to keep subjects centered.
  • Multiple Cropping Modes: smart, center, and letterbox to suit different content styles.
  • Batch Processing: resize many videos in a folder for quick workflows.

Quick Start

Run the portrait-resizer script on a video to generate a 9:16 portrait clip.

Frequently Asked Questions about portrait-resizer

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

FAQPage Schema
How do I convert horizontal videos to 9:16 portrait format for TikTok and Reels?

Convert horizontal videos to 9:16 portrait format by using smart cropping that prioritizes faces and key elements, powered by FFmpeg and OpenCV encoding.

What is smart crop for vertical video and how does face detection work?

Smart crop for vertical video uses MediaPipe face detection to identify subjects and dynamically adjust the framing, ensuring faces and key elements remain centered in the 9:16 output.

What's the best way to batch resize multiple videos to vertical 9:16 clips?

The best way to batch resize multiple videos is using a script that processes an entire folder, applying smart, center, or letterbox cropping modes to generate 9:16 clips automatically.

Does this smart crop tool work with OpenCV and MediaPipe for facial detection?

Yes, the tool works with OpenCV for image processing and MediaPipe for face-detection-based focus, utilizing FFmpeg for the final video encoding when available.

What are the different cropping modes for converting horizontal video to vertical?

The available cropping modes for converting horizontal video to vertical are smart, center, and letterbox, allowing you to choose between facial detection focus, static centering, or pillarboxed framing.