Categories

Audio Codec Swap

Change the codec of an audio file within a chosen output format

Click to upload file or drag and drop file here

Maximum file size: 120MB Supported formats: audio/mpeg, audio/aac, audio/mp4, audio/x-m4a, audio/ogg, audio/opus, audio/flac, audio/wav, audio/x-wav

Key Facts

Category
Media
Input Types
file, select, checkbox
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The Audio Codec Swap tool allows you to change the audio codec of your files within a chosen output format. It supports multiple formats including MP3, AAC, OGG, FLAC, and WAV, with options to adjust bitrate, sample rate, and channels while preserving metadata.

When to Use

  • When converting audio files for compatibility with specific devices or software that require a particular codec.
  • When optimizing audio quality or reducing file size by selecting appropriate bitrate and sample rate settings.
  • When you need to retain metadata such as artist, album, and track information during the conversion process.

How It Works

  • Upload your audio file in a supported format like MP3, AAC, M4A, OGG, Opus, FLAC, or WAV.
  • Select the desired output format from the available options, such as MP3, AAC, M4A, OGG Vorbis, Opus, FLAC, or WAV.
  • Configure the target bitrate, sample rate, and audio channels, or use 'Auto' to keep original settings.
  • Choose whether to keep metadata by enabling or disabling the 'Keep Metadata' checkbox.

Use Cases

Converting podcast audio to a lower bitrate MP3 for efficient online distribution.
Archiving music files in a lossless format like FLAC while preserving metadata.
Adjusting audio to mono for voice recordings to save storage space.

Examples

1. Podcast Episode Conversion for Streaming

Podcaster
Background
A podcaster has high-quality WAV recordings of episodes that need to be shared on streaming platforms.
Problem
WAV files are too large for streaming, and episode metadata must be retained for proper indexing.
How to Use
Upload the WAV file, select MP3 as the output format, set bitrate to 128 kbps, and ensure 'Keep Metadata' is enabled.
Outcome
The converted MP3 file is optimized for streaming with reduced size and all metadata intact.

2. Lossless Archiving of Audio Files

Background
A user has MP3 files from old recordings and wants to preserve them in a lossless format for archival purposes.
Problem
MP3 is a lossy codec, and the user wants to maintain audio quality without further degradation.
How to Use
Upload the MP3 file, choose FLAC as the output format, and leave bitrate and sample rate on 'Auto' to preserve quality.
Outcome
The FLAC file is lossless, ensuring no quality loss, and metadata is preserved for future reference.

Try with Samples

audio, video, file

Related Hubs

FAQ

What audio formats can I upload?

You can upload MP3, AAC, M4A, OGG, Opus, FLAC, and WAV files.

Can I change the bitrate without changing the output format?

Yes, you can select the same format and adjust the bitrate to a different value.

Will my metadata be preserved?

Yes, metadata is kept by default. You can turn this off by unchecking 'Keep Metadata'.

What is the maximum file size for upload?

The maximum file size is 125 MB.

How do I decide on the sample rate?

Use 'Auto' to keep the original, or choose 44.1 kHz or 48 kHz based on your needs.

API Documentation

Request Endpoint

POST /en/api/tools/audio-codec-swap

Request Parameters

Parameter Name Type Required Description
audioFile file (Upload required) Yes -
outputFormat select No -
bitrate select No -
sampleRate select No -
channels select No -
keepMetadata checkbox No -

File type parameters need to be uploaded first via POST /upload/audio-codec-swap to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-audio-codec-swap": {
      "name": "audio-codec-swap",
      "description": "Change the codec of an audio file within a chosen output format",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=audio-codec-swap",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]