A microservice for conversion of any sort of media using FFMPEG.
docker run --rm -p 8000:8000 mahyarkarimi/ffmpeg-ms:0.1.1-alpine
version: '3'
services:
api:
image: mahyarkarimi/ffmpeg-ms:0.1.1-alpine
restart: unless-stopped
ports:
- 8000:8000
volumes:
- ./.htpasswd:/app/.htpasswd
- Convert any media with given ffmpeg style output format.
- Stream output from
/convert
endpoint. - File based download from
/convert-file
endpoint. - Has rate limit for calling each endpoint based on user (default 5 requests per minute).
- Can have basic authentication based on
/app/.htpasswd
file generated by htpasswd of apache2-utils. password must be encrypted with the bcrypt algorithm.
In order to activate authentication, generate .htpasswd
file using apache2-utils
.
Install apache2-utils
on debian/ubuntu:
sudo apt-get install apache2-utils
To create user run the following command in terminal (replace <username> and <password> with your desired credentials):
htpasswd -B -cb .htpasswd <username> <password>
FFMPEG file conversion microservice API documentation
Contact information:
mahyarkarimi@rocketmail.com
License: MIT
Convert a media file (video or audio) and get response as stream
Convert a media file and return as stream
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
input_options | query | No | string | |
output_options | query | Yes | string | |
buffer_size | query | No | integer |
Code | Description |
---|---|
200 | Successful operation |
413 | file to convert is larger than upload size limit |
422 | Unprocessable entity when either file in body or action in query parameters is not available |
Convert a media file (video or audio) and get response as file
Convert a media file and return as file
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
input_options | query | No | string | |
output_options | query | Yes | string |
Code | Description |
---|---|
200 | Successful operation |
413 | file to convert is larger than upload size limit |
422 | Unprocessable entity when either file in body or action in query parameters is not available |