A video transcoding service built with Rails that leverages NVIDIA CUDA hardware acceleration to transcode videos to multiple quality levels. The service processes videos asynchronously using background jobs and stores outputs to cloud storage.
- Ruby 3.4.7
- FFmpeg with CUDA support
- NVIDIA GPU with NVENC/NVDEC support
- Docker & Docker Compose
-
Clone the repository
git clone <repository-url> cd media
-
Install dependencies
bundle install
-
Start services and setup database
docker-compose up -d bin/rails db:create bin/rails db:prepare bin/rails data:migrate
-
Start the application
bin/dev
-
Access the application
- API: http://localhost:3009
- Sidekiq UI: http://localhost:3009/sidekiq
- GPU-Accelerated Transcoding - NVIDIA CUDA hardware encoding/decoding
- Multiple Quality Profiles - Automatic transcoding to 480p, 720p, and 1080p
- AV1 Encoding - Modern AV1 codec with hardware acceleration
- Asynchronous Processing - Background job processing with Sidekiq
- Cloud Storage - S3 and IBM Cloud Object Storage integration
This service requires an NVIDIA GPU with AV1 NVENC support (RTX 40 series or newer). See the NVIDIA Video Encode and Decode GPU Support Matrix for compatible hardware.
FFmpeg is compiled from source with CUDA support. To build the FFmpeg image locally:
docker build -f utils/ffmpeg/Dockerfile -t ffmpeg-cuda:latest .bundle exec rspecApache License 2.0