# get-iplayer/get_iplayer architecture

> Architecture diagram of the GitHub repository get-iplayer/get_iplayer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/get-iplayer/get_iplayer
- Repository: https://github.com/get-iplayer/get_iplayer

## Overview

get_iplayer is a Perl command-line indexer and PVR for BBC iPlayer and BBC Sounds. Users search a cached index of recent linear broadcasts, then select results or supply a PID/URL for download; downloads may include subtitles and be converted and tagged. The README also documents multi-programme operation, scheduled PVR use, and HTTP proxy support. No source excerpts were provided, so the relationships below rely on README documentation; implementation details and the role of the CGI entry point are not inferred.

Main entry points: [`get_iplayer`](https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer) (Command interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Index and search"]
  node_cli["Command interface"]
  node_index["Programme index"]
  node_cache[("Index cache")]
  node_search["Search and filters"]
end

subgraph group_recording["Recording"]
  node_direct["PID / URL lookup"]
  node_pvr["PVR selection"]
  node_download["Programme download"]
  node_subtitles["Subtitle download"]
  node_media["Downloaded media"]
end

subgraph group_processing["Media processing"]
  node_tagging["Metadata tagging"]
end

node_user(("User / scheduler"))
node_bbc["BBC iPlayer / Sounds"]
node_ffmpeg["ffmpeg"]
node_atomicparsley["AtomicParsley"]
node_proxy["HTTP proxy"]

node_user -->|"runs commands"| node_cli
node_cli -->|"requests index"| node_index
node_index -->|"indexes programmes"| node_bbc
node_index -->|"caches index"| node_cache
node_cli -->|"searches index"| node_search
node_search -->|"searches cached index"| node_cache
node_cli -->|"accepts PID / URL"| node_direct
node_cli -->|"selects programmes"| node_pvr
node_pvr -->|"downloads selections"| node_download
node_direct -->|"requests download"| node_download
node_download -->|"fetches programmes"| node_bbc
node_download -->|"downloads subtitles"| node_subtitles
node_download -->|"writes media"| node_media
node_media -->|"converts to MP4"| node_ffmpeg
node_media -->|"provides media"| node_tagging
node_tagging -->|"tags metadata"| node_atomicparsley
node_cli -.->|"supports proxy"| node_proxy

click node_cli "https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer"
click node_index "https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer"
click node_cache "https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer"
click node_search "https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer"
click node_direct "https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer"
click node_pvr "https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer"
click node_download "https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer"
click node_subtitles "https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer"
click node_media "https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer"
click node_tagging "https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_index,node_cache,node_search toneBlue
class node_direct,node_pvr,node_download,node_subtitles,node_media toneAmber
class node_tagging toneMint
class node_user toneRose
class node_bbc,node_ffmpeg,node_atomicparsley,node_proxy toneIndigo
```

## Components

### Index and search

- [Command interface](https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer): `get_iplayer`
- [Programme index](https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer): `get_iplayer`
- [Index cache](https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer): `get_iplayer`
- [Search and filters](https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer): `get_iplayer`

### Recording

- [PID / URL lookup](https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer): `get_iplayer`
- [PVR selection](https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer): `get_iplayer`
- [Programme download](https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer): `get_iplayer`
- [Subtitle download](https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer): `get_iplayer`
- [Downloaded media](https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer): `get_iplayer`

### Media processing

- [Metadata tagging](https://github.com/get-iplayer/get_iplayer/blob/master/get_iplayer): `get_iplayer`

### Other components

- **User / scheduler**
- **BBC iPlayer / Sounds**
- **ffmpeg**
- **AtomicParsley**
- **HTTP proxy**

## Connections

- User / scheduler → Command interface: runs commands (evidence: `README.md`)
- Command interface → Programme index: requests index (evidence: `README.md`)
- Programme index → BBC iPlayer / Sounds: indexes programmes (evidence: `README.md`)
- Programme index → Index cache: caches index (evidence: `README.md`)
- Command interface → Search and filters: searches index (evidence: `README.md`)
- Search and filters → Index cache: searches cached index (evidence: `README.md`)
- Command interface → PID / URL lookup: accepts PID / URL (evidence: `README.md`)
- Command interface → PVR selection: selects programmes (evidence: `README.md`)
- PVR selection → Programme download: downloads selections (evidence: `README.md`)
- PID / URL lookup → Programme download: requests download (evidence: `README.md`)
- Programme download → BBC iPlayer / Sounds: fetches programmes (evidence: `README.md`)
- Programme download → Subtitle download: downloads subtitles (evidence: `README.md`)
- Programme download → Downloaded media: writes media (evidence: `README.md`)
- Downloaded media → ffmpeg: converts to MP4 (evidence: `README.md`)
- Downloaded media → Metadata tagging: provides media (evidence: `README.md`)
- Metadata tagging → AtomicParsley: tags metadata (evidence: `README.md`)
- Command interface → HTTP proxy: supports proxy (evidence: `README.md`)
