This commit addresses Issue #243 where DVB subtitles from Spanish broadcasts were producing corrupt/garbled OCR output like "alajentiegaranual dep jemios" instead of "a la entrega anual de premios". Root cause analysis: 1. Image preprocessing was degrading quality - pixContrastNorm was causing issues for some DVB sources 2. Default quantization mode (ocr_quantmode=1) was too aggressive, reducing images to just 3 colors which lost important detail Changes: - Remove pixContrastNorm calls from ocr.c (both main OCR and color detection passes) - these were causing more harm than good - Change default ocr_quantmode from 1 to 0 (no quantization) in both C code (ccx_common_option.c) and Rust code (options.rs) - Add NULL checks in dvbsub_close_decoder() and telxcc_close() for safety - Add proper cleanup of codec_private_data pointers in lib_ccx.c and ts_info.c to prevent double-free crashes Testing performed: - Test 21 (English DVB): Completes in ~1 second with good OCR quality - Test 239 (DVB timing): All 8 subtitles have correct timing - Spanish DVB (Issue #243): Now produces readable text like "¡Bienvenidos a la entrega anual de premios" instead of garbage Users can still use --quant 1 to restore the old quantization behavior if needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CCExtractor
CCExtractor is a tool used to produce subtitles for TV recordings from almost anywhere in the world. We intend to keep up with all sources and formats.
Subtitles are important for many people. If you're learning a new language, subtitles are a great way to learn it from movies or TV shows. If you are hard of hearing, subtitles can help you better understand what's happening on the screen. We aim to make it easy to generate subtitles by using the command line tool or Windows GUI.
The official repository is (CCExtractor/ccextractor) and master being the most stable branch.
Features
- Extract subtitles in real-time
- Translate subtitles
- Extract closed captions from DVDs
- Convert closed captions to subtitles
Programming Languages & Technologies
The core functionality is written in C. Other languages used include C++ and Python.
Installation and Usage
Downloads for precompiled binaries and source code can be found on our website.
Extracting subtitles is relatively simple. Just run the following command:
ccextractor <input>
This will extract the subtitles.
More usage information can be found on our website:
You can also find the list of parameters and their brief description by running ccextractor without any arguments.
You can find sample files on our website to test the software.
Compiling CCExtractor
To learn more about how to compile and build CCExtractor for your platform check the compilation guide.
Support
By far the best way to get support is by opening an issue at our issue tracker.
When you create a new issue, please fill in the needed details in the provided template. That makes it easier for us to help you more efficiently.
If you have a question or a problem you can also contact us by email or chat with the team in Slack.
If you want to contribute to CCExtractor but can't submit some code patches or issues or video samples, you can also donate to us
Contributing
You can contribute to the project by reporting issues, forking it, modifying the code and making a pull request to the repository. We have some rules, outlined in the contributor's guide.
News & Other Information
News about releases and modifications to the code can be found in the CHANGES.TXT file.
For more information visit the CCExtractor website: https://www.ccextractor.org
License
GNU General Public License version 2.0 (GPL-2.0)