Skip to content

API: Audio and video tools

List the audio formats this server can write

With whether each one takes a bit rate: FLAC and WAV are lossless and refuse one.

GET/api/v1/tools/audio-convert/formats

Authentication#

No key is needed. This route is public.

Responses#

200 OK#

Content type application/json. Schema: AudioCapabilities.

NameTypeRequiredDescription
formatsarray of AudioFormat-Every output format, with whether this server can write it
loudness_targetnumber (double)-The integrated loudness normalisation aims at, in LUFS
max_secondsnumber (double)-The longest recording this server converts, in seconds
readablearray of string-The media types this server accepts, including video, since extracting a soundtrack is the same conversion
sample_ratesarray of integer-The sample rates a conversion may ask for. 0 keeps the source's
writablearray of string-The formats this server can write, by name

Any other status#

Content type application/problem+json. Error (RFC 9457 problem details). Schema: Problem.

The error follows RFC 9457. See Errors.

curl -X GET "http://localhost:3000/api/v1/tools/audio-convert/formats"

Response examples

{
  "formats": [
    {
      "extension": ".mp3",
      "label": "MP3",
      "lossy": true,
      "mime": "audio/mpeg",
      "name": "mp3",
      "write": true
    },
    {
      "extension": ".flac",
      "label": "FLAC",
      "lossy": false,
      "mime": "audio/flac",
      "name": "flac",
      "write": true
    }
  ],
  "loudness_target": -16,
  "max_seconds": 14400,
  "readable": [
    "audio/aac",
    "audio/flac",
    "audio/mpeg",
    "audio/ogg",
    "audio/wav",
    "video/mp4",
    "video/quicktime",
    "video/webm",
    "video/x-matroska",
    "video/x-msvideo"
  ],
  "sample_rates": [
    44100,
    48000
  ],
  "writable": [
    "mp3",
    "wav",
    "flac",
    "opus",
    "aac"
  ]
}

The examples are built from the schemas, so every value is a placeholder of its type. The tables above hold the fields that carry the real values.