Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Dec 12, 2016

WIP
i'm making this pull request right now to discuss what would be the best way to go about the changes.

@ghost
Copy link
Author

ghost commented Dec 12, 2016

No modifications have been made (yet) for raw mode since I could not find any suitable input files to test it.
From the discussion on codein.withgoogle.com, I was told to generate a raw input file from ccextractor itself.

However, this method did not work as ccextractor failed to produce the subtitles from a raw output file generated by the program itself.

The .raw output file seems unusually small in size and contains very little useful data.

ÿÿÿÿ<subpictures>
<stream>
<!-- input/inp.vob -->
</stream>
</subpictures>

Another bug I noticed was that out=bin does not create a meaningful subtitle file for a particular mp4 input.

@cfsmp3
Copy link
Contributor

cfsmp3 commented Dec 12, 2016

.mp4 is a very special case - it's not processed using the regular flow. Try a .ts if you want to produce .bin or .raw files. Both files contain only the CC data, so they're always going to be really small (a few KBs).

The variable wrote_something is not about having written anything physically to disk but to the 608 buffer if I recall correctly. It shouldn't take the return of write()

Also this function is going to be executed many times:
caps = encode_sub(enc_ctx, dec_sub);

So caps can go from 1 to 0... however once subtitles have been written then the final output should be 0 (assuming we return 0 if subtitles were found and non-zero to signal no subs).

Making a note of this in the decoder is quite clever though, probably the best place to do it.

I'm closing this PR now since it's not ready for merging, but I'd say you are in the right direction.

@cfsmp3 cfsmp3 closed this Dec 12, 2016
@ghost ghost changed the title return a non-zero return code if no subtitles were found return a non-zero return code if no subtitles were found - gci Dec 15, 2016
@ghost ghost changed the title return a non-zero return code if no subtitles were found - gci return a non-zero return code if no subtitles were found Dec 15, 2016
hrideshmg pushed a commit to hrideshmg/ccextractor that referenced this pull request Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants