direct-play-nice
direct-play-nice is a cross-platform CLI tool that converts video files
to profiles more likely to Direct Play across common streaming devices.
What Is Direct Play?
Direct Play means the client can play the original media file as-is, without server-side video transcoding. In practice, this is usually the lowest-load, highest-quality playback path for media servers.
Official references:
- Plex: https://support.plex.tv/articles/200250387-streaming-media-direct-play-and-direct-stream/
- Jellyfin codec support (goal is Direct Play): https://jellyfin.org/docs/general/clients/codec-support
- Emby playback methods: https://emby.media/support/articles/DirectPlay-Stream-Transcoding.html
Quick Install
Quick Start
Convert one file using the default multi-device profile:
Target specific device families:
Probe local hardware/codec capabilities:
GPU Acceleration
direct_play_nice supports GPU acceleration in two places:
- Bitmap subtitle OCR (PGS/VobSub/DVD) via ONNX Runtime providers
- H.264/HEVC hardware transcoding via FFmpeg hardware encoders
Project-specific behavior:
--ocr-engine autopreferspp-ocr-v4on modern GPU stacks- legacy NVIDIA (Maxwell-class / compute capability
<= 5) auto-selectspp-ocr-v3for better stability - OCR benchmark evidence in this repo shows full-movie OCR at
87.62 FPS(3.65xrealtime) on a self-hosted Linux GPU run (OCR benchmark report)
Official compatibility and architecture references are collected in the manual: Hardware Acceleration.
Sonarr Download Hook Example
Use Sonarr Settings -> Connect -> Custom Script and enable the script on the
On Download event. Point it to the direct_play_nice binary with a config
file:
Example direct-play-nice-sonarr.toml:
= "all"
= "mp4"
= ".fixed"
= "h264"
= "1080p"
= "192k"
= "auto"
= "auto"
= "pp-ocr-v4"
= "srt"
= false
= false
# Optional: require imported media to contain English audio.
# Start with dry-run while tuning candidate policy and custom formats.
= true
= true
= "custom-format-or-title"
= "eng"
# Leave subtitle requirements empty unless subtitle completeness is a goal.
= ""
# Optional: for trusted English-native libraries, retag untagged audio before
# deciding the file is missing English audio.
= "eng"
To catch delayed dubs/subs that arrive after the first import, run the same
binary periodically with --servarr-language-audit. Use
--servarr-language-audit-scope inventory for a Sonarr current-library sweep.
Before applying broad language replacements, follow the
Safe language upgrade runbook
in the Sonarr/Radarr manual.

Supported Devices
For the full model matrix and constraints, see SUPPORTED_DEVICES.md.
Documentation
For advanced usage, read the manual:
- direct-play-nice Book (mdBook)
- AI OCR for bitmap subtitles (setup + runtime notes): Subtitle OCR
- GPU acceleration and supported architecture references: Hardware Acceleration
- Plex auto-refresh workflow: Plex Refresh
- Arr custom-script operation: Sonarr/Radarr Integration
- Hardware probing and diagnostics: Probe and Debug
For Rust API docs (library internals used by the CLI):
License
GPL-3.0-only