---
license: other
license_name: salman-alfarisi-proprietary-license-v1.0
license_link: LICENSE
---
---
# ๐ฌ Free Video Converter (Gradio + FFmpeg)
A lightweight Gradio web app to convert **video โ video** and **video/audio โ audio** locally using FFmpeg.
Upload a file, pick a target format, watch the progress pop-up, then download the resultโfast and simple.
---
## ๐ Table of Contents
1. [Features](#features)
2. [Project Structure](#project-structure)
3. [Prerequisites](#prerequisites)
4. [Installation](#installation)
5. [Running Locally](#running-locally)
6. [Usage](#usage)
7. [Settings (CRF & Preset)](#settings-crf--preset)
8. [Deploy to Hugging Face](#deploy-to-hugging-face)
9. [Troubleshooting](#troubleshooting)
10. [Contributing](#contributing)
11. [License](#license)
12. [Author & Credits](#author--credits)
---
## โจ Features
* **Many Formats, One Click**
* **Video targets:** `mp4`, `avi`, `flv`, `mov`, `wmv`, `mkv`, `webm`
* **Audio targets:** `mp3`, `wav`, `flac`, `ogg`, `m4a`, `aac`, `wma`
* **Smart Targeting**
Input format is automatically hidden from the target list; defaults to **mp4** (video) or **mp3** (audio).
* **Language Switcher (๐ฎ๐ฉ / ๐บ๐ธ)**
Toggle Indonesian/English texts on the fly.
* **Progress Pop-up & UI Lock**
A โConvertingโฆ please wait.โ modal appears, and all controls are disabled until the job is done.
* **One-click Download**
A green **Download result** button appears once conversion finishes.
* **CPU-friendly**
Optimized defaults for 2 vCPU (e.g., Hugging Face Spaces), with Gradio queue limits pre-tuned.
* **Local / Offline**
Runs entirely on your machine/Space; no third-party upload.
---
## ๐ Project Structure
```
videoconverter/
โโโ videoconverter.py # Gradio app (ID/EN, progress modal, downloader)
โโโ requirements.txt # Python deps (e.g., gradio)
โโโ apt.txt # System deps for Spaces (ffmpeg)
โโโ LICENSE # "All Rights Reserved"
โโโ README.md
โโโ .gitignore
```
> **Note:** The app expects `ffmpeg` to be available on the system (also installs via `apt.txt` on Spaces).
---
## โ๏ธ Prerequisites
* **Python 3.10+**
* **FFmpeg** (includes `ffmpeg` and `ffprobe`)
* `git` & a terminal
Install FFmpeg locally:
**Ubuntu/Debian**
```bash
sudo apt update && sudo apt install -y ffmpeg
```
**macOS (Homebrew)**
```bash
brew install ffmpeg
```
**Windows (winget)**
```powershell
winget install Gyan.FFmpeg
```
---
## ๐ง Installation
1. Clone this repository:
```bash
git clone https://github.com/salmanalfarisi11/video-converter.git
cd video-converter
```
2. Create and activate a virtual environment:
```bash
python -m venv .venv
# Linux/macOS
source .venv/bin/activate
# Windows
.venv\Scripts\activate
```
3. Install Python dependencies:
```bash
pip install -r requirements.txt
```
---
## ๐ Running Locally
Start the app:
```bash
python videoconverter.py
```
* Default URL: [http://127.0.0.1:7860](http://127.0.0.1:7860)
* Want a temporary public link? Set `share=True` in `demo.launch(...)`.
---
## ๐ฏ Usage
1. **Upload** a video or audio file.
2. **Choose a target** format (to video / to audio).
3. (Optional) Set **CRF** and **Ultra fast preset**.
4. Click **Convert**. A modal โConvertingโฆโ appears and the UI is locked.
5. When done, click the **Download result** button to save your file.
---
## โ๏ธ Settings (CRF & Preset)
* **CRF H.264 (lower = better quality)**
* Applies to H.264 outputs (e.g., **mp4**, **mov**).
* Typical range: **18โ28**.
* **Lower CRF โ higher quality & bigger file**, conversion a bit slower.
* **Higher CRF โ smaller file**, conversion faster.
* **Ultra fast preset (ultrafast)**
* Uses `-preset ultrafast` for **libx264** to speed up CPU encoding at the cost of larger files.
* Uncheck it if you prefer better compression (smaller size) with **slower** conversion.
---
## โ๏ธ Deploy to Hugging Face
1. Create a **New Space** โ **Gradio** โ (Public or Private).
2. Upload these files:
* `videoconverter.py`
* `requirements.txt` (e.g., `gradio==5.32.1`)
* `apt.txt` with:
```
ffmpeg
```
* `README.md`, `LICENSE`, `.gitignore` (optional but recommended)
3. In **README.md**, you can add HF metadata front-matter (optional):
```yaml
---
title: Free Video Converter
emoji: ๐ฌ
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 5.32.1
app_file: videoconverter.py
license: other # proprietary
pinned: false
---
```
The Space will build and run automatically.
---
## ๐ ๏ธ Troubleshooting
* **โFFmpeg not foundโ**
Ensure `ffmpeg` is installed and on your PATH (`ffmpeg -version`). On Spaces, keep `ffmpeg` inside `apt.txt`.
* **Conversion is slow**
* Enable **Ultra fast preset**.
* Use a **higher CRF** for H.264.
* Prefer **mp4**/**mp3** which are typically faster on CPU.
* **Out of storage** (Spaces with small disks)
* Delete large outputs frequently.
* Reduce file sizes using higher CRF or lower bitrates.
---
## ๐ค Contributing
Bug reports, suggestions, or PRs are welcome (even though the code is proprietary, you can propose changes via issues/patches if the repo is public).
---
## ๐ License
**All Rights Reserved** โ see [LICENSE](LICENSE).
You may **not** copy, modify, redistribute, or use this software without explicit permission from the copyright holder.
---
## ๐๏ธ Author & Credits
Developed by **[Salman Alfarisi](https://github.com/salmanalfarisi11)** ยฉ 2025
* GitHub: [salmanalfarisi11](https://github.com/salmanalfarisi11)
* LinkedIn: [salmanalfarisi11](https://linkedin.com/in/salmanalfarisi11)
* Instagram: [faris.salman111](https://instagram.com/faris.salman111)
Built with โค๏ธ using **Gradio** and **FFmpeg**.
If this project helps you, please โญ the repo!