/media-os:media-ocr-ai [input] [output]from media-os
Extracts text from images and scanned PDFs using PaddleOCR, EasyOCR, Tesseract, or TrOCR. Supports layout analysis, tables, handwriting, and 80+ languages.
Ships in media-os. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Context: $ARGUMENTS
Modern open-source OCR. Goes far beyond plain Tesseract by giving four models for four different jobs: PaddleOCR for layout + tables, EasyOCR for "just read the text", Tesseract for the widest language set, TrOCR for handwriting.
For the in-ffmpeg ocr= filter (Tesseract inside a filtergraph, good for logo detection / rough live text), use ffmpeg-ocr-logo. This skill is for offline, high-accuracy, structured OCR — document processing, not video frame grabs.
ocr.py extract --model easy)ocr.py layout --model paddle)ocr.py handwriting --model trocr)ocr.py multi-lang --langs en,ja)ocr.py table --model paddle)ocr.py install <model>)pdftotext / pdfplumber first — they're faster and exact.ffmpeg-ocr-logo for that. Do NOT use for barcode / QR — see ffmpeg-ocr-logo (quirc).| Model | License | Strengths | Install difficulty | When to pick |
|---|---|---|---|---|
| PaddleOCR | Apache 2.0 | Best layout analysis + table extraction, 80+ languages | medium (paddlepaddle) | Structured documents, receipts, invoices, tables |
| EasyOCR | Apache 2.0 | Easiest install, good general quality, 80+ languages | easy | "Just read this image" |
| Tesseract 5 | Apache 2.0 | Widest language support (100+), battle-tested, pure CLI | easiest (system pkg) | Legacy, CPU-only, obscure scripts |
| TrOCR | MIT | Transformer trained on IAM handwriting; best cursive by far | medium (transformers) | Handwritten notes, cursive, stylized fonts |
Pairing advice:
Full per-model strengths, install quirks, and language-matrix in references/languages.md.
PEP 723 header in scripts/ocr.py lists all dependencies. Run via uv run once to populate the ephemeral venv. The one-shot installer:
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py install paddle
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py install easy
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py install tesseract
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py install trocr
Per-backend notes:
paddlepaddle (CPU) or paddlepaddle-gpu (CUDA) via pip. First-use downloads detection + recognition + layout models to ~/.paddleocr/.easyocr + downloads craft-detection + language-specific recognition models to ~/.EasyOCR/ on first use.brew install tesseract tesseract-lang (macOS) / apt install tesseract-ocr tesseract-ocr-all (Debian). pytesseract is just the Python wrapper.microsoft/trocr-base-handwritten (or -large-printed) via transformers. Weights cache to ~/.cache/huggingface/hub/.uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py extract \
--model easy --in photo.jpg --out-format text > photo.txt
Output formats:
--out-format text — raw text, one line per detected region (reading order)--out-format json — {"blocks": [{"bbox": [x,y,w,h], "text": ..., "confidence": ...}, ...]}--out-format tsv — Tesseract-style TSV (bbox columns + text + conf), good for spreadsheets--lang sets the detection / recognition language hint (e.g. --lang en or --lang ja). Without it, backends fall back to their default (usually English).
Structured layout — headers, paragraphs, lists, tables, figures — is PaddleOCR's flagship capability via PP-StructureV2:
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py layout \
--model paddle --in scanned_page.png --out-json layout.json
Output JSON has regions, each with type in {"title", "text", "list", "table", "figure", "figure_caption", "table_caption", "header", "footer", "reference", "equation"}, plus bbox and either text (text regions) or html (table regions, full cell structure).
For a multi-page scanned PDF, loop per page:
# split pages via ImageMagick (media-imagemagick skill)
magick in.pdf page_%03d.png
for p in page_*.png; do
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py layout --model paddle --in "$p" --out-json "${p%.png}.json"
done
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py handwriting \
--model trocr --in handwritten.jpg --out note.txt
TrOCR is a line-level recognizer. If the image has multiple lines, pre-segment with PaddleOCR's detection head and then run TrOCR on each line crop (the script's handwriting subcommand does this automatically when --detect paddle is passed).
Variants:
microsoft/trocr-small-handwritten — fastestmicrosoft/trocr-base-handwritten — defaultmicrosoft/trocr-large-handwritten — best quality, slowermicrosoft/trocr-*-printed — for printed text (worse on handwriting, so pick only when you know the input is printed)Select with --variant base-handwritten (or similar).
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py multi-lang \
--model paddle --langs en,ja,zh --in doc.png --out-json ocr.json
PaddleOCR supports concurrent mixed languages by loading a multilingual recognizer. EasyOCR accepts multiple --languages as a list on init. Tesseract takes -l eng+jpn+chi_sim.
See references/languages.md for the supported-language matrix per backend. Some languages are paddle-only (e.g. Sanskrit, Thai), some are tesseract-only (older scripts, a long tail).
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py table \
--model paddle --in invoice.png --out-csv invoice.csv
Uses PaddleOCR's PP-Structure table engine. Each detected table becomes a <table>-parsed CSV. Multi-table pages produce one CSV per detected table: invoice.csv, invoice_table1.csv, etc.
For complex bordered / borderless tables, PaddleOCR beats the other three backends by a wide margin — only it ships a trained table-structure-recognition model (SLANet).
scripts/ocr.py — subcommands: extract, layout, handwriting, multi-lang, table, install. Each supports --dry-run, --verbose.references/languages.md when picking between backends for a specific language, script, or multilingual mix (English + Japanese, CJK, Arabic/Farsi, Thai, Cyrillic).references/LICENSES.md before shipping OCR output commercially or redistributing the model weights.paddlepaddle (not -gpu), and a specific version. Pin to paddlepaddle>=2.6 in the PEP 723 deps — older 2.4 wheels have M1/M2 build issues.~/.EasyOCR/ — ship the cache with container images to avoid re-downloading.handwriting --detect paddle flow does this).brew install tesseract-lang grabs them all; on Linux, apt install tesseract-ocr-<lang> is per-language. Without them, Tesseract silently recognizes in English only and produces garbage for CJK / RTL.--lang ar / --lang he. Tesseract often outputs text in visual LTR order — post-process with python-bidi if needed.ocr.py layout returns bounding boxes + region types; the text inside each region is still produced by the rec head. If you only want "read the text", skip layout.en-only model won't recognize Chinese or Japanese. Pass --lang ch / --lang japan (PaddleOCR's codes — see references/languages.md for the full list; they don't all match ISO codes).uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py extract \
--model easy --in receipt.jpg --lang en --out-format text > receipt.txt
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py layout \
--model paddle --in receipt.jpg --out-json receipt.json
# receipt.json has regions with types {"title","text","table","figure"}
# for the table region, html field contains the cell-accurate markup
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py handwriting \
--model trocr --variant base-handwritten \
--detect paddle --in notebook_page.jpg --out notebook.txt
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py extract \
--model paddle --lang japan --in menu.jpg --out-format json > menu.json
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py table \
--model paddle --in invoice.png --out-csv invoice.csv
Hand off to media-batch:
ls scans/*.png | parallel --jobs 4 \
uv run ${CLAUDE_SKILL_DIR}/scripts/ocr.py extract \
--model easy --in {} --out-format text > out/{/.}.txt
ImportError: No module named 'paddle' (or paddlepaddle)Cause: PaddleOCR imported without the backend installed.
Solution: pip install paddlepaddle>=2.6 paddleocr (CPU). For CUDA, pip install paddlepaddle-gpu. Or run via uv run which handles the PEP 723 deps automatically.
Cause: Downloading the craft detector + recognizer models. Can take minutes over slow links.
Solution: Wait, or pre-warm with uv run ocr.py install easy --lang en. Once cached in ~/.EasyOCR/, subsequent runs are instant.
Cause: Missing .traineddata. Tesseract defaults to English and silently mis-recognizes.
Solution: brew install tesseract-lang (macOS) or apt install tesseract-ocr-jpn tesseract-ocr-chi-sim tesseract-ocr-ara (Debian). Verify: tesseract --list-langs.
Cause: Fed a full page to a line-level model, or mismatched variant (printed model on handwriting).
Solution: Run with --detect paddle to auto-segment lines, or use a correct variant (-handwritten vs -printed).
cv2.error opening a PDFCause: OpenCV doesn't read PDFs directly.
Solution: Rasterize first: magick in.pdf -density 300 page_%03d.png (see media-imagemagick), then OCR each PNG.
Cause: Some backends output text in visual order (as it appears left-to-right on screen) rather than logical order.
Solution: pip install python-bidi && python -c "from bidi.algorithm import get_display; print(get_display(open('out.txt').read()))".
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub damionrashford/media-os --plugin media-os110 skills in this plugin
/audio-coreaudioManipulate macOS audio at the Core Audio HAL layer: afinfo (audio file metadata), afplay (play), afconvert (convert format/rate/bit-depth/channel layout), say (TTS), SwitchAudioSource (change default input/output/system device — brew install switchaudio-osx), audiodevice CLIs (npm/Go variants), AppleScript via osascript to drive System Preferences Sound. HAL plugins at /Library/Audio/Plug-Ins/HAL/ load virtual drivers (BlackHole 2ch/16ch/64ch, Loopback, Background Music). Aggregate Device (drift-corrected multi-in) and Multi-Output Device via Audio MIDI Setup.app or AudioHardwareCreateAggregateDevice. Use when the user asks to change default macOS audio device, route audio between apps on Mac, install BlackHole, build an Aggregate Device, convert audio files with afconvert, or script Mac audio from the terminal.
/audio-jackRoute professional low-latency audio with JACK Audio Connection Kit (jackaudio.org): jackd server (ALSA/CoreAudio/PortAudio/ASIO backends), jack_control (D-Bus JACK2 config), jack_lsp (list ports/connections), jack_connect/jack_disconnect (manage links), jack_cpu_load, jack_samplerate, jack_bufsize (runtime period size), jack_transport, jack_rec (multi-channel WAV recording), jack_iodelay (round-trip latency), jack_wait, jack_midi_dump. JACK1 C maintenance vs JACK2 C++ multicore. Modern Linux swaps jackd for PipeWire's libjack shim — same client API. JackTrip for uncompressed multichannel UDP over the Internet. Use when the user asks to run a JACK server, connect audio clients, measure roundtrip latency, record from JACK ports, set JACK period size, or bridge JACK over the network with JackTrip.
Other plugins' skills for the same job