Video Compressor — Offline Version
=================================
Use it without internet. Your videos never leave your computer.

If reading on screen is easier, double-click HOW-TO-USE.html —
it is the same guide, in your browser.

OTHER LANGUAGES
---------------
These instructions are also available in:
  Spanish    HOW-TO-USE-es.html
  Portuguese HOW-TO-USE-pt.html
  French     HOW-TO-USE-fr.html
  German     HOW-TO-USE-de.html
  Chinese    HOW-TO-USE-zh.html
  Arabic     HOW-TO-USE-ar.html

WHAT'S IN THIS FOLDER
----------------------
  index.html          The tool itself. This is the file you open.
  HOW-TO-USE.html     These instructions, nicer to read.
  engine/             The video engine (about 31 MB). Do not delete it.
  start-offline.bat   Windows launcher — double-click this.
  start-offline.sh    Mac launcher — double-click this.
  offline-server.ps1  Used by the Windows launcher. Do not open it yourself.
  README.txt          This file.

BEFORE YOU START
----------------
- You need a modern browser: Chrome, Edge, Firefox, or Safari.
- Unzip first. On Windows, right-click the .zip file and choose
  "Extract All". On Mac, double-click the .zip file. You must see
  a folder with index.html inside. Do not open the file while it
  is still inside the zip — it will not work.

THE EASIEST WAY — FIREFOX
--------------------------
1. Unzip the package (see above).
2. Open the folder and double-click index.html.
3. Firefox opens the tool. That is it — no internet needed.

FOR CHROME OR EDGE — USE THE LAUNCHER
--------------------------------------
Why: Chrome blocks a page opened straight from a file from
loading other files on your disk. That is a Chrome safety rule,
not a problem with this tool. The launcher gets around it by
running a tiny server on your own computer.
1. Unzip the package (see above).
2. Windows: double-click start-offline.bat.
   Mac: double-click start-offline.sh. If it opens in a text
   editor instead, right-click it, choose "Open With", then
   "Terminal".
3. A window opens and stays open, and your browser opens the
   tool at http://localhost:8000
   (On Windows the launcher uses Python if you have it, otherwise
   the built-in Windows server. Nothing is installed, and your
   videos never go online.)
4. When you are done, close that window. On Mac, press Ctrl+C
   in the Terminal window.

HOW TO COMPRESS A VIDEO (once the tool is open)
-----------------------------------------------
1. Drag a video file onto the box, or click the box to pick one.
   Biggest file allowed: 500 MB.
2. Pick what you want:
   - "By quality": "Balanced" is a good default for most sharing.
     "High quality" keeps more detail. "Small file" makes the
     smallest file.
   - "By target size": type how many MB you want (for example
     25 for email, 16 for WhatsApp, 20 for Discord), or tap one
     of the quick values: 8 / 16 / 20 / 25.
3. Optional: set "Max width" to 1280px or 854px for a much
   smaller file. (480px is there too if you need it really small.)
4. Click "Compress Video". The first time takes a while — the
   engine loads once (it is already on your disk, about 30 MB).
5. When it says Done, click Download. The file saves as
   yourname-compressed.mp4.
6. Several videos? Select up to 5 at once. They compress one
   after another, and each one gets its own Download link.

IF SOMETHING DOESN'T WORK
--------------------------
- The page is blank, or nothing happens when you click Compress:
  You probably opened index.html from inside the zip, or in
  Chrome without the launcher. Unzip first, then use the
  launcher (Chrome / Edge) or Firefox.
- The black window closed right away (Windows):
  Double-click start-offline.bat again and read what it says.
  It tries Python first, then the built-in Windows server.
- "Port 8000 is already in use":
  The launcher tries 8000, then 8001, then 8002 by itself.
  If all three are busy, close another program that is using
  them and try again.
- Compressing takes very long:
  This is normal for big files. A 100 MB clip takes about
  1–3 minutes. Phones and old laptops are slower. Keep the
  tab open until it says Done.
- The video is out of sync after compressing:
  Tick "Fix audio sync (constant frame rate)" and compress again.
- My subtitles disappeared:
  Tick "Keep subtitles and extra audio tracks" before you
  compress. (It is off by default.)
- The file is still too big:
  Use "By target size" and set a smaller number, or set
  "Max width" to 854px or 480px and "Small file" quality.
- Still stuck?
  The online version is at https://dearhua.com/tools/video-compressor/
  (needs internet). The tool is free, with no account and no
  watermark, online or offline.
