Subtitle Sources
Plank can load subtitles from multiple sources:Embedded Subtitles
Automatically extracted from video files (MKV, MP4). Supports multiple language tracks.
Sidecar Files
.srt, .vtt, or .ass files stored alongside videos in the library directory.
OpenSubtitles
Search and download subtitles from OpenSubtitles.com using TMDB metadata.
Manual Upload
Upload your own subtitle files in VTT or SRT format.
Automatic Subtitle Discovery
When you play a video, Plank automatically discovers available subtitles.Discovery Process
- Check Database: Looks for previously discovered subtitles
- Scan Embedded: Extracts subtitle tracks from video file metadata
- Scan Sidecar: Looks for .vtt, .srt, .ass files in same directory
- Background Fetch: Continues discovery in background while you watch
Supported Formats
Embedded Formats
- SubRip (SRT): Extracted from video containers
- ASS/SSA: Advanced SubStation Alpha (styling preserved)
- WebVTT: Native web format
- DVB Subtitles: Bitmap-based subtitles
Sidecar Formats
- WebVTT (.vtt): Preferred format, works natively in browser
- SubRip (.srt): Auto-converted to VTT on server
- ASS (.ass): Advanced styling, converted to VTT
File Naming Conventions
Sidecar subtitle files are detected with these patterns:Subtitle Selection
The video player provides easy subtitle selection:Player Subtitle Menu
Access subtitles from the player controls:- Click the CC button in player controls
- View list of available subtitle tracks
- Select desired language
- Subtitles activate immediately
Subtitle Track Display
Each track shows:- Language: Full language name (e.g., “English”, “Spanish”)
- Source: Where it came from (embedded, sidecar, OpenSubtitles)
- Type: Regular, forced, or SDH (hearing impaired)
- Format: VTT or SRT
Default Subtitles
Subtitles marked as default (from embedded tracks) are automatically selected on playback.OpenSubtitles Integration
Plank can search and download subtitles from OpenSubtitles.com.Configuration
To enable OpenSubtitles:- Navigate to Settings
- Enter OpenSubtitles API key
- (Optional) Enter username and password for premium features
- Save settings
Searching for Subtitles
From the media detail page:- Click Find Subtitles
- Select target languages (defaults to English)
- View search results
- Click Download on desired subtitle
Search Criteria
OpenSubtitles searches use:- TMDB ID: Most accurate matching
- Title + Year: Fallback if no TMDB ID
- Season + Episode: For TV shows
- Language: Filter by desired languages
Download Process
When you download a subtitle:- Plank fetches subtitle file from OpenSubtitles
- Converts to WebVTT format (if needed)
- Saves to library directory as sidecar file
- Adds entry to subtitles database table
- Immediately available in player
Manual Subtitle Upload
You can upload subtitle files directly.Upload Workflow
- Navigate to media detail page
- Click Upload Subtitle
- Select .vtt or .srt file
- Choose language
- (Optional) Mark as default or forced
- Click Upload
Supported Upload Formats
- WebVTT (.vtt): Uploaded as-is
- SubRip (.srt): Auto-converted to VTT
- ASS/SSA (.ass/.ssa): Converted to VTT (styling may be lost)
Subtitle Management
Manage your subtitle collection from the media detail page.Viewing Subtitles
See all subtitles for a media item:- Open media detail page
- Scroll to “Subtitles” section
- View list of available tracks
Deleting Subtitles
Remove unwanted subtitle tracks:- Click delete icon next to subtitle
- Confirm deletion
- Subtitle file removed from library
Setting Default Subtitle
Mark a subtitle as default:- Click “Set as Default” on subtitle track
- Player will auto-select this track on playback
Forced Subtitles
“Forced” subtitles display only for foreign language parts:- Useful for movies with mixed languages
- Only shows when non-English dialogue appears
- Mark as forced during upload or download
Database Schema
Subtitles are stored in thesubtitles table:
Subtitle Tracks API
The player fetches subtitle tracks from:Subtitle Format Conversion
Plank automatically converts subtitles to WebVTT for browser compatibility.Why WebVTT?
WebVTT (Web Video Text Tracks) is the standard format for HTML5 video:- Native browser support
- No conversion needed at runtime
- Supports styling and positioning
- Standardized timing format
Conversion Process
When a non-VTT subtitle is added:- SRT → VTT: Converts timestamp format and headers
- ASS → VTT: Extracts text, may lose styling
- Embedded → VTT: Extracts from video container
FFmpeg Integration
Embedded subtitle extraction uses FFmpeg:Performance Optimization
Lazy Loading
Subtitle discovery runs in the background:- Player starts immediately
- Subtitles appear as they’re discovered
- No blocking on slow file scans
Caching
Discovered subtitles are cached:- Database stores subtitle metadata
- Prevents re-scanning files
- Instant loading on subsequent plays
Concurrent Discovery
Multiple subtitle sources checked in parallel:- Embedded track extraction
- Sidecar file scanning
- OpenSubtitles search (if enabled)
Advanced Features
SDH (Subtitles for Deaf and Hard of Hearing)
SDH subtitles include:- Sound effect descriptions [door slams]
- Speaker identification
- Music and ambient noise notation
Multi-Language Support
Plank supports subtitles in any language:- ISO 639-1 language codes
- Full language names in player UI
- Search by multiple languages simultaneously
- No limit on number of subtitle tracks
Subtitle Synchronization
If subtitles are out of sync:- Use player’s subtitle offset feature (if available)
- Download alternate subtitle file
- Manually edit .vtt file timing (advanced)
Troubleshooting
Subtitles Not Showing
Check subtitle file location:- Must be in same directory as video
- Filename must match video filename
- Extension must be .vtt, .srt, or .ass
- Subtitle may not be discovered yet
- Refresh the page to trigger discovery
- Check browser console for errors
Embedded Subtitles Missing
FFmpeg not installed:- Verify FFmpeg is available on server
- Check server logs for FFmpeg errors
- Some subtitle codecs may not be supported
- Extract manually and upload as sidecar
OpenSubtitles Not Working
API key invalid:- Verify API key in settings
- Check OpenSubtitles account status
- API key may be rate-limited
- Media must have TMDB metadata
- Re-add media to fetch TMDB ID
- Manually search on OpenSubtitles.com
Subtitle Encoding Issues
Wrong character encoding:- Most subtitles should be UTF-8
- Convert to UTF-8 before uploading
- Use tool like
iconvon Linux/Mac
Sync Issues
Subtitles out of sync:- Download different subtitle file
- Manually adjust .vtt timestamps
- Use subtitle editing tool (Subtitle Edit, Aegisub)
Next Steps
Streaming
Learn about Plank’s video streaming capabilities
Media Library
Manage your collection of movies and TV shows