Giter Site home page Giter Site logo

ffmpeg-ms's Introduction

FFMPEG microservice developed in python fastapi


A microservice for conversion of any sort of media using FFMPEG.

Quick start

Deploy using docker


Dockerhub image link

docker run --rm -p 8000:8000 mahyarkarimi/ffmpeg-ms:0.1.1-alpine

Deploy with docker-compose.yml


version: '3'

services:
    api:
        image: mahyarkarimi/ffmpeg-ms:0.1.1-alpine
        restart: unless-stopped
        ports:
            - 8000:8000
        volumes:
            - ./.htpasswd:/app/.htpasswd

Features


  1. Convert any media with given ffmpeg style output format.
  2. Stream output from /convert endpoint.
  3. File based download from /convert-file endpoint.
  4. Has rate limit for calling each endpoint based on user (default 5 requests per minute).
  5. Can have basic authentication based on /app/.htpasswd file generated by htpasswd of apache2-utils. password must be encrypted with the bcrypt algorithm.

Generate .htpasswd file


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> 

API Documentation


FFMPEG file conversion microservice API documentation

Version: 0.1.1

Contact information:
[email protected]

License: MIT

/convert

POST

Summary

Convert a media file (video or audio) and get response as stream

Description

Convert a media file and return as stream

Parameters
Name Located in Description Required Schema
input_options query No string
output_options query Yes string
buffer_size query No integer
Responses
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-file

POST

Summary

Convert a media file (video or audio) and get response as file

Description

Convert a media file and return as file

Parameters
Name Located in Description Required Schema
input_options query No string
output_options query Yes string
Responses
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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.