732b20aefa
* file_buffer: Fix unitialized variable usage warning Clang warns: In file included from src/lib_ccx/asf_functions.c:5: src/lib_ccx/file_buffer.h:76:7: warning: variable 'result' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (buffer) ^~~~~~ src/lib_ccx/file_buffer.h:86:9: note: uninitialized use occurs here return result; ^~~~~~ src/lib_ccx/file_buffer.h:76:3: note: remove the 'if' if its condition is always true if (buffer) ^~~~~~~~~~~ src/lib_ccx/file_buffer.h:73:15: note: initialize the variable 'result' to silence this warning size_t result; ^ = 0 * common_timing: Fix uninitialized variable usage warning The vast majority of the code is already using fatal(), so I don't see why this should be an exception. Clang warns: src/lib_ccx/ccx_common_timing.c:274:3: warning: variable 'fts' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ src/lib_ccx/ccx_common_timing.c:280:9: note: uninitialized use occurs here return fts; ^~~ src/lib_ccx/ccx_common_timing.c:261:11: note: initialize the variable 'fts' to silence this warning LLONG fts; ^ = 0 * encoders: Fix handling of multibyte characters in UTF-8 converter This is actually incorrect because characters longer than 1 byte will be butchered. Clang warns: src/lib_ccx/ccx_encoders_common.c:178:12: warning: result of comparison of constant 256 with expression of type 'unsigned char' is always true [-Wtautological-constant-out-of-range-compare] if (c < 256) ~ ^ ~~~ src/lib_ccx/ccx_encoders_common.c:193:12: warning: result of comparison of constant 256 with expression of type 'unsigned char' is always true [-Wtautological-constant-out-of-range-compare] if (c < 256) ~ ^ ~~~ src/lib_ccx/ccx_encoders_common.c:209:12: warning: result of comparison of constant 256 with expression of type 'unsigned char' is always true [-Wtautological-constant-out-of-range-compare] if (c < 256) ~ ^ ~~~ src/lib_ccx/ccx_encoders_common.c:229:12: warning: result of comparison of constant 256 with expression of type 'unsigned char' is always true [-Wtautological-constant-out-of-range-compare] if (c < 256) ~ ^ ~~~ * gxf: Fix tautological comparison warnings Clang warns: src/lib_ccx/ccx_gxf.c:425:17: warning: result of comparison of constant 256 with expression of type 'unsigned char' is always false [-Wtautological-constant-out-of-range-compare] if (tag_len > STR_LEN) ~~~~~~~ ^ ~~~~~~~ src/lib_ccx/ccx_gxf.c:542:17: warning: result of comparison of constant 256 with expression of type 'unsigned char' is always false [-Wtautological-constant-out-of-range-compare] if (tag_len > STR_LEN) ~~~~~~~ ^ ~~~~~~~ src/lib_ccx/ccx_gxf.c:617:17: warning: result of comparison of constant 256 with expression of type 'unsigned char' is always false [-Wtautological-constant-out-of-range-compare] if (tag_len > STR_LEN) ~~~~~~~ ^ ~~~~~~~ * gxf: Fix uninitialized variable usage warnings Clang warns: src/lib_ccx/ccx_gxf.c:1449:8: warning: variable 'first_field_nb' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case TRACK_TYPE_MPEG1_525: ^~~~~~~~~~~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:1475:35: note: uninitialized use occurs here debug("first field number %d\n", first_field_nb); ^~~~~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:28:115: note: expanded from macro 'debug' ^~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:1450:8: warning: variable 'first_field_nb' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case TRACK_TYPE_MPEG2_525: ^~~~~~~~~~~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:1475:35: note: uninitialized use occurs here debug("first field number %d\n", first_field_nb); ^~~~~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:28:115: note: expanded from macro 'debug' ^~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:1456:3: warning: variable 'first_field_nb' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ src/lib_ccx/ccx_gxf.c:1475:35: note: uninitialized use occurs here debug("first field number %d\n", first_field_nb); ^~~~~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:28:115: note: expanded from macro 'debug' ^~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:1410:30: note: initialize the variable 'first_field_nb' to silence this warning unsigned char first_field_nb; ^ = '\0' src/lib_ccx/ccx_gxf.c:1449:8: warning: variable 'last_field_nb' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case TRACK_TYPE_MPEG1_525: ^~~~~~~~~~~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:1476:34: note: uninitialized use occurs here debug("last field number %d\n", last_field_nb); ^~~~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:28:115: note: expanded from macro 'debug' ^~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:1450:8: warning: variable 'last_field_nb' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case TRACK_TYPE_MPEG2_525: ^~~~~~~~~~~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:1476:34: note: uninitialized use occurs here debug("last field number %d\n", last_field_nb); ^~~~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:28:115: note: expanded from macro 'debug' ^~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:1456:3: warning: variable 'last_field_nb' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ src/lib_ccx/ccx_gxf.c:1476:34: note: uninitialized use occurs here debug("last field number %d\n", last_field_nb); ^~~~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:28:115: note: expanded from macro 'debug' ^~~~~~~~~~~ src/lib_ccx/ccx_gxf.c:1411:29: note: initialize the variable 'last_field_nb' to silence this warning unsigned char last_field_nb; ^ = '\0' * ts_functions: Fix incorrect enumeration type in get_buffer_type Clang warns: src/lib_ccx/ts_functions.c:127:10: warning: implicit conversion from enumeration type 'enum ccx_bufferdata_type' to different enumeration type 'enum ccx_stream_type' [-Wenum-conversion] return CCX_PES; ~~~~~~ ^~~~~~~ src/lib_ccx/ts_functions.c:131:10: warning: implicit conversion from enumeration type 'enum ccx_bufferdata_type' to different enumeration type 'enum ccx_stream_type' [-Wenum-conversion] return CCX_H264; ~~~~~~ ^~~~~~~~ src/lib_ccx/ts_functions.c:135:10: warning: implicit conversion from enumeration type 'enum ccx_bufferdata_type' to different enumeration type 'enum ccx_stream_type' [-Wenum-conversion] return CCX_DVB_SUBTITLE; ~~~~~~ ^~~~~~~~~~~~~~~~ src/lib_ccx/ts_functions.c:139:10: warning: implicit conversion from enumeration type 'enum ccx_bufferdata_type' to different enumeration type 'enum ccx_stream_type' [-Wenum-conversion] return CCX_ISDB_SUBTITLE; ~~~~~~ ^~~~~~~~~~~~~~~~~ src/lib_ccx/ts_functions.c:143:10: warning: implicit conversion from enumeration type 'enum ccx_bufferdata_type' to different enumeration type 'enum ccx_stream_type' [-Wenum-conversion] return CCX_HAUPPAGE; ~~~~~~ ^~~~~~~~~~~~ src/lib_ccx/ts_functions.c:147:10: warning: implicit conversion from enumeration type 'enum ccx_bufferdata_type' to different enumeration type 'enum ccx_stream_type' [-Wenum-conversion] return CCX_TELETEXT; ~~~~~~ ^~~~~~~~~~~~ src/lib_ccx/ts_functions.c:151:10: warning: implicit conversion from enumeration type 'enum ccx_bufferdata_type' to different enumeration type 'enum ccx_stream_type' [-Wenum-conversion] return CCX_PRIVATE_MPEG2_CC; ~~~~~~ ^~~~~~~~~~~~~~~~~~~~ src/lib_ccx/ts_functions.c:155:10: warning: implicit conversion from enumeration type 'enum ccx_bufferdata_type' to different enumeration type 'enum ccx_stream_type' [-Wenum-conversion] return CCX_PES; ~~~~~~ ^~~~~~~ src/lib_ccx/ts_functions.c:491:24: warning: implicit conversion from enumeration type 'enum ccx_stream_type' to different enumeration type 'enum ccx_bufferdata_type' [-Wenum-conversion] ptr->bufferdatatype = get_buffer_type(cinfo); ~ ^~~~~~~~~~~~~~~~~~~~~~ * utility: Fix tautological comparison warnings Clang warns: src/lib_ccx/utility.c:605:24: warning: result of comparison of constant 65536 with expression of type 'unsigned short' is always true [-Wtautological-constant-out-of-range-compare] } else if (utf16_char < 0x010000) { ~~~~~~~~~~ ^ ~~~~~~~~ src/lib_ccx/utility.c:610:24: warning: result of comparison of constant 1114112 with expression of type 'unsigned short' is always true [-Wtautological-constant-out-of-range-compare] } else if (utf16_char < 0x110000) { ~~~~~~~~~~ ^ ~~~~~~~~ * ocr: Fix floating point -> integer abs() warning Clang warns: src/lib_ccx/ocr.c:529:8: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value] if(abs(h-h0)>50) // Color has changed ^ src/lib_ccx/ocr.c:529:8: note: use function 'fabsf' instead if(abs(h-h0)>50) // Color has changed ^~~ fabsf src/lib_ccx/ocr.c:529:8: note: include the header <math.h> or explicitly provide a declaration for 'fabsf' * encoders: Fix incorrect string types when EIA-608 is in use Clang warns: src/lib_ccx/ccx_encoders_helpers.c: In function ‘clever_capitalize’: src/lib_ccx/ccx_encoders_helpers.c:186:4: warning: case label value exceeds maximum value for type 186 | case 0x89: // This is a transparent space | ^~~~ * ocr: Fix implicit struct declaration warning Clang warns: In file included from src/lib_ccx/dvd_subtitle_decoder.c:10: src/lib_ccx/ocr.h:18:54: warning: ‘struct encoder_ctx’ declared inside parameter list will not be visible outside of this definition or declaration 18 | char *paraof_ocrtext(struct cc_subtitle *sub, struct encoder_ctx *context); | ^~~~~~~~~~~ |
||
---|---|---|
.github | ||
api | ||
Dictionary | ||
docs | ||
fonts | ||
gsoc/skrill | ||
icon | ||
linux | ||
mac | ||
OpenBSD | ||
package_creators | ||
src | ||
tests | ||
tools | ||
windows | ||
.gitignore | ||
.travis.yml | ||
LICENSE.txt | ||
README.md | ||
Vagrantfile |
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 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)