# Docker FFmpeg Setup - Quick Start

## TL;DR

No installation needed! Just have Docker running:

```bash
# Check Docker is installed
docker --version

# Start Docker service (if not running)
sudo systemctl start docker

# That's it! ✓
```

## Why Docker?

✅ **No system installation** - FFmpeg runs in a container  
✅ **No PATH modifications** - No environment variables to set  
✅ **Ubuntu-friendly** - Works out of the box with docker-compose  
✅ **Isolated** - Doesn't affect system dependencies  
✅ **Automatic** - First use downloads the image automatically  

## Installation (if Docker not installed)

### Ubuntu/Debian
```bash
# One-line install
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

# Add current user to docker group (no more sudo needed)
sudo usermod -aG docker $USER
newgrp docker

# Verify installed
docker --version
sudo systemctl status docker
```

### Quick Test
```bash
# This will download FFmpeg image (~300MB on first run)
docker run --rm jrottenberg/ffmpeg:latest -version

# Should show FFmpeg version
```

## Start Using

Once Docker is running, video conversion will automatically work:

1. Upload AVI video (via chunked upload)
2. Chunks merge
3. Docker container starts with FFmpeg
4. AVI → MP4 conversion happens
5. MP4 saved to database
6. All automatic! 🎉

## Verify It's Working

Check logs while uploading:
```bash
# Terminal 1: Watch Docker activity
docker ps -a

# Terminal 2: Watch Laravel logs
tail -f storage/logs/laravel.log | grep -i "docker\|conversion"
```

## That's All!

No FFmpeg installation.
No PATH variables.
No system dependencies.
Just Docker. 🐳
