Git Product home page Git Product logo

ffmpeg-api's Introduction

FFmpeg API

License Build Status Build Status

This is a simple HTTP server that uses FFmpeg to convert audio files from OGG format to MP3/WAV format. The server listens on port 8080 and provides an endpoint to upload OGG files and send back the converted file as a response.

Requirements

  • Rust installed on your system
  • FFmpeg installed on your system

Using the Docker image

You can use the Github Container Registry to pull the Docker image:

docker pull ghcr.io/max-lt/ffmpeg-api:latest

Then, run the container:

docker run -p 8080:8080 ghcr.io/max-lt/ffmpeg-api:latest

Installation

  1. Ensure you have Rust installed on your system. You can check the Rust installation guide for detailed instructions.

  2. Clone this repository:

    git clone https://github.com/max-lt/ffmpeg-api.git
    
  3. Change to the repository directory:

    cd ffmpeg-api
    

Usage

  1. Start the server by running:

    cargo run
    

    The server will start and listen on port 8080.

  2. To convert an OGG file, send a POST request to the /ogg-to-mp3 or /ogg-to-wav endpoint with the OGG file as the request body. The response will contain the converted file.

    For example, you can use curl to test the server:

    curl -X POST -H "Content-Type: audio/ogg" --data-binary "@sample.oga" http://localhost:8080/ogg-to-mp3 --output sample.mp3
    

    Replace sample.oga with the path to your OGG file, and sample.mp3 with the desired output file name.

License

This project is licensed under the MIT License.

ffmpeg-api's People

Contributors

max-lt avatar

Watchers

 avatar

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.