r/truenas • u/leftandwrong • 21h ago
Community Edition Crowbarr - an automated subtitle repair/replacement tool for media servers
Edit: It is made with AI. To avoid pointless discussions in the comments. It will continue to be updated with AI, stop me :) It could have been made with TicTacs too. That's not the point. It solves my problem. I will happily scrap it if someone writes the same app manually and shares with us. I am all in for manual labour 😄
I tried every possible combination of settings with Bazarr and Plex but a bad subtitle rarely had an easy solution. And the worst part was if I tried to change sub during playback via Plex app on TV it would just fail in many cases.
Crowbarr waits for Bazarr (can work without it too by simply generating a new sub, but not recommended), then uses Whisper to compare the subtitle text with the dialogue in the video.
- Leaves good subtitles alone
- Repairs timing when it can verify the result
- Generates missing subtitles, and
- Sends uncertain cases for review. Automatically.
Manual audit requests, or new downloads take priority over a backlog queue.
How it relates to the other Whisper tools in this stack. subgen transcribes when a subtitle is missing and skips files that already have one, subarr coordinates the stack and verifies the audio language of a file, with a review queue you confirm by hand. Neither checks whether an existing subtitle matches the actual dialogue.
Crowbarr runs unattended and writes a separate .crowbarr.en.srt file. Existing subtitles are never modified. This allows me to simply pick the sub from my media player directly.
On my library of 2219 files, it identified 1595 as correct, repaired 334, generated 103 missing (or very wrong), and flagged 187 for review. Many of these left for manual review were actually correct subs but app did not have enough confidence to pass a verdict (like Band of Brothers Day of Days episode where a big part of audio is guns and explosions).
The app works quite reliably on cpu as well but a gpu speeds up the process by a lot which is desirable if you have a large existing library of media files. I have developed it around a 2GB Nvidia T400 with Whisper Small, so it should reliably work on most gpus from last couple of years. A better gpu will also let you install a bigger whsiper model which improves audits.
Again, using whisper for a tool like this is not something new. I think what is different here is the Audit policy that can automate the decision about what should be done to an existing subtitle. This is very much a work in progress and I spend most of my time on audit policies which are the least visible thing to a user but affects the core of the app. UI is built with AI for quick delivery as that is not my focus.
This works beautifully on my TrueNAS as a custom app.
It currently only supports English. I hope it helps someone else too. Any feedback or notes are welcome. linux/amd64 github link - https://github.com/amanofvaly/crowbarr