# Dionysis Media Video **Version:** `v0.1.0` A small Flask web app that combines a still image with an audio file into a YouTube-ready MP4 video. ## Features - Upload an image (PNG/JPG/WebP/etc.) and an audio file (MP3/WAV/etc.). - Background worker queue processes jobs one at a time. - Queue shows status: Waiting, Processing, Complete, or Error. - Download completed videos from the queue. - Click an Error status to see the traceback and retry (move to end of queue). - Delete queued jobs unless they are currently processing. ## Tech Stack - Python 3.12 + Flask + Gunicorn - SQLite for the queue - ffmpeg + Pillow for video encoding - Docker / Portainer deployment ## Environment Variables | Variable | Description | Default | |----------|-------------|---------| | `APP_SECRET_KEY` | Flask secret key | generated at startup | | `ADMIN_PASSWORD` | Plain password for `/admin` | none (when unset, login is disabled and the app is open) | | `PUBLIC_BASE_URL` | External URL for download links | `http://localhost:5000` | | `INTERNAL_PORT` | Port Gunicorn listens on | `5000` | | `DATABASE` | SQLite path | `/app/data/app.db` | | `UPLOAD_FOLDER` | Raw uploads directory | `/app/uploads` | | `OUTPUT_FOLDER` | Completed videos directory | `/app/outputs` | ## Local Development ```bash cd ~/workspace/dionysis-media-video python3 -m venv venv source venv/bin/activate pip install -r requirements.txt python init_db.py flask --app app run ``` Open http://localhost:5000. ## Deployment Build and run with Docker: ```bash docker compose up --build -d ``` For Portainer, use the repository stack URL: ``` https://gitlab.hallsworth.ca/yrtria/dionysis-media-video.git ``` Branch: `main`, Compose path: `docker-compose.yml`. Then run once inside the container: ```bash python init_db.py ``` ## Output Format Videos are encoded as **1080p 30fps MP4** using H.264 + AAC with `faststart` enabled so they are ready for upload to YouTube.