πŸ–ΌοΈ

Video Compress for Zalo

Compress videos to meet Zalo's file size limit (25MB) while maintaining quality.

Image ⭐ Beginner ⏱️ 5 minutes

😫 The Pain Point

Zalo limits video attachments to 25MB. Your phone recorded a 100MB video. You need to compress it without making it unwatchable.

πŸš€ Agentic Solution

A Smart Video Compressor that targets a specific file size.

Key Features:

  • Target Size: Specify β€œunder 25MB” and the script calculates optimal bitrate.
  • Quality Presets: Fast, Balanced, High Quality.
  • Batch Mode: Compress multiple videos at once.

βš”οΈ Phase 1: Commander (Quick Fix)

For quick compression.

Prompt:

β€œI have a video party.mp4 (100MB). Write a Python script using FFmpeg to:

  1. Target Size: Compress to under 25MB.
  2. Calculate Bitrate: Based on duration and target size.
  3. Maintain Audio: Keep audio at 128kbps.
  4. Output: Save as party_compressed.mp4.

Print progress. Handle FFmpeg errors gracefully.”

Result: Shareable video that fits Zalo’s limit.

πŸ—οΈ Phase 2: Architect (Permanent Tool)

Engineering Prompt:

**Role:** Python Tool Developer
**Task:** Create a "Video Compressor for Social Media".

**Requirements:**
1.  **GUI:**
    *   Select video or folder.
    *   Target size input (MB).
    *   Quality preset dropdown.
    *   Resolution option (keep/720p/480p).
    *   Progress bar with ETA.

2.  **Logic:**
    *   Calculate video bitrate: (target_size * 8) / duration - audio_bitrate.
    *   Two-pass encoding for better quality.
    *   Fallback to lower resolution if bitrate too low.

3.  **Deliverables:**
    *   `video_compress.py`
    *   `run.bat`, `run.sh`
    *   `requirements.txt`

🧠 Prompt Decoding

  • Two-pass encoding: First pass analyzes the video, second pass optimizes compression. Better quality at same file size.

πŸ› οΈ Instructions

  1. Install FFmpeg.
  2. Copy Prompt β†’ Run.

Related Workflows

Explore other categories

πŸ“¬

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

πŸ“– Free eBook Guide πŸ“¦ 7 Ready-to-use Scripts πŸ”” Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.