1.3 KiB
1.3 KiB
atranscoder-rpc
Audio transcoder with simple HTTP API. Work in progress.
What works
Transcoding:
cargo run
- 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"'
- 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.It's better to not panic. Current error handling seems ok for now.- 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
(ifContent-Type: application/json
then conversion was not successful and body contains an error info). - Remove transcoding result after uploading it to the
uploadUrl
. - Docker image for
amd64
andaarch64
. Statically linked binary for Docker image & result docker image based onNot yet, see Dockerfile.scratch.scratch
(reduce image size).- Tests!