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

# header - Header Inspection

> Inspect disc image headers, metadata, and compression settings

The `header` command displays information about disc image files, including game metadata, compression settings, and format-specific details.

## Usage

```bash theme={null}
dolphin-tool header [options]
```

## Options

<ParamField path="-i FILE, --input=FILE" type="string" required>
  Path to the disc image file to inspect.

  ```bash theme={null}
  dolphin-tool header -i game.iso
  ```

  Supported formats:

  * ISO/GCM
  * GCZ
  * WIA
  * RVZ
  * WBFS
</ParamField>

<ParamField path="-j, --json" type="flag">
  Output information as JSON format, then exit.

  ```bash theme={null}
  dolphin-tool header -i game.iso --json
  ```

  Overrides other print options (`-b`, `-c`, `-l`).
</ParamField>

<ParamField path="-b, --block_size" type="flag">
  Print only the block size of GCZ/WIA/RVZ formats, then exit.

  ```bash theme={null}
  dolphin-tool header -i game.rvz --block_size
  ```

  Output: `131072` (or `N/A` for formats without block size)
</ParamField>

<ParamField path="-c, --compression" type="flag">
  Print only the compression method of GCZ/WIA/RVZ formats, then exit.

  ```bash theme={null}
  dolphin-tool header -i game.rvz --compression
  ```

  Output: `Zstandard` (or `N/A` for uncompressed formats)
</ParamField>

<ParamField path="-l, --compression_level" type="flag">
  Print only the compression level for WIA/RVZ formats, then exit.

  ```bash theme={null}
  dolphin-tool header -i game.rvz --compression_level
  ```

  Output: `5` (or `N/A` for formats without compression levels)
</ParamField>

## Output Formats

### Default Human-Readable Output

Without flags, displays all available information:

```bash theme={null}
dolphin-tool header -i game.rvz
```

Example output:

```
Block Size: 131072
Compression Method: Zstandard
Compression Level: 5
Internal Name: Super Smash Bros. Melee
Revision: 2
Game ID: GALE01
Title ID: 0000000000000000
Region: NTSC-U
Country: United States
```

### JSON Output

```bash theme={null}
dolphin-tool header -i game.rvz --json
```

Example output:

```json theme={null}
{
  "block_size": 131072,
  "compression_method": "Zstandard",
  "compression_level": 5,
  "internal_name": "Super Smash Bros. Melee",
  "revision": 2,
  "game_id": "GALE01",
  "title_id": 0,
  "region": "NTSC-U",
  "country": "United States"
}
```

### Single Value Output

For scripting, use specific flags:

```bash theme={null}
# Block size
dolphin-tool header -i game.rvz -b
# Output: 131072

# Compression method
dolphin-tool header -i game.rvz -c
# Output: Zstandard

# Compression level
dolphin-tool header -i game.rvz -l
# Output: 5
```

## Information Fields

### File Format Information

#### Block Size

The block size used for compression (GCZ/WIA/RVZ only).

* Measured in bytes
* Common values: 16384, 32768, 65536, 131072, 262144
* Larger blocks = better compression, slower random access

#### Compression Method

The algorithm used for compression:

* **None** - Uncompressed (ISO)
* **Deflate** - GCZ compression
* **Bzip2** - Bzip2 compression (WIA/RVZ)
* **LZMA** - LZMA compression (WIA/RVZ)
* **LZMA2** - LZMA2 compression (WIA/RVZ)
* **Zstandard** - Zstandard compression (RVZ only)
* **Purge** - Purge mode (WIA only)

#### Compression Level

The compression level (WIA/RVZ only):

* Range depends on compression method
* Higher = better compression, slower
* WIA/RVZ only; not applicable to GCZ

### Game Metadata

#### Internal Name

The game's internal title as stored on the disc:

```
Internal Name: Super Smash Bros. Melee
```

#### Game ID

The 6-character game identifier:

```
Game ID: GALE01
```

Format: `GALE01` where:

* **G** - Platform (G=GameCube, R=Wii)
* **ALE** - Game code
* **01** - Region/version

#### Title ID

The 64-bit title ID (Wii games only):

```
Title ID: 0001000248414c45
```

GameCube games show `0`.

#### Revision

The disc revision number:

```
Revision: 2
```

Higher numbers indicate later releases.

#### Region

The disc region:

* **NTSC-U** - North America
* **NTSC-J** - Japan
* **NTSC-K** - South Korea
* **PAL** - Europe/Australia

#### Country

Specific country/region:

* United States
* Japan
* Europe
* South Korea
* etc.

## Examples

### Inspect ISO File

```bash theme={null}
dolphin-tool header -i game.iso
```

Output:

```
Internal Name: The Legend of Zelda Twilight Princess
Revision: 0
Game ID: RZDE01
Title ID: 0001000052524445
Region: NTSC-U
Country: United States
```

Note: No compression information for ISO files.

### Inspect RVZ File

```bash theme={null}
dolphin-tool header -i game.rvz
```

Output:

```
Block Size: 131072
Compression Method: Zstandard
Compression Level: 5
Internal Name: Mario Kart Wii
Revision: 1
Game ID: RMCE01
Title ID: 0001000052534245
Region: NTSC-U
Country: United States
```

### Get JSON Output

```bash theme={null}
dolphin-tool header -i game.rvz --json
```

Useful for parsing with `jq` or other JSON tools:

```bash theme={null}
dolphin-tool header -i game.rvz --json | jq '.game_id'
# Output: "RMCE01"
```

### Check Block Size

```bash theme={null}
dolphin-tool header -i game.rvz -b
```

Output:

```
131072
```

### Check Compression Method

```bash theme={null}
dolphin-tool header -i game.rvz -c
```

Output:

```
Zstandard
```

### Check Compression Level

```bash theme={null}
dolphin-tool header -i game.rvz -l
```

Output:

```
5
```

## Scripting Examples

### List All Game IDs

```bash theme={null}
#!/bin/bash

for file in *.{iso,rvz,gcz}; do
  [ -f "$file" ] || continue
  game_id=$(dolphin-tool header -i "$file" --json | jq -r '.game_id')
  echo "$file: $game_id"
done
```

### Check Compression Settings

```bash theme={null}
#!/bin/bash

for rvz in *.rvz; do
  echo "File: $rvz"
  echo "  Block Size: $(dolphin-tool header -i "$rvz" -b)"
  echo "  Compression: $(dolphin-tool header -i "$rvz" -c)"
  echo "  Level: $(dolphin-tool header -i "$rvz" -l)"
done
```

### Identify Game by Title ID

```bash theme={null}
#!/bin/bash

target_id="0001000052534245"  # Mario Kart Wii

for file in *.{iso,rvz}; do
  [ -f "$file" ] || continue
  title_id=$(dolphin-tool header -i "$file" --json | jq -r '.title_id')
  
  if [ "$title_id" = "$target_id" ]; then
    echo "Found: $file"
  fi
done
```

### Generate CSV Database

```bash theme={null}
#!/bin/bash

echo "Filename,Game ID,Internal Name,Region" > games.csv

for file in *.iso; do
  json=$(dolphin-tool header -i "$file" --json)
  filename=$(basename "$file")
  game_id=$(echo "$json" | jq -r '.game_id')
  name=$(echo "$json" | jq -r '.internal_name')
  region=$(echo "$json" | jq -r '.region')
  
  echo "$filename,$game_id,$name,$region" >> games.csv
done
```

### Compare Compression Settings

```bash theme={null}
#!/bin/bash

for file1 in *.rvz; do
  for file2 in *.rvz; do
    [ "$file1" = "$file2" ] && continue
    
    level1=$(dolphin-tool header -i "$file1" -l)
    level2=$(dolphin-tool header -i "$file2" -l)
    
    if [ "$level1" != "$level2" ]; then
      echo "$file1 (level $level1) vs $file2 (level $level2)"
    fi
  done
done
```

## Integration with jq

The JSON output works well with `jq` for advanced queries:

```bash theme={null}
# Extract specific field
dolphin-tool header -i game.rvz --json | jq '.internal_name'

# Filter by region
for file in *.iso; do
  region=$(dolphin-tool header -i "$file" --json | jq -r '.region')
  if [ "$region" = "NTSC-U" ]; then
    echo "$file is NTSC-U"
  fi
done

# Format custom output
dolphin-tool header -i game.rvz --json | \
  jq -r '"\(.game_id): \(.internal_name) [\(.region)]"'
```

## Use Cases

### Identify Unknown Images

Quickly identify what game an image contains:

```bash theme={null}
dolphin-tool header -i unknown.iso
```

### Verify Compression Settings

Check if images are compressed optimally:

```bash theme={null}
for rvz in *.rvz; do
  level=$(dolphin-tool header -i "$rvz" -l)
  if [ "$level" -lt 5 ]; then
    echo "$rvz: Low compression (level $level)"
  fi
done
```

### Organize Game Library

Sort games by region, ID, or name using metadata.

### Quality Control

Verify converted images have expected settings:

```bash theme={null}
block_size=$(dolphin-tool header -i game.rvz -b)
if [ "$block_size" != "131072" ]; then
  echo "Warning: Unexpected block size"
fi
```

## Error Messages

### "Error: No input set"

Missing `-i` option. Specify input file:

```bash theme={null}
dolphin-tool header -i game.iso
```

### "Error: Unable to open disc image"

Check:

* File exists and path is correct
* File is a valid disc image
* You have read permissions

## Performance

Header inspection is very fast (\< 1 second) as it only reads metadata, not the entire file.

## See Also

* [Verify Command](/cli/dolphin-tool/verify) - Verify image integrity
* [Convert Command](/cli/dolphin-tool/convert) - Format conversion
* [DolphinTool Overview](/cli/dolphin-tool/overview) - Other utilities
