[BUG] Burned-in subtitles failed / killed when detect italics #638

Closed
opened 2026-01-29 16:49:47 +00:00 by claunia · 10 comments
Owner

Originally created by @Hayholten on GitHub (Jun 8, 2021).

Hello everyone !

Hope you are wel ;)

CCExtractor version:

CCExtractor detailed version info
Version: 0.87
Git commit: Unknown
Compilation date: 2018-11-30
File SHA256: Could not open file
Libraries used by CCExtractor
Tesseract Version: 4.1.1
Leptonica Version: leptonica-1.79.0
libGPAC Version: 0.7.2-DEV
zlib: 1.2.11
utf8proc Version: 2.5.0
protobuf-c Version: 1.1.1
libpng Version: 1.6.34
FreeType
libhash
nuklear
libzvbi

In raising this issue, I confirm the following:

  • [ OK ] I have read and understood the contributors guide.
  • [ NOT SURE ] I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present.
  • [ OK ] I have checked that the issue I'm posting isn't already reported.
  • [ NOT SURE ] I have checked that the issue I'm porting isn't already solved and no duplicates exist in closed issues and in opened issues
  • [ OK ] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • [ OK ] I have used the latest available version of CCExtractor to verify this issue exists.
  • [ OK ] I have ticked all the boxes in this section and to prove it I'm deleting the section completely to remove boilerplate text.

Necessary information

  • Is this a regression (i.e. did it work before)? {NO}
  • What platform did you use? {Linux}
  • What were the used arguments?

ccextractor input.mp4 -ocrlang fra -out=webvtt -nobom -utf8 --nofontcolor -hardsubx -subcolor white -detect_italics -conf_thresh 60

Video links

https://drive.google.com/file/d/1ef-iiBtucK7qZQGzMuKMPsPn7ZBJp203/view?usp=sharing

Additional information

So here's the problem.

Everything starts well with CCExtractor until it encounters italic subtitles. In my example, it starts at 06:41 and every time, regardless of the settings, the process seems to be killed. Here is the log of my command:

HardsubX (Hard Subtitle Extractor) - Burned-in subtitle extraction subsystem
Input : ./Shadowz/WIP/Lifechanger.mp4
Subtitle Color : White
OCR Mode : Word-wise
OCR Confidence Threshold : 60.00
OCR Luminance Threshold : 95.00 (Default)
OCR Italic Detection : Off
Minimum subtitle duration : 0.5 seconds (Default)
FFMpeg Media Information:-
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './Shadowz/WIP/Lifechanger.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.45.100
Duration: 01:23:55.68, start: 0.000000, bitrate: 3335 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x800, 2689 kb/s, SAR 1:1 DAR 12:5, 23.98 fps, 23.98 tbr, 16k tbn, 47.95 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
Metadata:
handler_name : SoundHandler
Side data:
audio service type: main
Beginning burned-in subtitle detection...
7% | 06:41Killed

Can you help me with this problem? I should point out that even when I don't ask for italics, the issue still appears.

Thank you very much for your feedback.

Originally created by @Hayholten on GitHub (Jun 8, 2021). Hello everyone ! Hope you are wel ;) CCExtractor version: CCExtractor detailed version info Version: 0.87 Git commit: Unknown Compilation date: 2018-11-30 File SHA256: Could not open file Libraries used by CCExtractor Tesseract Version: 4.1.1 Leptonica Version: leptonica-1.79.0 libGPAC Version: 0.7.2-DEV zlib: 1.2.11 utf8proc Version: 2.5.0 protobuf-c Version: 1.1.1 libpng Version: 1.6.34 FreeType libhash nuklear libzvbi # In raising this issue, I confirm the following: - [ OK ] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [ NOT SURE ] I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present. - [ OK ] I have checked that the issue I'm posting isn't already reported. - [ NOT SURE ] I have checked that the issue I'm porting isn't already solved and no duplicates exist in [closed issues](https://github.com/CCExtractor/ccextractor/issues?q=is%3Aissue+is%3Aclosed) and in [opened issues](https://github.com/CCExtractor/ccextractor/issues) - [ OK ] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion. - [ OK ] I have used the latest available version of CCExtractor to verify this issue exists. - [ OK ] I have ticked all the boxes in this section and to prove it I'm deleting the section completely to remove boilerplate text. # Necessary information - Is this a regression (i.e. did it work before)? {NO} - What platform did you use? {Linux} - What were the used arguments? ccextractor input.mp4 -ocrlang fra -out=webvtt -nobom -utf8 --nofontcolor -hardsubx -subcolor white -detect_italics -conf_thresh 60 # Video links https://drive.google.com/file/d/1ef-iiBtucK7qZQGzMuKMPsPn7ZBJp203/view?usp=sharing # Additional information So here's the problem. Everything starts well with CCExtractor until it encounters italic subtitles. In my example, it starts at 06:41 and every time, regardless of the settings, the process seems to be killed. Here is the log of my command: > HardsubX (Hard Subtitle Extractor) - Burned-in subtitle extraction subsystem Input : ./Shadowz/WIP/Lifechanger.mp4 Subtitle Color : White OCR Mode : Word-wise OCR Confidence Threshold : 60.00 OCR Luminance Threshold : 95.00 (Default) OCR Italic Detection : Off Minimum subtitle duration : 0.5 seconds (Default) FFMpeg Media Information:- Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './Shadowz/WIP/Lifechanger.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.45.100 Duration: 01:23:55.68, start: 0.000000, bitrate: 3335 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x800, 2689 kb/s, SAR 1:1 DAR 12:5, 23.98 fps, 23.98 tbr, 16k tbn, 47.95 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(eng): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, 5.1(side), fltp, 640 kb/s (default) Metadata: handler_name : SoundHandler Side data: audio service type: main Beginning burned-in subtitle detection... 7% | 06:41Killed Can you help me with this problem? I should point out that even when I don't ask for italics, the issue still appears. Thank you very much for your feedback.
Author
Owner

@canihavesomecoffee commented on GitHub (Jun 8, 2021):

Have you tried with the latest version (0.88), or tried on the current master? The issue might be fixed on there already :)

@canihavesomecoffee commented on GitHub (Jun 8, 2021): Have you tried with the latest version (0.88), or tried on the current master? The issue might be fixed on there already :)
Author
Owner

@cfsmp3 commented on GitHub (Jun 8, 2021):

This is fixed on master:

CCExtractor 0.88, Carlos Fernandez Sanz, Volker Quetschke.
Teletext portions taken from Petr Kutalek's telxcc
--------------------------------------------------------------------------
Issues? Open a ticket here
https://github.com/CCExtractor/ccextractor/issues
cfsmp3@gsocdev5:~/ccextractor/linux$ ./ccextractor --version
CCExtractor 0.88, Carlos Fernandez Sanz, Volker Quetschke.
Teletext portions taken from Petr Kutalek's telxcc
--------------------------------------------------------------------------
CCExtractor detailed version info
        Version: 0.88
        Git commit: d81c692bbb31a8b8f6dd7f8e0606928501e0bb95
        Compilation date: 2021-06-08
        File SHA256: 92e795848121fae0cdbbfa5395db2d433513b05cf1f173fc70cf03bdade1d25e
Libraries used by CCExtractor
        Tesseract Version: 4.0.0
        Leptonica Version: leptonica-1.76.0
        libGPAC Version: 1.0.1
        zlib: 1.2.11
        utf8proc Version: 2.4.0
        protobuf-c Version: 1.3.1
        libpng Version: 1.6.37
        FreeType
        libhash
        nuklear
        libzvbi

@Hayholten see result file (attached).

Lifechanger-vtt.zip

@cfsmp3 commented on GitHub (Jun 8, 2021): This is fixed on master: ``` CCExtractor 0.88, Carlos Fernandez Sanz, Volker Quetschke. Teletext portions taken from Petr Kutalek's telxcc -------------------------------------------------------------------------- Issues? Open a ticket here https://github.com/CCExtractor/ccextractor/issues cfsmp3@gsocdev5:~/ccextractor/linux$ ./ccextractor --version CCExtractor 0.88, Carlos Fernandez Sanz, Volker Quetschke. Teletext portions taken from Petr Kutalek's telxcc -------------------------------------------------------------------------- CCExtractor detailed version info Version: 0.88 Git commit: d81c692bbb31a8b8f6dd7f8e0606928501e0bb95 Compilation date: 2021-06-08 File SHA256: 92e795848121fae0cdbbfa5395db2d433513b05cf1f173fc70cf03bdade1d25e Libraries used by CCExtractor Tesseract Version: 4.0.0 Leptonica Version: leptonica-1.76.0 libGPAC Version: 1.0.1 zlib: 1.2.11 utf8proc Version: 2.4.0 protobuf-c Version: 1.3.1 libpng Version: 1.6.37 FreeType libhash nuklear libzvbi ``` @Hayholten see result file (attached). [Lifechanger-vtt.zip](https://github.com/CCExtractor/ccextractor/files/6618664/Lifechanger-vtt.zip)
Author
Owner

@Hayholten commented on GitHub (Jun 8, 2021):

Hello again,

Many thanks for your answers ;)

@cfsmp3

Unfortunately, I tried everything to install a more recent version using the 3 proposed solutions.

I'm having a lot of problems with permissions, etc. I specify that I use a VM on Amazon AWS3. Could you help me?

Example:

ubuntu@ip-172-31-39-39:~/cc/linux$ ./build
Running pre-build script...
./build: line 63: ./pre-build.sh: Permission denied
Trying to compile...
Compiled with errors
In file included from ../src/lib_ccx/params.c:12:
../src/lib_ccx/compile_info.h:7:10: fatal error: compile_info_real.h: No such file or directory
7 | #include "compile_info_real.h"
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
../src/gpacmp4/os_config_init.c: In function 'create_default_config':
../src/gpacmp4/os_config_init.c:608:26: warning: 'gui.bt' directive writing 6 bytes into a region of size between 0 and 4095 [-Wformat-overflow=]
608 | sprintf(gui_path, "%s%cgui.bt", szPath, GF_PATH_SEPARATOR);
| ^~~~~~
../src/gpacmp4/os_config_init.c:608:3: note: 'sprintf' output between 8 and 4103 bytes into a destination of size 4096
608 | sprintf(gui_path, "%s%cgui.bt", szPath, GF_PATH_SEPARATOR);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/gpacmp4/os_config_init.c:618:26: warning: 'shaders' directive writing 7 bytes into a region of size between 0 and 4095 [-Wformat-overflow=]
618 | sprintf(gui_path, "%s%cshaders%cvertex.glsl", szPath, GF_PATH_SEPARATOR, GF_PATH_SEPARATOR);
| ^~~~~~~
../src/gpacmp4/os_config_init.c:618:3: note: 'sprintf' output between 21 and 4116 bytes into a destination of size 4096
618 | sprintf(gui_path, "%s%cshaders%cvertex.glsl", szPath, GF_PATH_SEPARATOR, GF_PATH_SEPARATOR);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/gpacmp4/os_config_init.c:620:26: warning: 'shaders' directive writing 7 bytes into a region of size between 0 and 4095 [-Wformat-overflow=]
620 | sprintf(gui_path, "%s%cshaders%cfragment.glsl", szPath, GF_PATH_SEPARATOR, GF_PATH_SEPARATOR);
| ^~~~~~~
../src/gpacmp4/os_config_init.c:620:3: note: 'sprintf' output between 23 and 4118 bytes into a destination of size 4096
620 | sprintf(gui_path, "%s%cshaders%cfragment.glsl", szPath, GF_PATH_SEPARATOR, GF_PATH_SEPARATOR);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@Hayholten commented on GitHub (Jun 8, 2021): Hello again, Many thanks for your answers ;) @cfsmp3 Unfortunately, I tried everything to install a more recent version using the 3 proposed solutions. I'm having a lot of problems with permissions, etc. I specify that I use a VM on Amazon AWS3. Could you help me? Example: > ubuntu@ip-172-31-39-39:~/cc/linux$ ./build Running pre-build script... ./build: line 63: ./pre-build.sh: Permission denied Trying to compile... Compiled with errors In file included from ../src/lib_ccx/params.c:12: ../src/lib_ccx/compile_info.h:7:10: fatal error: compile_info_real.h: No such file or directory 7 | #include "compile_info_real.h" | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. ../src/gpacmp4/os_config_init.c: In function 'create_default_config': ../src/gpacmp4/os_config_init.c:608:26: warning: 'gui.bt' directive writing 6 bytes into a region of size between 0 and 4095 [-Wformat-overflow=] 608 | sprintf(gui_path, "%s%cgui.bt", szPath, GF_PATH_SEPARATOR); | ^~~~~~ ../src/gpacmp4/os_config_init.c:608:3: note: 'sprintf' output between 8 and 4103 bytes into a destination of size 4096 608 | sprintf(gui_path, "%s%cgui.bt", szPath, GF_PATH_SEPARATOR); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/gpacmp4/os_config_init.c:618:26: warning: 'shaders' directive writing 7 bytes into a region of size between 0 and 4095 [-Wformat-overflow=] 618 | sprintf(gui_path, "%s%cshaders%cvertex.glsl", szPath, GF_PATH_SEPARATOR, GF_PATH_SEPARATOR); | ^~~~~~~ ../src/gpacmp4/os_config_init.c:618:3: note: 'sprintf' output between 21 and 4116 bytes into a destination of size 4096 618 | sprintf(gui_path, "%s%cshaders%cvertex.glsl", szPath, GF_PATH_SEPARATOR, GF_PATH_SEPARATOR); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/gpacmp4/os_config_init.c:620:26: warning: 'shaders' directive writing 7 bytes into a region of size between 0 and 4095 [-Wformat-overflow=] 620 | sprintf(gui_path, "%s%cshaders%cfragment.glsl", szPath, GF_PATH_SEPARATOR, GF_PATH_SEPARATOR); | ^~~~~~~ ../src/gpacmp4/os_config_init.c:620:3: note: 'sprintf' output between 23 and 4118 bytes into a destination of size 4096 620 | sprintf(gui_path, "%s%cshaders%cfragment.glsl", szPath, GF_PATH_SEPARATOR, GF_PATH_SEPARATOR); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Author
Owner

@cfsmp3 commented on GitHub (Jun 8, 2021):

@Hayholten Did you just clone that repo from master on a directory or was it unzipped or something strange?
That error mensajes that pre-build.sh is not executable (but it would be if it was a git clone).

Probably

chmod +x ./pre-build.sh

Will fix that specific problem.

@cfsmp3 commented on GitHub (Jun 8, 2021): @Hayholten Did you just clone that repo from master on a directory or was it unzipped or something strange? That error mensajes that pre-build.sh is not executable (but it would be if it was a git clone). Probably ``` chmod +x ./pre-build.sh ``` Will fix that specific problem.
Author
Owner

@Hayholten commented on GitHub (Jun 8, 2021):

@cfsmp3

Indeed, I had tried the installation by downloading the package and not by cloning the master.

Now, CCExtractor is installed ;)

But I still have a problem. When I run my command, I get the following message:

Parameter -hardsubx not understood

I tried to solve the problem by runing the command:

./build_hardsubx

And here is the result. A problem of library it seems to me...

~/ccextractor/linux$ ./build_hardsubx
Running pre-build script...
Obtaining Git commit
Storing variables in file
Commit: c09524d043
Date: 2021-06-08
Stored all in compile_info_real.h
Done.
Trying to compile...
Compiled with errors
In file included from ../src/ccextractor.h:21,
from ../src/ccextractor.c:6:
../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory
9 | #include <libavcodec/avcodec.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
../src/lib_ccx/hardsubx_decoder.c:6:10: fatal error: libavcodec/avcodec.h: No such file or directory
6 | #include <libavcodec/avcodec.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
../src/lib_ccx/hardsubx_utility.c:6:10: fatal error: libavcodec/avcodec.h: No such file or directory
6 | #include <libavcodec/avcodec.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ../src/lib_ccx/params.c:24:
../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory
9 | #include <libavcodec/avcodec.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
../src/lib_ccx/hardsubx_imgops.c:6:10: fatal error: libavcodec/avcodec.h: No such file or directory
6 | #include <libavcodec/avcodec.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ../src/lib_ccx/hardsubx.c:3:
../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory
9 | #include <libavcodec/avcodec.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ../src/ccextractor.h:21,
from ../src/lib_ccx/ccx_encoders_srt.c:7:
../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory
9 | #include <libavcodec/avcodec.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ../src/ccextractor.h:21,
from ../src/lib_ccx/ccx_encoders_common.c:10:
../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory
9 | #include <libavcodec/avcodec.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
../src/lib_ccx/hardsubx_classifier.c:6:10: fatal error: libavcodec/avcodec.h: No such file or directory
6 | #include <libavcodec/avcodec.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ../src/ccextractor.h:21,
from ../src/lib_ccx/output.c:2:
../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory
9 | #include <libavcodec/avcodec.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

@Hayholten commented on GitHub (Jun 8, 2021): @cfsmp3 Indeed, I had tried the installation by downloading the package and not by cloning the master. Now, CCExtractor is installed ;) But I still have a problem. When I run my command, I get the following message: > Parameter -hardsubx not understood I tried to solve the problem by runing the command: > ./build_hardsubx And here is the result. A problem of library it seems to me... > ~/ccextractor/linux$ ./build_hardsubx Running pre-build script... Obtaining Git commit Storing variables in file Commit: c09524d04384ec4337bbe876ac4f5a377bcc4440 Date: 2021-06-08 Stored all in compile_info_real.h Done. Trying to compile... Compiled with errors In file included from ../src/ccextractor.h:21, from ../src/ccextractor.c:6: ../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory 9 | #include <libavcodec/avcodec.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. ../src/lib_ccx/hardsubx_decoder.c:6:10: fatal error: libavcodec/avcodec.h: No such file or directory 6 | #include <libavcodec/avcodec.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. ../src/lib_ccx/hardsubx_utility.c:6:10: fatal error: libavcodec/avcodec.h: No such file or directory 6 | #include <libavcodec/avcodec.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ../src/lib_ccx/params.c:24: ../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory 9 | #include <libavcodec/avcodec.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. ../src/lib_ccx/hardsubx_imgops.c:6:10: fatal error: libavcodec/avcodec.h: No such file or directory 6 | #include <libavcodec/avcodec.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ../src/lib_ccx/hardsubx.c:3: ../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory 9 | #include <libavcodec/avcodec.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ../src/ccextractor.h:21, from ../src/lib_ccx/ccx_encoders_srt.c:7: ../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory 9 | #include <libavcodec/avcodec.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ../src/ccextractor.h:21, from ../src/lib_ccx/ccx_encoders_common.c:10: ../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory 9 | #include <libavcodec/avcodec.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. ../src/lib_ccx/hardsubx_classifier.c:6:10: fatal error: libavcodec/avcodec.h: No such file or directory 6 | #include <libavcodec/avcodec.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from ../src/ccextractor.h:21, from ../src/lib_ccx/output.c:2: ../src/lib_ccx/hardsubx.h:9:10: fatal error: libavcodec/avcodec.h: No such file or directory 9 | #include <libavcodec/avcodec.h> | ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
Author
Owner

@cfsmp3 commented on GitHub (Jun 8, 2021):

@Hayholten Make sure you read the relevant document - docs/HARDSUBX.TXT or something like that, it explains what you need to install.

@cfsmp3 commented on GitHub (Jun 8, 2021): @Hayholten Make sure you read the relevant document - docs/HARDSUBX.TXT or something like that, it explains what you need to install.
Author
Owner

@Hayholten commented on GitHub (Jun 9, 2021):

@cfsmp3

It took me hours (I am far from being an expert) but I think I am close. I first reinstalled FFmpeg because I use it a lot for other tasks.

It is present:

ffmpeg
ffmpeg version 4.4-1ubuntu020.04.sav0 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1
20.04)
configuration: --prefix=/usr --extra-version='1ubuntu0~20.04.sav0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample
--disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdav1d --enable-libzimg --enable-crystalhd --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

However, I still have an error that I can't identify:

./ccextractor ./Shadowz/WIP/Lifechanger.mp4 -ocrlang fra -out=webvtt -nobom -utf8 --nofontcolor -hardsubx -subcolor white -detect_italics -conf_thresh 60
CCExtractor 0.88, Carlos Fernandez Sanz, Volker Quetschke.
Teletext portions taken from Petr Kutalek's telxcc
HardsubX (Hard Subtitle Extractor) - Burned-in subtitle extraction subsystem
Input : ./Shadowz/WIP/Lifechanger.mp4
Subtitle Color : White
OCR Mode : Frame-wise (simple)
OCR Confidence Threshold : 60.00
OCR Luminance Threshold : 95.00 (Default)
OCR Italic Detection : On
Minimum subtitle duration : 0.5 seconds (Default)
FFMpeg Media Information:-
Error: Error reading input file!

Thanks again for all your help ;)

@Hayholten commented on GitHub (Jun 9, 2021): @cfsmp3 It took me hours (I am far from being an expert) but I think I am close. I first reinstalled FFmpeg because I use it a lot for other tasks. It is present: > ffmpeg ffmpeg version 4.4-1ubuntu0~20.04.sav0 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04) configuration: --prefix=/usr --extra-version='1ubuntu0~20.04.sav0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdav1d --enable-libzimg --enable-crystalhd --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Use -h to get full help or, even better, run 'man ffmpeg' However, I still have an error that I can't identify: > ./ccextractor ./Shadowz/WIP/Lifechanger.mp4 -ocrlang fra -out=webvtt -nobom -utf8 --nofontcolor -hardsubx -subcolor white -detect_italics -conf_thresh 60 CCExtractor 0.88, Carlos Fernandez Sanz, Volker Quetschke. Teletext portions taken from Petr Kutalek's telxcc HardsubX (Hard Subtitle Extractor) - Burned-in subtitle extraction subsystem Input : ./Shadowz/WIP/Lifechanger.mp4 Subtitle Color : White OCR Mode : Frame-wise (simple) OCR Confidence Threshold : 60.00 OCR Luminance Threshold : 95.00 (Default) OCR Italic Detection : On Minimum subtitle duration : 0.5 seconds (Default) FFMpeg Media Information:- Error: Error reading input file! Thanks again for all your help ;)
Author
Owner

@cfsmp3 commented on GitHub (Jun 9, 2021):

Typically that means that the input file doesn't exist or is not readable.

@cfsmp3 commented on GitHub (Jun 9, 2021): Typically that means that the input file doesn't exist or is not readable.
Author
Owner

@Hayholten commented on GitHub (Jun 9, 2021):

Hi @cfsmp3,

Thanks for your feedback.

It is however exactly the same file that you tested :/ And I have the same problem when testing with others.

When I go back to the procedure, I think that the "./build_hardsubx" did not work properly:

./build_hardsubx
Running pre-build script...
Obtaining Git commit
Storing variables in file
Commit: c09524d043
Date: 2021-06-09
Stored all in compile_info_real.h
Done.
Trying to compile...
../src/lib_ccx/hardsubx_decoder.c: In function 'hardsubx_process_frames_tickertext':
../src/lib_ccx/hardsubx_decoder.c:385:4: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations]
385 | avcodec_decode_video2(ctx->codec_ctx, ctx->frame, &got_frame, &ctx->packet);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ../src/lib_ccx/hardsubx_decoder.c:6:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3096:5: note: declared here
3096 | int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
| ^~~~~~~~~~~~~~~~~~~~~
../src/lib_ccx/hardsubx_decoder.c: In function 'hardsubx_process_frames_linear':
../src/lib_ccx/hardsubx_decoder.c:437:4: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations]
437 | avcodec_decode_video2(ctx->codec_ctx, ctx->frame, &got_frame, &ctx->packet);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ../src/lib_ccx/hardsubx_decoder.c:6:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3096:5: note: declared here
3096 | int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
| ^~~~~~~~~~~~~~~~~~~~~
../src/lib_ccx/hardsubx_decoder.c: In function 'hardsubx_process_frames_binary':
../src/lib_ccx/hardsubx_decoder.c:571:6: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations]
571 | avcodec_decode_video2(ctx->codec_ctx, ctx->frame, &got_frame, &ctx->packet);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ../src/lib_ccx/hardsubx_decoder.c:6:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3096:5: note: declared here
3096 | int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
| ^~~~~~~~~~~~~~~~~~~~~
../src/lib_ccx/hardsubx.c: In function 'hardsubx_process_data':
../src/lib_ccx/hardsubx.c:16:2: warning: 'av_register_all' is deprecated [-Wdeprecated-declarations]
16 | av_register_all();
| ^~~~~~~~~~~~~~~
In file included from ../src/lib_ccx/hardsubx.h:10,
from ../src/lib_ccx/hardsubx.c:3:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:1955:6: note: declared here
1955 | void av_register_all(void);
| ^~~~~~~~~~~~~~~
../src/lib_ccx/hardsubx.c:35:3: warning: 'codec' is deprecated [-Wdeprecated-declarations]
35 | if (ctx->format_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
| ^~
In file included from ../src/lib_ccx/hardsubx.h:10,
from ../src/lib_ccx/hardsubx.c:3:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
../src/lib_ccx/hardsubx.c:46:2: warning: 'codec' is deprecated [-Wdeprecated-declarations]
46 | ctx->codec_ctx = ctx->format_ctx->streams[ctx->video_stream_id]->codec;
| ^~~
In file included from ../src/lib_ccx/hardsubx.h:10,
from ../src/lib_ccx/hardsubx.c:3:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
../src/lib_ccx/hardsubx.c: In function '_init_hardsubx':
../src/lib_ccx/hardsubx.c:224:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
224 | char *lang = options->ocrlang;
| ^~~~~~~
Compilation successful, compiler message shown in previous lines

Not being an expert, it was much easier for me to run a "sudo apt install" (that's why I was working on the old version).

But I'm still investigating ;)

@Hayholten commented on GitHub (Jun 9, 2021): Hi @cfsmp3, Thanks for your feedback. It is however exactly the same file that you tested :/ And I have the same problem when testing with others. When I go back to the procedure, I think that the "./build_hardsubx" did not work properly: > ./build_hardsubx Running pre-build script... Obtaining Git commit Storing variables in file Commit: c09524d04384ec4337bbe876ac4f5a377bcc4440 Date: 2021-06-09 Stored all in compile_info_real.h Done. Trying to compile... ../src/lib_ccx/hardsubx_decoder.c: In function 'hardsubx_process_frames_tickertext': ../src/lib_ccx/hardsubx_decoder.c:385:4: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations] 385 | avcodec_decode_video2(ctx->codec_ctx, ctx->frame, &got_frame, &ctx->packet); | ^~~~~~~~~~~~~~~~~~~~~ In file included from ../src/lib_ccx/hardsubx_decoder.c:6: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3096:5: note: declared here 3096 | int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, | ^~~~~~~~~~~~~~~~~~~~~ ../src/lib_ccx/hardsubx_decoder.c: In function 'hardsubx_process_frames_linear': ../src/lib_ccx/hardsubx_decoder.c:437:4: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations] 437 | avcodec_decode_video2(ctx->codec_ctx, ctx->frame, &got_frame, &ctx->packet); | ^~~~~~~~~~~~~~~~~~~~~ In file included from ../src/lib_ccx/hardsubx_decoder.c:6: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3096:5: note: declared here 3096 | int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, | ^~~~~~~~~~~~~~~~~~~~~ ../src/lib_ccx/hardsubx_decoder.c: In function 'hardsubx_process_frames_binary': ../src/lib_ccx/hardsubx_decoder.c:571:6: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations] 571 | avcodec_decode_video2(ctx->codec_ctx, ctx->frame, &got_frame, &ctx->packet); | ^~~~~~~~~~~~~~~~~~~~~ In file included from ../src/lib_ccx/hardsubx_decoder.c:6: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:3096:5: note: declared here 3096 | int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, | ^~~~~~~~~~~~~~~~~~~~~ ../src/lib_ccx/hardsubx.c: In function 'hardsubx_process_data': ../src/lib_ccx/hardsubx.c:16:2: warning: 'av_register_all' is deprecated [-Wdeprecated-declarations] 16 | av_register_all(); | ^~~~~~~~~~~~~~~ In file included from ../src/lib_ccx/hardsubx.h:10, from ../src/lib_ccx/hardsubx.c:3: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:1955:6: note: declared here 1955 | void av_register_all(void); | ^~~~~~~~~~~~~~~ ../src/lib_ccx/hardsubx.c:35:3: warning: 'codec' is deprecated [-Wdeprecated-declarations] 35 | if (ctx->format_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) | ^~ In file included from ../src/lib_ccx/hardsubx.h:10, from ../src/lib_ccx/hardsubx.c:3: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:888:21: note: declared here 888 | AVCodecContext *codec; | ^~~~~ ../src/lib_ccx/hardsubx.c:46:2: warning: 'codec' is deprecated [-Wdeprecated-declarations] 46 | ctx->codec_ctx = ctx->format_ctx->streams[ctx->video_stream_id]->codec; | ^~~ In file included from ../src/lib_ccx/hardsubx.h:10, from ../src/lib_ccx/hardsubx.c:3: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:888:21: note: declared here 888 | AVCodecContext *codec; | ^~~~~ ../src/lib_ccx/hardsubx.c: In function '_init_hardsubx': ../src/lib_ccx/hardsubx.c:224:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 224 | char *lang = options->ocrlang; | ^~~~~~~ Compilation successful, compiler message shown in previous lines Not being an expert, it was much easier for me to run a "sudo apt install" (that's why I was working on the old version). But I'm still investigating ;)
Author
Owner

@Hayholten commented on GitHub (Jun 9, 2021):

Hi everyone ;)

Spend half a day to figure how to install CCExtractor.

Unfortunately, nothing...

I checked what I could and everything seems to be installed but whatever file I used, error :/

I use Ubuntu focal. Do you know if there is a method to install the software via another distribution?

Like tis one: https://packages.ubuntu.com/groovy/ccextractor

It's much easier to install and all the dependencies are done automatically, if I understand correctly.

And for info:

CCExtractor detailed version info
Version: 0.88
Git commit: c09524d043
Compilation date: 2021-06-09
File SHA256: 3aa7813b1594a485986c06feaa43539ab892b9af239ea4cb4eef6d00e3194c5e
Libraries used by CCExtractor
Tesseract Version: 4.1.1
Leptonica Version: leptonica-1.79.0
libGPAC Version: 1.0.1
zlib: 1.2.11
utf8proc Version: 2.4.0
protobuf-c Version: 1.3.1
libpng Version: 1.6.37
FreeType
libhash
nuklear
libzvbi

Thanks ;)

@Hayholten commented on GitHub (Jun 9, 2021): Hi everyone ;) Spend half a day to figure how to install CCExtractor. Unfortunately, nothing... I checked what I could and everything seems to be installed but whatever file I used, error :/ I use Ubuntu focal. Do you know if there is a method to install the software via another distribution? Like tis one: [https://packages.ubuntu.com/groovy/ccextractor](https://packages.ubuntu.com/groovy/ccextractor) It's much easier to install and all the dependencies are done automatically, if I understand correctly. And for info: > CCExtractor detailed version info Version: 0.88 Git commit: c09524d04384ec4337bbe876ac4f5a377bcc4440 Compilation date: 2021-06-09 File SHA256: 3aa7813b1594a485986c06feaa43539ab892b9af239ea4cb4eef6d00e3194c5e Libraries used by CCExtractor Tesseract Version: 4.1.1 Leptonica Version: leptonica-1.79.0 libGPAC Version: 1.0.1 zlib: 1.2.11 utf8proc Version: 2.4.0 protobuf-c Version: 1.3.1 libpng Version: 1.6.37 FreeType libhash nuklear libzvbi Thanks ;)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#638