Compare commits

..

No commits in common. "c8c2528fc20a35205e7e77a7d0ee71d030962680" and "03295580e3c0c4d5591c25d351ca4af01cbb9fb2" have entirely different histories.

2 changed files with 3 additions and 5 deletions

View File

@ -51,14 +51,12 @@ Mandatory fields:
- `sample_rate` - `sample_rate`
- `url` (for `/enqueue_url`) - `url` (for `/enqueue_url`)
# Configuration You can change configuration using this environment variables:
You can change configuration using these environment variables:
- `LISTEN` - change this environment variable to change TCP listen address. Default is `0.0.0.0:8090`. - `LISTEN` - change this environment variable to change TCP listen address. Default is `0.0.0.0:8090`.
- `NUM_WORKERS` - can be used to change how many threads will be used to transcode incoming files. Default is equal to logical CPUs. - `NUM_WORKERS` - can be used to change how many threads will be used to transcode incoming files. Default is equal to logical CPUs.
- `TEMP_DIR` - this can be used to change which directory should be used to store incoming downloads and transcoding results. Useful if you want to use a Docker volume for this. Default is system temp directory (`/tmp` for Linux). - `TEMP_DIR` - this can be used to change which directory should be used to store incoming downloads and transcoding results. Useful if you want to use a Docker volume for this. Default is system temp directory (`/tmp` for Linux).
- `LOG_LEVEL` - changes log verbosity, default is `info`. - `LOG_LEVEL` - changes log verbosity, default is `info`.
- `MAX_BODY_SIZE` - changes max body size for `/enqueue` and max file size for `/enqueue_url`. Default is 1GB (`file` in `/enqueue` request has an upper limit of `1GiB`). - `MAX_BODY_SIZE` - changes max body size for `/enqueue`. Default is 100MB, maximum is 1GiB (which is still *a lot* for the multipart form).
- `RESULT_TTL_SEC` - sets result ttl in seconds, minimum 60 seconds. Default is 3600 (transcoding results are being kept and can be downloaded for an hour). - `RESULT_TTL_SEC` - sets result ttl in seconds, minimum 60 seconds. Default is 3600 (transcoding results are being kept and can be downloaded for an hour).
- `FFMPEG_VERBOSE` - if set to `1` changes FFmpeg log level from quiet to trace. - `FFMPEG_VERBOSE` - if set to `1` changes FFmpeg log level from quiet to trace.

View File

@ -29,7 +29,7 @@ use tokio::fs::File;
use tokio::io::AsyncReadExt; use tokio::io::AsyncReadExt;
use tokio_util::io::ReaderStream; use tokio_util::io::ReaderStream;
const CONTENT_LENGTH_LIMIT: usize = 1024 * 1024 * 1024; // 1GB const CONTENT_LENGTH_LIMIT: usize = 100 * 1024 * 1024;
pub struct Server { pub struct Server {
thread_pool: Arc<ThreadPool>, thread_pool: Arc<ThreadPool>,