Skip to content

[FIX] Handle row_count decrease #1702

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

moveman
Copy link

@moveman moveman commented Jun 13, 2025

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

We found ccextractor cannot handle row_count decreasing well. When row count decreases, the upper row should be displaced while the bottom row should be kept.
Before the fix, the srt is like this:

104
00:04:05,795 --> 00:04:06,295
{\an4}A roll-up caption's depth

105
00:04:07,296 --> 00:04:07,330
{\an4}A roll-up caption's depth

106
00:04:08,264 --> 00:04:08,297
{\an4}A roll-up caption's depth

107%  |  04:11
00:04:08,298 --> 00:04:12,034
{\an2}A roll-up caption's depth
displayed, like this.

108%  |  04:14
00:04:12,068 --> 00:04:14,770
{\an5}(CC1) Demonstration of
paint-on style captions:

After the fix, the srt is like this:

104
00:04:05,795 --> 00:04:06,295
{\an4}A roll-up caption's depth

105
00:04:07,296 --> 00:04:07,330
{\an4}A roll-up caption's depth
can be decreased after

106
00:04:08,264 --> 00:04:08,297
{\an2}can be decreased after
the caption has been

107%  |  04:11
00:04:08,298 --> 00:04:12,034
{\an2}the caption has been
displayed, like this.

108%  |  04:14
00:04:12,068 --> 00:04:14,770
{\an5}(CC1) Demonstration of
paint-on style captions:

The cea708 log of the original ccExtractor is included here:
708.log

The cea708 log of the fixed ccExtractor is included here:
new_708.log

Expected captions:
image
image

@cfsmp3
Copy link
Contributor

cfsmp3 commented Jun 13, 2025

LGTM, but be aware that since we are migrating to Rust it's possible this change gets lost if not ported.

@ccextractor-bot
Copy link
Collaborator

CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 5b327c7...:

Report Name Tests Passed
Broken 12/13
CEA-708 6/14
DVB 7/7
DVD 3/3
DVR-MS 2/2
General 12/27
Hauppage 3/3
MP4 3/3
NoCC 10/10
Options 83/86
Teletext 21/21
WTV 13/13
XDS 18/34

All tests passing on the master branch were passed completely.

NOTE: The following tests have been failing on the master branch as well as the PR:

Congratulations: Merging this PR would fix the following tests:


Check the result page for more info.

@ccextractor-bot
Copy link
Collaborator

CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 407d0f4...:

Report Name Tests Passed
Broken 11/13
CEA-708 7/14
DVB 2/7
DVD 0/3
DVR-MS 2/2
General 9/27
Hauppage 1/3
MP4 3/3
NoCC 10/10
Options 79/86
Teletext 4/21
WTV 10/13
XDS 15/34

All tests passing on the master branch were passed completely.

NOTE: The following tests have been failing on the master branch as well as the PR:

Congratulations: Merging this PR would fix the following tests:


Check the result page for more info.

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.

4 participants