Audio transcoder with simple HTTP API written with Rust & Axum & FFmpeg.
Go to file
2024-05-26 14:28:42 +03:00
src cleanup for old files 2024-05-26 14:28:42 +03:00
.dockerignore initial Dockerfile (works, but image is BIG) 2024-05-25 22:34:06 +03:00
.editorconfig initial commit 2024-05-24 23:44:26 +03:00
.gitignore initial commit 2024-05-24 23:44:26 +03:00
Cargo.toml good, but totally useless new Dockerfile 2024-05-26 13:56:00 +03:00
Dockerfile initial Dockerfile (works, but image is BIG) 2024-05-25 22:34:06 +03:00
Dockerfile.scratch good, but totally useless new Dockerfile 2024-05-26 13:56:00 +03:00
LICENSE.md initial commit 2024-05-24 23:44:26 +03:00
README.md cleanup for old files 2024-05-26 14:28:42 +03:00

atranscoder-rpc

Audio transcoder with simple HTTP API. Work in progress.

What works

Transcoding:

  1. cargo run
  2. Upload file for transcoding:
curl --location 'http://localhost:8090/enqueue' \
    --form 'file=@"/home/user/Music/test.mp3"' \
    --form 'format="adts"' \
    --form 'codec="aac"' \
    --form 'bitRate="64000"' \
    --form 'maxBitRate="64000"' \
    --form 'sampleRate="8000"' \
    --form 'channelLayout="mono"' \
    --form 'uploadUrl="http://127.0.0.1:8909/upload"'
  1. You will receive JSON response with job ID. The transcoding result will be saved into /tmp/{job_id}.out.atranscoder

Roadmap

  • Restart threads in case of panic.
  • Implement somewhat acceptable error handling.
  • Remove old conversion results and input files that are older than 1 hour.
  • Remove input file after transcoding it.
  • Implement file upload to uploadUrl (if Content-Type: application/json then conversion was not successful and body contains an error info).
  • Remove transcoding result after uploading it to the uploadUrl.
  • (Optional) Make uploadUrl optional and allow the client to download the file on-demand.
  • Docker image for amd64 and aarch64.
  • Statically linked binary for Docker image & result docker image based on scratch (reduce image size). Not yet, see Dockerfile.scratch.
  • Tests!