[BUG] Incorrect Time Code Computation #636

Closed
opened 2026-01-29 16:49:41 +00:00 by claunia · 4 comments
Owner

Originally created by @shubham162019 on GitHub (May 31, 2021).

CCExtractor version: 0.88

In raising this issue, I confirm the following:

  • I have read and understood the contributors guide.
  • I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present.
  • I have checked that the issue I'm posting isn't already reported.
  • I have checked that the issue I'm porting isn't already solved and no duplicates exist in closed issues and in opened issues
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • I have used the latest available version of CCExtractor to verify this issue exists.
  • I have ticked all the boxes in this section and to prove it I'm deleting the section completely to remove boilerplate text.

Necessary information

  • Is this a regression (i.e. did it work before)? NO
  • What platform did you use? Linux
  • What were the used arguments? ./ccextractor -df -out=scc "Sample_Video_CC.mxf" -o out.scc

Video links

Additional information

Since this is a 29.97 drop frame asset, the timecode cannot exceed 29 frames, but in the below output there are instances where the output timecode has mentions of "00:00:09:31","00:00:19:30".

The output of the above command.

Scenarist_SCC V1.0

00:00:00:28 9420 94f2 97a2 a820 68e5 6176 7920 f2ef e36b 206d 7573 e9e3 2029 942f 94ae

00:00:02:29 942c

00:00:03:17 9420 94d0 5b61 6e6e ef75 6ee3 e5f2 5d20 5768 61f4 2064 ef20 79ef 7520 ecef ef6b 20e6 eff2 94f2 97a1 e96e 2061 20f2 e5e3 eff2 64e9 6e67 2073 f475 64e9 efbf 942f 94ae

00:00:06:07 942c

00:00:06:09 9420 94f2 9723 c7f2 e561 f420 64f2 756d 20f4 ef6e e573 bf80 942f 94ae

00:00:08:06 942c

00:00:08:07 9420 94f2 9723 43ec e561 6e20 76ef e361 ec20 f461 6be5 73bf 942f 94ae

00:00:09:31 942c

00:00:10:16 9420 94f2 c16e 20e5 f870 e5f2 e9e5 6ee3 e564 20e5 6e67 e96e e5e5 f2bf 942f 94ae

00:00:12:17 942c

00:00:13:07 9420 94d0 9723 c1f4 20ce e567 61f4 e976 e520 d370 61e3 e520 d3f4 7564 e9ef 7380 94f4 97a2 e96e 20c2 61ec f4e9 6def f2e5 942f 94ae

00:00:15:21 942c

00:00:15:23 9420 9470 97a1 f7e5 2061 f2e5 20e3 ef6d 6de9 f4f4 e564 20f4 ef20 70f2 ef76 e964 e96e 6780 942f 94ae

00:00:17:03 942c

00:00:17:05 9420 9454 97a2 68e9 6768 adf1 7561 ece9 f479 94f2 97a2 f2e5 e3ef 64e9 6e67 2061 6e64 206d e9f8 e96e 67ae 942f 94ae

00:00:19:28 942c

00:00:19:30 9420 9452 4ce5 f420 7573 2073 68ef f720 79ef 7520 68ef f720 67ef ef64 94f2 97a1 79ef 75f2 206d 7573 e9e3 20e3 616e 2073 ef75 6e64 ae80 942f 94ae

00:00:22:29 942c

Originally created by @shubham162019 on GitHub (May 31, 2021). CCExtractor version: 0.88 # In raising this issue, I confirm the following: - [ ] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [ ] I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present. - [ ] I have checked that the issue I'm posting isn't already reported. - [ ] I have checked that the issue I'm porting isn't already solved and no duplicates exist in [closed issues](https://github.com/CCExtractor/ccextractor/issues?q=is%3Aissue+is%3Aclosed) and in [opened issues](https://github.com/CCExtractor/ccextractor/issues) - [ ] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion. - [ ] I have used the latest available version of CCExtractor to verify this issue exists. - [ ] I have ticked all the boxes in this section and to prove it I'm deleting the section completely to remove boilerplate text. # Necessary information - Is this a regression (i.e. did it work before)? NO - What platform did you use? Linux - What were the used arguments? ./ccextractor -df -out=scc "Sample_Video_CC.mxf" -o out.scc # Video links * https://drive.google.com/file/d/0B83Wr3EZXIYnS1cwZ2dYcWVYMEU/view # Additional information Since this is a 29.97 drop frame asset, the timecode cannot exceed 29 frames, but in the below output there are instances where the output timecode has mentions of "00:00:09:31","00:00:19:30". The output of the above command. Scenarist_SCC V1.0 > 00:00:00:28 9420 94f2 97a2 a820 68e5 6176 7920 f2ef e36b 206d 7573 e9e3 2029 942f 94ae > > 00:00:02:29 942c > > 00:00:03:17 9420 94d0 5b61 6e6e ef75 6ee3 e5f2 5d20 5768 61f4 2064 ef20 79ef 7520 ecef ef6b 20e6 eff2 94f2 97a1 e96e 2061 20f2 e5e3 eff2 64e9 6e67 2073 f475 64e9 efbf 942f 94ae > > 00:00:06:07 942c > > 00:00:06:09 9420 94f2 9723 c7f2 e561 f420 64f2 756d 20f4 ef6e e573 bf80 942f 94ae > > 00:00:08:06 942c > > 00:00:08:07 9420 94f2 9723 43ec e561 6e20 76ef e361 ec20 f461 6be5 73bf 942f 94ae > > 00:00:09:31 942c > > 00:00:10:16 9420 94f2 c16e 20e5 f870 e5f2 e9e5 6ee3 e564 20e5 6e67 e96e e5e5 f2bf 942f 94ae > > 00:00:12:17 942c > > 00:00:13:07 9420 94d0 9723 c1f4 20ce e567 61f4 e976 e520 d370 61e3 e520 d3f4 7564 e9ef 7380 94f4 97a2 e96e 20c2 61ec f4e9 6def f2e5 942f 94ae > > 00:00:15:21 942c > > 00:00:15:23 9420 9470 97a1 f7e5 2061 f2e5 20e3 ef6d 6de9 f4f4 e564 20f4 ef20 70f2 ef76 e964 e96e 6780 942f 94ae > > 00:00:17:03 942c > > 00:00:17:05 9420 9454 97a2 68e9 6768 adf1 7561 ece9 f479 94f2 97a2 f2e5 e3ef 64e9 6e67 2061 6e64 206d e9f8 e96e 67ae 942f 94ae > > 00:00:19:28 942c > > 00:00:19:30 9420 9452 4ce5 f420 7573 2073 68ef f720 79ef 7520 68ef f720 67ef ef64 94f2 97a1 79ef 75f2 206d 7573 e9e3 20e3 616e 2073 ef75 6e64 ae80 942f 94ae > > 00:00:22:29 942c
Author
Owner

@cfsmp3 commented on GitHub (Jun 1, 2021):

@shubham162019 the provided link points to a .mp4 file, not a .mxf

@cfsmp3 commented on GitHub (Jun 1, 2021): @shubham162019 the provided link points to a .mp4 file, not a .mxf
Author
Owner

@cfsmp3 commented on GitHub (Jun 1, 2021):

Likely fix (but didn't test, since I don't have the sample). In ../src/lib_ccx/ccx_encoders_scc.c

void add_timestamp(const struct encoder_ctx *context, LLONG time, const bool disassemble)
{
...
- float frame = milli / 29.97;
+ float frame = milli * 29.97 / 1000;

@NilsIrl thoughts? This was your code originally.

@cfsmp3 commented on GitHub (Jun 1, 2021): Likely fix (but didn't test, since I don't have the sample). In ../src/lib_ccx/ccx_encoders_scc.c ``` void add_timestamp(const struct encoder_ctx *context, LLONG time, const bool disassemble) { ... - float frame = milli / 29.97; + float frame = milli * 29.97 / 1000; ``` @NilsIrl thoughts? This was your code originally.
Author
Owner

@shubham162019 commented on GitHub (Jun 8, 2021):

@cfsmp3 https://drive.google.com/file/d/0B83Wr3EZXIYnQWpVMEprM1dxUjQ/view

@shubham162019 commented on GitHub (Jun 8, 2021): @cfsmp3 https://drive.google.com/file/d/0B83Wr3EZXIYnQWpVMEprM1dxUjQ/view
Author
Owner

@canihavesomecoffee commented on GitHub (Jun 8, 2021):

Sample here as well: https://sampleplatform.ccextractor.org/sample/171

@canihavesomecoffee commented on GitHub (Jun 8, 2021): Sample here as well: https://sampleplatform.ccextractor.org/sample/171
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#636