🖼️

Nén Video gửi Zalo/Messenger

Nén video xuống dưới 100MB (hoặc 25MB) để gửi qua mạng xã hội mà không bị chặn.

Image ⭐⭐ Intermediate ⏱️ 5 phút

😫 Vấn đề (The Pain Point)

Bạn muốn gửi video quay con cái (4K, 500MB) qua Zalo cho ông bà, hoặc gửi demo cho khách. Zalo báo “File quá lớn” (Giới hạn 1GB hoặc load rất lâu).

🚀 Giải pháp Agentic (The Solution)

Tool tính toán Bitrate thông minh để nén video về đúng dung lượng mục tiêu nhưng giữ chất lượng tốt nhất có thể.

Tính năng:

  • Target Size Mode: “Tôi muốn video này còn đúng 24MB” (để gửi Email/Discord).
  • H.264/H.265: Hỗ trợ chuẩn nén hiện đại.
  • Audio Compress: Nén cả âm thanh để tiết kiệm chỗ.

Video Compress Screenshot

🤖 Engineering Prompt (Copy & Paste)

**Role:** Python Media Developer

**Task:** Create a "Video Size Compressor" GUI wrapper for FFmpeg.

**Requirements:**
1.  **Tech Stack:** Python, `tkinter`, `ffmpeg-python` (or `subprocess` calling ffmpeg). *Note: User needs FFmpeg installed, try to auto-detect or bundle portable ffmpeg if possible, but for simplicity assume installed or guide them.*
2.  **GUI:**
    *   Input Video selection.
    *   "Target Size (MB)" input (Default: 25MB for Email/Discord, 100MB for Zalo).
    *   "Compress" button.
3.  **Logic:**
    *   Get video duration.
    *   Calculate required Bitrate = (Target Size / Duration).
    *   Run FFmpeg command with calculated bitrate (Two-pass encoding recommended for quality, but single pass is faster).
    *   Command: `ffmpeg -i input -b:v [calc_bitrate] -bufsize [calc_bitrate] output.mp4`
    *   Show progress.
4.  **Deliverables:**
    *   `video_compress.py`
    *   `run.bat`
    *   `requirements.txt`

**Context:** Users needing to adhere to file size limits of transfer platforms.

🧠 Giải mã Prompt

  • Bitrate Calculation: Bí mật của việc nén video theo dung lượng nằm ở công thức toán học: Dung lượng = Thời lượng * Bitrate. Tool sẽ giải bài toán ngược: Biết dung lượng và thời lượng, tính ra Bitrate cần thiết.

🛠️ Hướng dẫn

  1. Cài đặt FFmpeg (Ebook có hướng dẫn riêng).
  2. Copy Prompt -> Paste -> Chạy run.bat.
  3. Chọn Video -> Nhập 50MB -> Compress.

Workflows liên quan

Khám phá danh mục khác

📬

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.