# Remove Silence from Audio & Video: Cut Pauses, Jump Cuts (`data-done-right/audio-silence-remover`) Actor

Remove silence from audio and video file URLs: cuts pauses, returns the cleaned file plus a timeline of every removed and kept range. Tune threshold, minimum pause and padding. mp3, wav, m4a or mp4 out, or detect only. Direct files, no YouTube.

- **URL**: https://apify.com/data-done-right/audio-silence-remover.md
- **Developed by:** [Data Done Right](https://apify.com/data-done-right) (community)
- **Categories:** Videos, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 audio minute processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Remove Silence from Audio & Video: Cut Pauses, Jump Cuts

This **silence remover** cuts the pauses out of **audio and video files** you give it as URLs and returns the tighter file as **MP3, WAV, M4A or MP4**, plus a timeline of every removed and kept range in seconds. You set the volume threshold, the shortest pause worth cutting and how much breathing room to keep around speech. It runs ffmpeg in the cloud, so there is nothing to install and no API key.

> **What it does not do.** It cuts on **loudness only**: anything louder than your threshold counts as sound, so background music, hum or room noise above the threshold is kept and will stop a pause from being cut. It cannot tell speech from noise, it does not clean up or denoise audio, and cuts are hard cuts without a crossfade. It reads **direct audio or video file URLs** (mp3, wav, m4a, flac, ogg, mp4, mov, webm, mkv); **YouTube, Spotify, SoundCloud and other streaming-site links are rejected** without charge, and HLS/DASH playlists are not supported. Only the first audio track (and first video stream) is used; subtitles, chapters and cover art are not carried over. Video is re-encoded (H.264 + AAC), not stream-copied. Use it only on media you own or have the right to process.

**What you get**

- One dataset row per file: durations, number of cuts, seconds and percent removed, a signed download link to the cleaned file, and the full `silences` and `keptSegments` timelines.
- Detect-only mode if you just want the pause timestamps and no new file.
- Failed files are free, never stop the run, and say exactly why they failed.

### How to remove silence from an audio file

1. Paste one or more **direct audio URLs** in `mediaUrls`.
2. Leave the defaults (threshold -35 dB, pauses of 0.5 s or longer, 0.15 s kept around each cut) or tune them: `thresholdDb`, `minSilenceSeconds`, `paddingSeconds`.
3. Run it. Each dataset row has a `url` to the cleaned file and `silences` listing every removed range (start, end, timecodes in the **source** file). `keptSegments` shows where each kept piece sits in the **result**.

### How to cut silent parts out of a video (jump cuts)

Give it a video URL. With `outputFormat` left on `auto` you get an MP4 where the silent stretches are cut out of both sound and picture, so talking-head, lecture and screen-recording videos get tighter without a timeline editor. Use `maxHeight` (for example `720`) to shrink the video and speed up encoding, and `videoCrf` for quality. Choose `mp3`, `wav` or `m4a` instead to get only the cleaned audio of a video.

### How to get silence timestamps without editing

Set `"mode": "detect"`. You get the same `silences` timeline and totals and no output file. Useful for splitting a recording at pauses, planning edits in your own tool, or estimating how much dead air a batch of files has.

### Choosing the settings

| Goal | thresholdDb | minSilenceSeconds | paddingSeconds |
|---|---|---|---|
| Clean studio speech, cut dead air only | -35 (default) | 0.5 | 0.15 |
| Tight jump-cut style | -30 | 0.3 | 0.08 |
| Quiet recording or soft speakers | -45 | 0.5 | 0.15 |
| Noisy room, cut anything not clearly speech | -25 | 0.4 | 0.1 |

`paddingSeconds` stays on both sides of each cut, so a pause is shortened by twice the padding (a 0.3 s pause with 0.1 s padding gives a 0.1 s cut). Silence at the very start or end of a file is removed right up to the file edge on the cut side, keeping the padding next to speech. `paddingSeconds` x 2 must be smaller than `minSilenceSeconds`.

### Input

| Field | Default | What it does |
|---|---|---|
| `mediaUrls` | sample speech clip | Direct audio or video file links. |
| `mode` | `remove` | `remove` returns a cleaned file; `detect` only reports the silences. |
| `thresholdDb` | -35 | Sound quieter than this is silence (-90 to -5). |
| `minSilenceSeconds` | 0.5 | Shortest pause that is cut. |
| `paddingSeconds` | 0.15 | Silence kept on both sides of a cut. |
| `outputFormat` | `auto` | `auto` (mp4 for video, mp3 for audio), `mp3`, `wav`, `m4a`, `mp4` (video files only). |
| `audioBitrateKbps` | 160 | MP3, M4A and MP4 audio bitrate. |
| `videoCrf` / `maxHeight` | 23 / 0 | MP4 quality and a height cap (0 = original, never upscales). |
| `includeTimeline` | true | Put `silences` and `keptSegments` in each row. |
| `maxMinutesPerRun` | 600 | Hard cap on billed minutes per run. |
| `maxFileSizeMb` | 500 | Source size cap (max 2048). |
| `maxDurationMinutes` | 240 | Source duration cap. |
| `fileTimeoutSecs` | 1800 | Per download and per file processing. |
| `outputStoreName` | empty | Save results in a named store that is kept until you delete it. |

Input example:

```json
{
  "mediaUrls": ["https://github.com/openai/whisper/raw/main/tests/jfk.flac"],
  "mode": "remove",
  "thresholdDb": -25,
  "minSilenceSeconds": 0.3,
  "paddingSeconds": 0.1,
  "outputFormat": "mp3"
}
```

### Output

From a real local run of the input above (11.0 s speech clip; `silences` and `keptSegments` shortened to one entry each here):

```json
{
  "sourceUrl": "https://github.com/openai/whisper/raw/main/tests/jfk.flac",
  "index": 1, "status": "ok", "mode": "remove",
  "thresholdDb": -25.0, "minSilenceSeconds": 0.3, "paddingSeconds": 0.1,
  "durationSeconds": 11.0, "hasVideo": false,
  "silenceCount": 5, "removedSeconds": 2.657, "removedPercent": 24.15, "keptSeconds": 8.343,
  "outputDurationSeconds": 8.343, "format": "mp3", "bytes": 168371,
  "billedMinutes": 1, "event": "audio-minute-processed",
  "url": "https://api.apify.com/v2/key-value-stores/<store>/records/001-silence-removed.mp3",
  "key": "001-silence-removed.mp3",
  "silences": [
    {"start": 2.209, "end": 3.189, "duration": 0.981, "startTimecode": "00:00:02.209", "endTimecode": "00:00:03.189"}
  ],
  "keptSegments": [
    {"start": 0.226, "end": 2.209, "duration": 1.983, "outputStart": 0.0, "outputEnd": 1.983}
  ],
  "error": null, "note": null
}
```

On Apify the `url` is a signed link that downloads without a token. `status` is `ok`, `error` or `skipped` (spending limit or `maxMinutesPerRun` reached). A file with no audio track, a file that is silent all the way through at your threshold, a bad link or a corrupt file gives an `error` row that names the problem.

### Use with the Apify API, MCP, n8n and Make

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("data-done-right/audio-silence-remover").call(run_input={
    "mediaUrls": ["https://example.com/episode.mp3"], "thresholdDb": -35, "minSilenceSeconds": 0.6})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["status"], row["removedSeconds"], row["url"] or row["error"])
```

JavaScript:

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('data-done-right/audio-silence-remover').call({
  mediaUrls: ['https://example.com/lecture.mp4'], maxHeight: 720 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

In n8n or Make use the Apify node with the actor name and the same JSON. With Apify's MCP server (mcp.apify.com) an AI assistant can call it: "remove the silences from this podcast mp3". Only a URL is needed.

### Use cases

- Tighten podcast, interview and voice-memo recordings before publishing or transcribing.
- Cut dead air out of lectures, webinars and screen recordings as jump cuts.
- Shorten audio before sending it to a paid speech-to-text service that bills by the minute.
- Measure how much silence a batch of recordings contains (detect mode).
- Find pause positions to split a long recording into parts.

### How much does it cost

Pay per event, per started minute of the **source** file:

- **$0.003 per audio minute** (`audio-minute-processed`, $3 per 1,000 minutes): audio output, audio extracted from a video, and detect-only mode.
- **$0.025 per video minute** (`video-minute-processed`, $25 per 1,000 minutes): video output (MP4), because the picture is re-encoded.

A 62.5-second file is 2 started minutes. Failed, skipped and rejected files and the `SUMMARY` record are free; nothing is charged until the result exists. Plan discounts apply (Silver about 10%, Gold and higher about 20%).

- 1,000 minutes of audio: $3. 1,000 minutes of video: $25.
- 10,000 minutes of audio: $30. 10,000 minutes of video: $250.
- 100,000 minutes of audio: $300. 100,000 minutes of video: $2,500.

`maxMinutesPerRun` caps a run. If you set a maximum spend per run the Actor stops cleanly when it is reached and removes the file it could not charge for. Apify platform usage is included in the price.

### FAQ

#### Does it remove silence from YouTube videos?

No. YouTube, Spotify, SoundCloud and other streaming-site links are rejected with a message and no charge. Use a direct link to an audio or video file you have the rights to.

#### Will it cut my words off?

It can if the threshold is too high for a quiet speaker: soft word endings can fall under the threshold and be treated as silence. Lower `thresholdDb` (for example -40 or -45), and keep `paddingSeconds` at 0.1 or more. Check the `silences` timeline before using the result on important material.

#### Why were no pauses removed?

Either no pause was both quieter than the threshold and longer than `minSilenceSeconds`, or room noise sits above the threshold. The row says so in `note`. Raise `thresholdDb` toward -25 or shorten `minSilenceSeconds`, and try detect mode to see what the audio looks like.

#### Is the result the same length as the plan says?

The row reports `keptSeconds` (planned) and `outputDurationSeconds` (measured on the file). In local tests with generated audio the removed ranges matched the known silences within 50 ms and WAV output matched the plan within 10 ms; MP3, M4A and MP4 differ by a few tens of milliseconds because of encoder framing.

#### Which limits apply?

Source files up to 2 GB (default 500 MB) and 4 hours by default, up to 3,000 kept pieces per file (raise `minSilenceSeconds` if you hit it). Links to private or internal addresses are blocked. The whole source file is downloaded first, and video output is re-encoded, so long high-resolution videos take a while; `maxHeight` helps.

#### How long are the result links kept?

Results live in the run's key-value store, which expires with your plan's retention period. Set `outputStoreName` to keep them in a named store until you delete it.

### Related tools

- **Extract Audio from Video: MP3, WAV & FLAC in Bulk** pulls the audio track out of video files without cutting anything.
- **Transcribe Audio to Text: Files, Podcasts & Video URLs** turns the cleaned audio into a transcript.
- **Cut Video: Video Trimmer, Clip Cutter & Video to GIF** cuts clips by start and end time when you already know the timestamps.
- **Video Frame Extractor: Keyframes, Scenes & Thumbnails for AI** pulls still images from the same videos.

# Actor input Schema

## `mediaUrls` (type: `array`):

Direct links to audio or video files (mp3, wav, m4a, flac, ogg, mp4, mov, webm, mkv). Example: https://example.com/podcast.mp3. YouTube, Spotify, SoundCloud and other streaming-page links are rejected, with no charge.

## `mode` (type: `string`):

'remove' cuts the pauses out and returns a new file plus the timeline. 'detect' only reports where the silences are (for example to feed your own editor or a transcription job) and is always billed as audio.

## `thresholdDb` (type: `number`):

Sound quieter than this counts as silence. -35 suits clean speech; use -45 or lower for quiet recordings or background noise you want kept, -25 to cut a noisy room. Example: -40.

## `minSilenceSeconds` (type: `number`):

Only pauses at least this long are cut. 0.5 removes dead air but keeps natural breaths between sentences; 0.3 gives tight jump cuts. Example: 0.4.

## `paddingSeconds` (type: `number`):

This much of each pause stays on both sides of a cut so words are not clipped. Must be less than half of the minimum pause length. Example: 0.1.

## `outputFormat` (type: `string`):

File type of the result. mp4 needs a video file as input. Choosing mp3, wav or m4a for a video file returns the cleaned audio only (billed as audio).

## `audioBitrateKbps` (type: `integer`):

MP3, M4A and the audio of MP4 output. 128 is fine for speech, 192 to 320 for music. Ignored for WAV.

## `videoCrf` (type: `integer`):

MP4 output only. Lower = better quality and bigger files: 18 is near-lossless, 23 is the default, 28 is small.

## `maxHeight` (type: `integer`):

MP4 output only: shrink video taller than this, keeping the aspect ratio (never upscales). 0 = keep the original size. Example: 720. Smaller video encodes faster.

## `includeTimeline` (type: `boolean`):

Adds 'silences' (every removed range) and 'keptSegments' (every kept range with its position in the output) to each dataset row. Turn off for long files if you only need the totals.

## `maxMinutesPerRun` (type: `integer`):

Hard cap on the minutes you can be charged in one run. A file that would exceed it is listed as skipped, free. Example: 600 = 10 hours of media.

## `maxFileSizeMb` (type: `integer`):

Source files above this size are rejected before the download finishes.

## `maxDurationMinutes` (type: `number`):

Longer files are rejected without charge. Example: 240 = 4 hours.

## `fileTimeoutSecs` (type: `integer`):

Applies separately to the download and to the processing of each file.

## `outputStoreName` (type: `string`):

Optional key-value store name. Named stores are kept until you delete them, while a run's own store expires after your plan's retention period. Example: my-clean-audio.

## Actor input object example

```json
{
  "mediaUrls": [
    "https://github.com/openai/whisper/raw/main/tests/jfk.flac"
  ],
  "mode": "remove",
  "thresholdDb": -25,
  "minSilenceSeconds": 0.3,
  "paddingSeconds": 0.1,
  "outputFormat": "auto",
  "audioBitrateKbps": 160,
  "videoCrf": 23,
  "maxHeight": 0,
  "includeTimeline": true,
  "maxMinutesPerRun": 600,
  "maxFileSizeMb": 500,
  "maxDurationMinutes": 240,
  "fileTimeoutSecs": 1800
}
```

# Actor output Schema

## `results` (type: `string`):

One row per input file with its download link, removed seconds and the timeline of cuts, as JSON, CSV, Excel and more.

## `records` (type: `string`):

Key-value store records: the cleaned audio and video files and the run summary.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mediaUrls": [
        "https://github.com/openai/whisper/raw/main/tests/jfk.flac"
    ],
    "thresholdDb": -25,
    "minSilenceSeconds": 0.3,
    "paddingSeconds": 0.1
};

// Run the Actor and wait for it to finish
const run = await client.actor("data-done-right/audio-silence-remover").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mediaUrls": ["https://github.com/openai/whisper/raw/main/tests/jfk.flac"],
    "thresholdDb": -25,
    "minSilenceSeconds": 0.3,
    "paddingSeconds": 0.1,
}

# Run the Actor and wait for it to finish
run = client.actor("data-done-right/audio-silence-remover").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mediaUrls": [
    "https://github.com/openai/whisper/raw/main/tests/jfk.flac"
  ],
  "thresholdDb": -25,
  "minSilenceSeconds": 0.3,
  "paddingSeconds": 0.1
}' |
apify call data-done-right/audio-silence-remover --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data-done-right/audio-silence-remover"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/S410dJkO4rCopTdnx/builds/ItX55AhyX5bkocdOx/openapi.json
