Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First line should be blanked for NTSC with closed captions #401

Open
atsampson opened this issue Jan 6, 2020 · 4 comments
Open

First line should be blanked for NTSC with closed captions #401

atsampson opened this issue Jan 6, 2020 · 4 comments
Labels
enhancement ld-decode-tools An issue only affecting the ld-decode-tools

Comments

@atsampson
Copy link
Collaborator

NTSC closed caption data overlaps the first line of the active region, so it's visible (and distracting) in the output:

mpv-shot0252

If valid CC is detected in the video, ld-chroma-decoder should blank the first line, and ld-dropout-correct should ignore the first line, both for fixing dropouts and as a source of replacements.

I think the easiest way to do this would be to adjust the first line of the active region, checking that this doesn't change the output padding for ld-chroma-decoder. Currently the active range is hardcoded in all the tools that need to know it...

@atsampson atsampson added enhancement ld-decode-tools An issue only affecting the ld-decode-tools labels Jan 6, 2020
@simoninns
Copy link
Collaborator

Technically speaking; it's a deliberate feature of the closed caption system; it's placed in a visible line since it means any system/processing in between the viewer's closed caption decoder and the source should never remove it. I imagine a number of PC based players can generate subtitles based on it, although I've not checked. I guess the active region could be provided by ld-decode into the metadata; and the tools changed to use it instead of the hard-coded values.

@Gamnn
Copy link
Contributor

Gamnn commented Jan 8, 2020

My first thought is you can simply crop it out with ffmpeg or other tools if needed, but it's a fair point that it should be excluded from DOC stuff.

I'm not sure if any PC-based players can actually decode it at present. I think VLC includes libzvbi for decoding, but it only works when viewing from a capture card as it expects fields rather than frames, and only looks on line 21 of each field. Other players I've found that support CC require it attached in pre-decoded text form as metadata.

@atsampson
Copy link
Collaborator Author

The other reason for excluding it early is that you don't want ld-chroma-decoder's 2D/3D filters seeing it (since it would affect the decoded colour on the surrounding lines).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ld-decode-tools An issue only affecting the ld-decode-tools
Projects
None yet
Development

No branches or pull requests

4 participants
@atsampson @simoninns @Gamnn and others