mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PROPOSAL] Process closed captions and burned-in subtitles in one pass #300
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cfsmp3 on GitHub (Mar 22, 2017).
There's some subs that have both closed captions and burned-in subtitles. This happens typically when part of the audio is in English (which is closed captions so the viewers can enable/disable them) while part of the audio is in a different language, which is subtitled for everyone.
A very good example is the Americans, in which a good portion of the audio is in Russian.
This task gives ENOUGH points to qualify for GSoC. If you're proposal is good and your code to get this done gets merged, you're in.
@cfsmp3 commented on GitHub (Apr 12, 2017):
A sample video:
@saurabhshah0410 commented on GitHub (Dec 21, 2017):
Is this issue still open?
@cfsmp3 commented on GitHub (Dec 22, 2017):
Yes.
On Thu, Dec 21, 2017 at 1:31 PM, Saurabh Shah notifications@github.com
wrote:
@thealphadollar commented on GitHub (Feb 8, 2018):
@cfsmp3 I would like to work on this. Can you please give me some tips for the solution?
@cfsmp3 commented on GitHub (Feb 9, 2018):
@thealphadollar First download the sample file we have for it, extract the subtitles in two passes (one for burned-in and one for closed captions), and then figure out how to do everything in one pass :-)
@saurabhshah0410 commented on GitHub (Feb 26, 2018):
@cfsmp3 After running ccextractor once on files like these, and having extracted the closed captions as well as hard subtitles, can you clarify if the result should be a single file with both closed captions and hard subtitles, or two separate files which contain the closed captions and hard subtitles respectively?
@cfsmp3 commented on GitHub (Feb 26, 2018):
The result needs to be a single file that contains both kind of subtitles.
On Mon, Feb 26, 2018 at 5:37 AM, Saurabh Shah notifications@github.com
wrote:
@saurabhshah0410 commented on GitHub (Feb 26, 2018):
Thanks for clarifying this @cfsmp3 . :-)
@saurabhshah0410 commented on GitHub (Feb 27, 2018):
I think we should add a new option, something like
hcc(hard and closed captions) or whatever name you suggest, which when given would process hard subs and closed captions in one pass. What do you think?@cfsmp3 commented on GitHub (Feb 27, 2018):
Yes, it's a good idea - we need the user to specify that he wants to
process both things, we cannot be looking for hard subs by default.
On Mon, Feb 26, 2018 at 10:47 PM, Saurabh Shah notifications@github.com
wrote:
@saurabhshah0410 commented on GitHub (Feb 27, 2018):
Thanks, just wanted to be sure about it. Just to play the devil's advocate: If a user gives both the switches:
-hardsubxand-hcc, should we process both hard subs and closed captions? Basically, does-hcctakes precedence over anything else(like-hardsubx)?@cfsmp3 commented on GitHub (Feb 27, 2018):
If -hcc means both then do both :-)
I don't think -hardsubx and -hcc would be mutually exclusive since they're
not incompatible in their meaning.
On Mon, Feb 26, 2018 at 11:20 PM, Saurabh Shah notifications@github.com
wrote:
@saurabhshah0410 commented on GitHub (Feb 27, 2018):
Yeah okay. That makes sense, thanks!
@saurabhshah0410 commented on GitHub (Mar 4, 2018):
@cfsmp3 What should be written to the output file if in a particular interval of time from t1 to t2, the video contains both hard subtitles and closed captions?
Although such a scenario would be very rare, as you wouldn't normally have closed captions as well as hard subs having overlapping time intervals, but if it happens, what should be done in case of an overlap between the burned in and closed captions?
Should it be like:
or
Or something else?
@cfsmp3 commented on GitHub (Mar 5, 2018):
Maybe check if they are the same (likely) and then display it just once.
If they're different display in any order, not really important.
@thealphadollar commented on GitHub (Apr 12, 2018):
@cfsmp3 I would request you to provide another sample for the same since the sample provided gives error, log report here.
I'll look into the error by myself and, if needed, file an issue for the same.
@cfsmp3 commented on GitHub (Apr 18, 2018):
Those are just harmless warnings.
If you can play the file in VLC then assume the file is correct (which it
is) and that it's us who may have a problem.
On Wed, Apr 11, 2018 at 9:03 PM, Shivam Kumar Jha notifications@github.com
wrote:
@cfsmp3 commented on GitHub (Dec 27, 2018):
Update: This task gives ENOUGH points to qualify for GSoC. If you're proposal is good and your code to get this done gets merged, you're in.
@samrat2825 commented on GitHub (Mar 26, 2021):
Does a approach where in the background two .srt files, for both cc and burned-in, are independently generated and are combined in the end using timestamp, via a single command from terminal, is outputted as a single file qualify?
@cfsmp3 commented on GitHub (Mar 28, 2021):
No. That's the lazy approach :-)
@cfsmp3 commented on GitHub (Feb 18, 2022):
Video link again:
https://drive.google.com/file/d/0B_61ywKPmI0TeU5rOTlCMWxKbW8/view?usp=sharing&resourcekey=0-nZ9e7M3yhB6099__xP8ofw
@shashwat1002 commented on GitHub (Feb 19, 2022):
Hi, I tried running the compiled source code on the examples with the command (in the build directory)
./ccextractor -hardsubx -subcolor yellow ~/Downloads/the.americans.s05.e06-original.unedited.from.hdhomerun.ts -conf_thresh 50 -ocr_mode wordand I get the following set of failures
It seems to be a segmentation fault.
I haven't yet looked at the source code and was just looking at basic input and output. Before I dive deep, is there something I'm doing very obviously wrong in running it on the test file?
Any advice is appreciated.
@cfsmp3 commented on GitHub (Feb 19, 2022):
No, a segfault is never the user's fault :-)
Go dive! :-)
@shashwat1002 commented on GitHub (Feb 20, 2022):
Hi, I ran a debug build on two different samples and received a segmentation fault in the same place.
Given that I can't work on this issue until the segmentation faults are resolved, would it be more appropriate to start a new issue?
@cfsmp3
Edit: interestingly enough, the fault happens at
ccx_common_logging.debug_ftn(CCX_DMT_708, "[CEA-708] dtvcc_writer_init\n");and when that line is commented
causes the segmentation fault.
both of which seem to be debug logs related.
is it possible that my build is at fault here?
@cfsmp3 commented on GitHub (Feb 20, 2022):
Well, you can work on fixing that segfault, which seems trivial :-)
I'd recommend to build it with debug info and run with valgrind. It will tell exactly what's going on.
@shashwat1002 commented on GitHub (Mar 7, 2022):
Hello,
I feel that this proposal will require making a struct that is in some way a general form of
struct lib_ccx_ctxandstruct lib_hardsubx_ctxwith relevant attributes from both.Does that sound feasible right now?
Would it be wise for me to go ahead with it?
@cfsmp3 commented on GitHub (Mar 8, 2022):
Maybe you can just pass both as needed instead of creating a new one?
Sure. Give it a go - there's several approaches, go with the one you feel more comfortable with, we can always iterate once you have something working.