[PR #1702] [FIX] Handle row_count decrease #2417

Open
opened 2026-01-29 17:22:02 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1702

State: closed
Merged: Yes


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

**Original Pull Request:** https://github.com/CCExtractor/ccextractor/pull/1702 **State:** closed **Merged:** Yes --- <!-- Please prefix your pull request with one of the following: **[FEATURE]** **[FIX]** **[IMPROVEMENT]**. --> **In raising this pull request, I confirm the following (please check boxes):** - [x] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [x] I have checked that another pull request for this purpose does not exist. - [x] I have considered, and confirmed that this submission will be valuable to others. - [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [x] I give this submission freely, and claim no ownership to its content. - [x] **I have mentioned this change in the [changelog](https://github.com/CCExtractor/ccextractor/blob/master/docs/CHANGES.TXT).** **My familiarity with the project is as follows (check one):** - [ ] I have never used CCExtractor. - [ ] I have used CCExtractor just a couple of times. - [x] 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](https://github.com/user-attachments/files/20718255/708.log) The cea708 log of the **fixed** ccExtractor is included here: [new_708.log](https://github.com/user-attachments/files/20718335/new_708.log) Expected captions: ![image](https://github.com/user-attachments/assets/2ee224de-0388-4e65-b734-677c0aced05c) ![image](https://github.com/user-attachments/assets/af6c54b8-37a6-4950-b55e-dcb78312c3ad)
claunia added the pull-request label 2026-01-29 17:22:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2417