---
title: "Check a video for copyrighted music before you upload it"
description: "For creators and small teams: list the commercial recordings in a video file and where they play, with the AudD command-line tool and no code. What a scan of a 10-minute video costs, how to read the results, and what a match does and doesn't tell you."
slug: "/resources/recipes/check-a-video-for-copyrighted-music-before-upload"
section: "recipes"
keywords: [audd, copyrighted music, check video before upload, cli, enterprise endpoint, creators, video editors, content id]
---

# Check a video for copyrighted music before you upload it

If you want to know which songs are playing in your video before you upload it, you can scan it with `audd`, our command-line tool. You'll get a list of the songs, with the time when each of them starts and ends in the video. No code is required.

```bash
audd login
audd recognize my-video.mp4 --enterprise --limit 50 --tracklist
```

```text
0:00 – 0:08        Ali Angel — Tou patou II
0:00 – 0:08        Future Shock — Dance Floor
0:00 – 0:07        Anthony Acosta — The Way She Moves
0:48 – 0:57        Barely Alive — Keyboard Killer
1:36 – 1:44        Barely Alive — Keyboard Killer
```

> **Note.** We recognize music from our database of 160 million songs. The result will tell you which recording is playing, where it starts, and where it ends. Keep in mind that we can't tell you what a platform will do with your video.

## 1. Install the CLI and sign in

| Where | Command |
|---|---|
| macOS (Homebrew) | `brew install auddmusic/tap/audd` |
| Windows | the installer for [x64](https://github.com/AudDMusic/audd-cli/releases/latest/download/audd_windows_amd64.msi) or [ARM64](https://github.com/AudDMusic/audd-cli/releases/latest/download/audd_windows_arm64.msi) |
| macOS, Linux | `curl -fsSL https://github.com/AudDMusic/audd-cli/releases/latest/download/install.sh \| sh` |
| Node.js | `npm install -g @audd/cli` |
| Python | `pipx install audd-cli` |

Then sign in:

```bash
audd login
```

`audd login` opens your browser so you can approve the sign-in, and then saves your API token. If you already have a token, you can set it in the `AUDD_API_TOKEN` environment variable instead. You can get a token from our API Dashboard at [dashboard.audd.io](https://dashboard.audd.io). New accounts get 300 free requests for 14 days, where available.

Please install [ffmpeg](https://ffmpeg.org) as well. If ffmpeg is installed, the CLI reads the exact length of the video to estimate the cost; otherwise, it estimates the length from the file size and says so.

## 2. Check what the scan will cost

The standard endpoint analyzes up to the first 12 seconds of audio, so for a whole video, you'll use the enterprise endpoint. We count requests to the enterprise endpoint as 1 request per 12 seconds of audio, which is 5 requests per minute of video. The `--limit` option is the upper bound for the number of 12-second chunks the server will recognize. Run the command with `--dry-run` first to see the number for your file; nothing is sent.

```bash
audd recognize my-video.mp4 --enterprise --dry-run
```

| Video length | Requests (`--limit`) | Cost at $5.00 per 1,000 |
|---|---|---|
| 1 minute | 5 | $0.025 |
| 10 minutes | 50 | $0.25 |
| 30 minutes | 150 | $0.75 |
| 1 hour | 300 | $1.50 |

During the free trial, you can send files to the enterprise endpoint, but not URLs. The CLI uploads files from your computer, so you can try this recipe on the trial: its 300 requests are enough for six 10-minute videos.

| Plan | Price | Requests included | Additional requests |
|---|---|---|---|
| Free trial (new accounts, where available) | $0 | 300 in total, for 14 days | none |
| Indie | $5 per month | 1,000 per month | $5.00 per 1,000 |

For the other plans, see the [pricing page](https://audd.io/pricing/).

## 3. Scan the video

Use the number from the dry run as the limit:

```bash
audd recognize my-video.mp4 --enterprise --limit 50 --tracklist
```

Before it uploads the file, the CLI will ask you to confirm. If the scan finds any songs, you'll see a line for each of them, with the start and end time in your video, the artist, and the title. With `--tracklist`, the matches of the same song in consecutive chunks are merged into one line.

- If more than one song matches the same part of the video, each of them will have its own line.
- A song that stops and comes back later will have two lines, and so will a song that wasn't matched in two or more chunks in a row.
- If the limit is lower than the number of chunks in the video, the end of the video won't be scanned.

Add `-v` to see the album, the label, the release date, and a link to the song page under each line. You don't have to have an enterprise account in order to use the enterprise endpoint, but ISRC and UPC codes are enterprise features, available on a Startup plan or higher, on request. Let us know if you want access to these features: send an email to [api@audd.io](mailto:api@audd.io).

## 4. Save the list

If you want to keep the results in a spreadsheet, write them to a CSV file:

```bash
audd recognize my-video.mp4 --enterprise --limit 50 --tracklist --format csv > my-video-music.csv
```

Every row is one song. The `start` and `end` columns are times in your video (`m:ss`), and `start_seconds` and `end_seconds` are the same times in seconds. Results are cached by file contents, so recognizing the same file again is free.

The times in the output are positions in your video. If you read the JSON output (`--format json`), you'll also see `timecode`: it's the position in the original song where the matched fragment is playing, not in your file.

## When the video file is large

The CLI uploads the whole file, video included. If the video is long or in high resolution, you can extract the audio first: the upload will be much smaller. If the sound starts with the picture, the times in the results will still point to the same moments in the video.

```bash
ffmpeg -i my-video.mp4 -vn -c:a aac -b:a 128k my-video-audio.m4a
audd recognize my-video-audio.m4a --enterprise --limit 50 --tracklist
```

At 128 kbps, the audio is about 1 MB per minute. For more ffmpeg commands, see [Cut and convert audio clips with ffmpeg](/resources/recipes/ffmpeg-clips-for-recognition).

## When nothing is found

If the CLI has successfully scanned the video, but there are no matches, it prints `No match.` It means that we didn't recognize any recording from our database in the parts of the video that were scanned. It doesn't mean there's no music in the video, or that a platform won't flag it.

Please note that we can only recognize songs from our database, so your own unreleased music won't be found. A song you sang or played yourself won't be found either, and a cover doesn't match the original: we identify recordings, not compositions. The part of the video after the chunks covered by `--limit` won't be scanned.

We may also not recognize music that's quiet under loud speech or game sound. For more examples, see [What music recognition matches, and what it doesn't](/resources/concepts/what-recognition-matches).

## When a song is found

Now that you know the song and where it plays, you can replace it, mute that part, or cut it out before you upload the video. If you have a license for the song, you can keep it. [Flag and remove music in a live-event recording](/resources/recipes/flag-music-in-live-recording) shows how to mute or cut the segments with ffmpeg.

If you have an archive of past videos to check, you can use sampling to keep the cost down: see [Scan your stream archive](/resources/recipes/scan-vods-and-clips-for-copyrighted-music). For how platforms turn matches into decisions, see [From match to decision](/resources/concepts/match-to-decision).

## With Python instead of the CLI

If you prefer code, the Python SDK sends the same request (`pip install audd`):

```python
from audd import AudD

audd = AudD("your-api-token")  # get your own token at dashboard.audd.io


def clock(seconds):
    s = int(seconds or 0)
    return f"{s // 60}:{s % 60:02d}"


matches = audd.recognize_enterprise("my-video.mp4", limit=50)
if not matches:
    print("No known recordings in the scanned part of the video.")
for m in matches:
    print(f"{clock(m.start_seconds)}-{clock(m.end_seconds)}  {m.artist} - {m.title}")
```

`start_seconds` and `end_seconds` are positions in your file; the SDK works them out from the chunk position and the offset inside the chunk. Unlike `--tracklist`, this prints one line per match.

## When the scan stops with an error

If something goes wrong, the CLI will tell you what happened and what you can do. You can also check the exit code:

- 3: the token is missing or was rejected. Run `audd login` again.
- 4: you're out of requests, or the feature isn't available on your plan (for example, a URL on the enterprise endpoint during the free trial).
- 5: a network or server error. Retrying may help.
- 6: a safety limit, such as a missing `--limit`, or a confirmation with no terminal to ask it in.

For the API's error codes, see the [Error codes reference](/resources/reference/errors).

---

**Related**

- [Identify music from the command line with the AudD CLI](/resources/recipes/command-line-music-recognition)
- [Scan your stream archive (VODs and clips) for copyrighted music](/resources/recipes/scan-vods-and-clips-for-copyrighted-music)
- [What music recognition matches, and what it doesn't](/resources/concepts/what-recognition-matches)
- [Cut and convert audio clips with ffmpeg](/resources/recipes/ffmpeg-clips-for-recognition)
- [AudD for independent artists](/resources/for/independent-artists)
- [AudD CLI reference](https://docs.audd.io/cli)

## Sitemap

See the [resources sitemap](https://audd.io/resources/sitemap.md) for every guide and the [glossary](https://audd.io/resources/reference/glossary.md) for AudD terms.
