A video conversion service that transforms video files into HLS streaming formats using FFmpeg. Compatible with AWS S3, Cloudflare R2, and other S3-compatible storage services.
Requires authentication. Enqueues an internal job to convert a video. If too many jobs are already processing, the request will be rejected with a 429 status code.
curl --basic -u $YOUR_API_KEY: -X POST $GRMC_SERVER/convert -H "Content-Type: application/json" -d '{ "id": "123456", "s3_video_uri": "s3://[......]", "s3_hls_dir_uri": "s3://[......]/hls/", "presets": ["hls_480p", "hls_720p"], "callback_url": "https://example.com/callback" }'
# HTTP 200 OK
# {"job_id":"f2fea87585"}
# or
# HTTP 429 Too Many RequestsRequires authentication. Returns list of jobs currently being processed.
curl --basic -u $YOUR_API_KEY: -X GET $GRMC_SERVER/status
# HTTP 200 OK
# {"running_jobs":[{"JobID":"f2fea87585","Request":{"s3_video_uri":"s3://[......]","s3_hls_dir_uri":"s3://[......]/hls/","presets":["hls_480p","hls_720p"],"id":"123456","callback_url":"https://example.com/callback"},"Status":"processing","ErrorMsg":"","StartTime":"2024-10-11T08:44:45.09950379Z"}]}Returns 200 OK if the server is running and environment variables are set.
This service supports multiple S3-compatible storage providers:
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_keyS3_ENDPOINT=https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com
AWS_ACCESS_KEY_ID=your_r2_access_key
AWS_SECRET_ACCESS_KEY=your_r2_secret_key
# AWS_REGION is optional for R2 (can be omitted or set to "auto")S3_ENDPOINT=https://your-s3-compatible-endpoint.com
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_REGION=your-region # if required by the serviceYou need to set a .env at the root of the project.
# Via docker
docker run -p 7454:7454 --env-file .env $(docker build -f Dockerfile . -q)
# Outside of docker
make && dotenv -f .env ./mediaconverter- Assuming you're using kamal to deploy
- Assuming you have a
.env.productionat the root of the project
# First time: dotenv -f ./.env.production kamal setup
dotenv -f ./.env.production kamal deployGumroad Mediaconverter is licensed under the MIT License.