The 10MB Discord Limit Drove Me to Build a Self-Hosted GPU Video Compressor

Self-Hosting

Frustrated by Discord's 10MB video upload limit? Discover 8mb.local, a self-hosted GPU-accelerated video compressor to effortlessly resize clips for sharing.

Jason Selsley Developer and homelab enthusiast who builds open-source tools to solve real-world problems. Creator of 8mb.local, the self-hosted GPU video compressor. Senior Enterprise Technology Integration major at Penn State

Website

LinkedIn

• November 12, 2025

• 4 min read


Anyone who's tried to share a video on Discord has likely encountered the frustrating 10MB upload limit. This often leads to a tedious cycle of using tools like HandBrake, experimenting with presets and bitrates, and repeatedly checking file sizes, or struggling to recall precise ffmpeg commands. This common challenge motivated me to create a streamlined solution, which I believe the broader self-hosting community will also find valuable.

My solution is 8mb.local, a "fire-and-forget" self-hosted video compressor designed to tackle this very issue. It's packaged as a single Docker container, featuring a clean SvelteKit web UI, a FastAPI backend, and a Celery worker queue. Users simply drag and drop their video files, select a desired target size (e.g., 8MB, 25MB, or 50MB), and the system handles the rest.

What is 8mb.local?

The core aim of 8mb.local is to deliver simple, fast, and intelligent video compression. More than just an ffmpeg wrapper, it's a comprehensive web UI optimized for homelab environments and built for out-of-the-box compatibility with diverse system configurations.

Its key feature is the automatic detection and utilization of your GPU for significantly faster encoding.

  • Multi-Vendor GPU Support: Automatically detects and utilizes NVIDIA (NVENC), Intel (QSV), and AMD (VAAPI) hardware acceleration for optimal speed.
  • Automatic CPU Fallback: Seamlessly reverts to CPU encoding (using libx264, libx265, libaom-av1) if a compatible GPU is unavailable or drivers are missing, ensuring all jobs complete.
  • Target-Size-First Approach: The user interface prioritizes target file size over complex bitrate calculations, handling the underlying math automatically.
  • Smart Auto-Retry Mechanism: If the initial compression pass doesn't precisely hit the target size (e.g., it's slightly over), the system automatically performs a second pass with an adjusted bitrate to achieve accuracy.
  • Modern User Interface: Offers a live queue, real-time progress bars, and streaming FFmpeg logs directly within the browser, powered by Server-Sent Events (SSE). It also supports running multiple compression jobs concurrently.

This tool fulfills a long-standing need for a "set it and forget it" service within my homelab, making video compression accessible to anyone in my family or team without requiring knowledge of video codecs.

How to Install 8mb.local with Docker

Installation is straightforward. The complete application stack—including the frontend, backend, worker, and Redis broker—is consolidated into a single Docker image. Users simply select the appropriate docker-compose.yml configuration for their specific hardware.

1. CPU-Only (Works Everywhere)

This is the simplest setup and works on any machine (Windows, macOS, Linux).

services:
  8mblocal:
    image: jms1717/8mblocal:latest
    container_name: 8mblocal
    ports:
      - "8001:8001"
    volumes:
      - ./uploads:/app/uploads
      - ./outputs:/app/outputs
    restart: unless-stopped

2. NVIDIA GPU (NVENC)

This setup is recommended for maximum performance, utilizing the deploy key to grant the container access to your NVIDIA GPU. Critically, you must add the NVIDIA_DRIVER_CAPABILITIES environment variable. This instructs the NVIDIA Container Toolkit to mount the video encoding libraries, not just the compute libraries.

services:
  8mblocal:
    image: jms1717/8mblocal:latest
    container_name: 8mblocal
    ports:
      - "8001:8001"
    volumes:
      - ./uploads:/app/uploads
      - ./outputs:/app/outputs
    restart: unless-stopped
    environment:
      # REQUIRED for NVENC
      - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility  
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

3. Intel/AMD GPU (VAAPI - Linux Only)

On a Linux host with an Intel iGPU (QSV) or an AMD GPU (VAAPI), hardware acceleration can be enabled by passing through the /dev/dri device.

services:
  8mblocal:
    image: jms1717/8mblocal:latest
    container_name: 8mblocal
    ports:
      - "8001:8001"
    volumes:
      - ./uploads:/app/uploads
      - ./outputs:/app/outputs
    devices:
      - /dev/dri:/dev/dri # Pass through the GPU
    restart: unless-stopped

⚠️ A Common Pitfall (and How to Fix It)

Having navigated common troubleshooting scenarios, I'm highlighting one of the most frequent issues encountered by self-hosters to save you time and effort.

"My progress bar is stuck at 0% until it's done!"

This is almost always a reverse proxy buffering problem. 8mb.local uses Server-Sent Events (SSE) to stream real-time progress. If you place it behind Nginx, Nginx Proxy Manager, or Traefik, the proxy might buffer the entire response instead of streaming it.

The Fix:

You need to disable buffering for the SSE endpoint.

For Nginx / Nginx Proxy Manager, add this to your advanced configuration:

location /api/stream/ {
    proxy_pass http://YOUR_8MBLOCAL_IP:8001;
    proxy_buffering off;              # REQUIRED
    proxy_cache off;
    proxy_set_header Connection '';
    chunked_transfer_encoding on;
}

Applying this fix ensures you receive smooth, real-time progress updates.

Example of what it should look like

Final Thoughts

This project marks my first significant open-source endeavor. Conceived from personal frustration, I'm delighted to contribute back to the vibrant self-hosting and homelab communities from which I've learned so much. It has been an invaluable learning experience, and I'm eager to see if others find 8mb.local as beneficial as I have. Ditch the struggles with HandBrake presets; give 8mb.local a try, explore the project on GitHub, and share your feedback.

Jason Selsley Developer and homelab enthusiast who builds open-source tools to solve real-world problems. Creator of 8mb.local, the self-hosted GPU video compressor. Senior Enterprise Technology Integration major at Penn State

Website

LinkedIn