How gSubs searches for subtitles
gSubs implements a two-tier search strategy that prioritizes accuracy while providing fallback options:- Fast, accurate results when available (SubDB)
- Comprehensive fallback options (OpenSubtitles)
- Maximum compatibility across different video sources
SubDB: Hash-based matching
What is SubDB?
SubDB (Subtitles Database) is a hash-based subtitle database that matches subtitles using unique video file fingerprints.How SubDB works
Hash computation
gSubs computes a unique hash from your video file:The hash is generated from:
- First 64KB of the video file
- Last 64KB of the video file
- File size
Database lookup
The hash is sent to SubDB’s API:SubDB searches its database for subtitles associated with that exact hash.
Advantages of SubDB
Perfect synchronization
Hash matching ensures the subtitle is synced to your exact video file. No timing adjustments needed.
Lightning fast
Hash-based lookup completes in seconds. No searching through hundreds of options.
Automatic download
When a match is found, gSubs downloads it immediately. No manual selection required.
Reliable results
If SubDB has a subtitle for your video hash, it’s guaranteed to be the correct one.
When SubDB finds a match
SubDB typically finds matches for:- Popular movies and TV shows
- Videos from common sources (streaming services, releases)
- Files that many other users have already searched for
- Standard video releases with consistent encoding
When SubDB doesn’t find a match
SubDB may not find matches for:- Personal recordings or home videos
- Rare or obscure content
- Videos you’ve edited or trimmed
- Custom encodes with unique file hashes
- Very new releases not yet in the database
OpenSubtitles: Comprehensive search
What is OpenSubtitles?
OpenSubtitles is the world’s largest open-source subtitle database, containing millions of subtitles for movies and TV shows in multiple languages.How OpenSubtitles works
When SubDB doesn’t find a match, gSubs queries OpenSubtitles:OpenSubtitles search parameters
OpenSubtitles searches using multiple criteria:Language filter
Language filter
Filename matching
Filename matching
OpenSubtitles analyzes your filename to extract:
- Movie or show title
- Season and episode numbers (for TV shows)
- Release group tags
- Quality indicators (720p, 1080p, etc.)
Breaking.Bad.S01E01.1080p.BluRay.x264-GROUP.mkv- Title: Breaking Bad
- Season: 1
- Episode: 1
- Quality: 1080p BluRay
File path analysis
File path analysis
OpenSubtitles can also use the full file path to improve matching:The folder structure provides additional context for more accurate results.
Understanding OpenSubtitles results
When OpenSubtitles returns results, gSubs displays them in a table:- Full subtitle filename (usually indicates quality and source)
- Download button to save that specific subtitle
Choosing the right subtitle
When presented with multiple options:Match quality indicators
Subtitles tagged with the same quality (720p, 1080p, WEB-DL, BluRay) are more likely to sync correctly.
Check subtitle filename length
Longer, more specific filenames usually indicate better quality and more accurate timing.
OpenSubtitles results may require minor timing adjustments in your video player, especially if your video file differs from the subtitle’s source.
Search flow comparison
| Aspect | SubDB | OpenSubtitles |
|---|---|---|
| Search method | Hash-based | Filename/metadata |
| Speed | Very fast (seconds) | Fast (few seconds) |
| Accuracy | Perfect sync | May need adjustment |
| Results | One exact match | Multiple options |
| User action | Automatic | Manual selection |
| Best for | Popular releases | Rare content |
| Coverage | Common videos | Comprehensive |
Language support
Both sources support gSubs’ 10 languages:API authentication
gSubs handles all API authentication automatically:- Create an account
- Register for API keys
- Configure authentication
- Worry about rate limits (for normal usage)
Why two sources?
The two-tier approach provides the best of both worlds:Speed + accuracy
SubDB provides instant, perfectly synced results for common videos.
Comprehensive coverage
OpenSubtitles ensures you can find subtitles even for obscure content.
Automatic fallback
If one source fails, the other picks up automatically. No manual intervention.
User choice
For rare videos, you get to choose the best subtitle from multiple options.
Future sources
From the README, additional sources are planned:Feature requests and source suggestions can be submitted to the gSubs GitHub repository.
Next steps
Troubleshooting
Fix subtitle search and download issues
Finding subtitles
Learn the complete single-file workflow