> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doviconvert.com/llms.txt
> Use this file to discover all available pages before exploring further.

# File Scanning & Analysis

> Identify video formats and analyze FEL complexity before conversion

Before converting files, you should analyze them to understand their format and whether conversion is safe. dovi\_convert provides two commands for this: `scan` for quick analysis and `inspect` for deep verification.

## Why Scan First?

Not every Dolby Vision Profile 7 file should be converted. Some contain Enhancement Layers with brightness expansion data — converting these produces incorrect results (dark picture, flickering).

Scanning identifies:

* **Video format** — HDR10, HDR10+, Dolby Vision (and which profile)
* **FEL classification** — MEL, Simple FEL, or Complex FEL
* **Conversion safety** — Whether the file is safe to convert

The `convert` command automatically scans files before processing and warns you about risky conversions. Running `scan` separately gives you an overview without starting any conversion.

## The `scan` Command

Scans files to identify their video format and FEL status. You can scan individual files, entire directories, or any combination.

### Basic Usage

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-macchiato"}}
dovi_convert scan                   # All MKV files in current directory
dovi_convert scan movie.mkv         # Specific file
```

### Scan Directories

Point `scan` at any directory instead of navigating there first:

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-macchiato"}}
dovi_convert scan /movies
```

Scan multiple directories or mix files and directories:

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-macchiato"}}
dovi_convert scan /movies /tv
dovi_convert scan /movies movie.mkv
```

### Recursive Scanning

Scan subdirectories with the `--recursive` (or `-r`) flag:

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-macchiato"}}
dovi_convert scan --recursive              # Recursive (default depth: 5)
dovi_convert scan -r                       # Same, short form
dovi_convert scan --recursive 2            # Recursive (depth: 2 folders)
dovi_convert scan /movies --recursive 3    # Directory with recursion
```

### Show Only Conversion Candidates

If you only want to see files that can be converted (Profile 7), use the `--candidates` flag to filter out SDR, HDR10, Profile 8, and other non-convertible formats:

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-macchiato"}}
dovi_convert scan --candidates
dovi_convert scan /movies --candidates
dovi_convert scan --candidates --recursive 3
```

This is useful when scanning large libraries where most files are already in the correct format.

## Understanding the Output

The scan displays color-coded results for each file:

| Color     | Classification | Meaning                                                  |
| --------- | -------------- | -------------------------------------------------------- |
| **Green** | MEL            | No enhancement data. Safe to convert.                    |
| **Blue**  | Simple FEL     | No brightness expansion detected. Usually safe.          |
| **Red**   | Complex FEL    | Active brightness expansion. Conversion not recommended. |

Non-Profile 7 files (HDR10, SDR, etc.) are also identified but cannot be converted by this tool.

### How `scan` Works

The scan samples 10 timestamps across the file and analyzes the RPU (Reference Processing Unit) metadata at each point. It checks for brightness values that exceed the Base Layer's capability — an indicator of Complex FEL.

<Callout icon="circle-info" iconType="solid" color="#8caaee">
  Sampling is fast but not exhaustive. A file might have brightness spikes in sections the scan didn't sample. For definitive results, use `inspect`.
</Callout>

## Terminology

### MEL (Minimal Enhancement Layer)

The Enhancement Layer exists but contains no useful data. This is the most common type. Converting is completely safe — you lose nothing.

### Simple FEL (No Brightness Expansion)

The Enhancement Layer contains some data (film grain, minor color adjustments), but does not expand brightness. Converting is generally safe — you lose minor enhancements, but the picture remains correct.

### Complex FEL (Brightness Expansion)

The Enhancement Layer actively elevates brightness beyond the Base Layer. Converting produces incorrect tone mapping. These files are skipped by default.

For more details on FEL types and their implications, see [Before You Start](/before-you-start#understanding-the-enhancement-layer).

## The `inspect` Command

Performs a full frame-by-frame analysis of the entire file. Use this when you need definitive confirmation.

### When to Use `inspect`

* Verify a **Simple FEL** verdict from `scan`
* Check if a Complex FEL verdict might be a false positive
* Get absolute certainty before converting a file
* Investigate files that `scan` couldn't fully classify

### Basic Usage

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-macchiato"}}
dovi_convert inspect movie.mkv
```

### How `inspect` Differs from `scan`

| Aspect            | `scan`                          | `inspect`                |
| ----------------- | ------------------------------- | ------------------------ |
| **Speed**         | Fast (samples 10 points)        | Slow (reads entire file) |
| **Accuracy**      | High (may miss isolated spikes) | Definitive               |
| **Batch support** | Yes                             | No (single file only)    |

<Callout icon="circle-exclamation" iconType="solid" color="#ef9f76">
  `inspect` reads the entire file frame-by-frame. For a typical 50-80 GB movie, this takes several minutes. It's not suitable for batch operations.
</Callout>

### Interpreting Results

After analysis, `inspect` reports:

* Whether **brightness expansion** was detected (the primary concern)
* The **peak brightness** values found in the metadata
* A **verdict** confirming if the file is safe to convert

If `inspect` says the file is safe but `scan` said Complex FEL, trust `inspect` — it analyzed the entire file rather than sampling.

## Automatic Scanning in Convert

You don't always need to run `scan` manually. The `convert` command performs the same analysis automatically:

* **Complex FEL files** are skipped by default (use `--force` to override)
* **Simple FEL files** trigger a confirmation prompt

This means you can safely run `convert` on any file — the tool warns you before doing anything risky.

## Next Steps

<CardGroup cols={2}>
  <Card title="File Conversion" icon="recycle" href="/essentials/conversion">
    Convert individual files or directories to Profile 8.1
  </Card>

  <Card title="Backup & Restore" icon="clock-rotate-left" href="/essentials/backup-restore">
    Managing backup files and restoring originals
  </Card>
</CardGroup>
