Video and image ingestion service running on RunPod Serverless with GPU acceleration.
- Transcodes video to H.265/HEVC 1080p using NVIDIA NVENC (with CPU fallback)
- Generates thumbnails and filmstrip frames
- Converts images to WebP format
- Calculates MD5 hashes
- Uses ffmpeg with CUDA hardware acceleration for decoding and encoding
| Type | Input | Description |
|---|---|---|
video |
dream_uuid, extension |
Full video ingestion pipeline |
image |
dream_uuid, extension |
Image conversion to WebP |
md5 |
dream_uuid |
MD5 hash of processed video |
filmstrip |
dream_uuid |
Generate filmstrip frames |
- Python 3.12.x
- ffmpeg
- ImageMagick (for image WebP conversion)
- NVIDIA GPU with NVENC support (optional, falls back to CPU)
brew install ffmpeg imagemagickpyenv virtualenv 3.12.2 edream_video
pyenv activate edream_videopip install -r requirements.txtgit submodule init
git submodule update --remote
pip install -e python-apicp .env.example .env
# Edit .env with your BACKEND_URL and BACKEND_API_KEYpython handler.py --test_input test_input.jsonEdit test_input.json with a real dream_uuid to test.
docker build --platform linux/amd64 -t dream-ingestion .docker run --platform linux/amd64 \
-e BACKEND_URL=<backend-url> \
-e BACKEND_API_KEY=<backend-apikey> \
dream-ingestion \
python3 -u /app/handler.py --test_input /app/test_input.jsondocker run --gpus all \
-e BACKEND_URL=<backend-url> \
-e BACKEND_API_KEY=<backend-apikey> \
dream-ingestion