Fix raw caption file processing that would stop at exactly 9:43:00 (2MB). Root causes and fixes: 1. Premature EOF: After processing first chunk (BUFSIZE ~2MB), data->len was never reset. On next iteration, general_get_more_data() calculated want = BUFSIZE - len = 0 and returned EOF immediately. Fix: Reset data->len = 0 after each chunk and change loop condition. 2. 32-bit integer overflow: The calculation cb_field1 * 1001 / 30 * 90 overflowed for large cb_field1 values (>1M). For example, 34,989,487 * 90 = 3,149,053,830 exceeds 32-bit signed max. Fix: Cast cb_field1 to LLONG before multiplication. 3. Timing initialization: Raw mode needs min_pts=0, sync_pts=0, and pts_set=MinPtsSet for correct fts_now calculation. Tested with sample files from issue #1565: - DTV3.raw: Now processes to 17:59:56 (was stopping at 9:43) - DTV4.raw: Now processes to 14:00:00 (was stopping at 9:43) - DTV5.raw: Now processes to 13:19:59 (was stopping at 9:43) Closes #1565 🤖 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)