View Bug Details

IDProjectCategoryView StatusLast Update
0001694DCP-o-maticBugspublic2021-01-08 00:47
Reporteroverlookmotel Assigned Tocarl  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformMacOSOS XOS Version10.14
Product Version2.14.15 
Summary0001694: Crash at end of encode caused by incorrect TrimOut value when content has non-integer frame rate
Description

I am consistently seeing errors at end of encode when the following factors are combined:

  • 1st piece of content is non-integer frame rate (e.g. 23.976fps)
  • End trim set on 1st piece of content
  • Another piece of content added after

Error is:

Programming error at ../src/lib/reel_writer.cc:480 409 vs 410

NB The piece of content I'm using is 414 frames long, so the correct trimmed length would be 409.

This happens in both DCP-o-matic 2.14.17 and 2.14.18.

I believe the cause is an incorrect calculation of TrimEnd value in metadata.xml.

When content frame rate is 24000/1001 (23.976fps) and you set both start and end trim as 5 frames each, metadata.xml has TrimStart as 20020 and TrimEnd as 20870.

By my calculations, 20020 is the correct value (5 96000 1001 / 24000).

I can make it work by:

  1. Close DCP-o-matic
  2. Manually edit metadata.xml to change TrimEnd to 20020
  3. Open DCP-o-matic
  4. Make DCP - it now completes without an error

I think this confirms my suspicion that incorrect calculation of TrimEnd is to blame.

Carl, I'll email you a more detailed repro case in addition to what's below.

Steps To Reproduce

Example content to reproduce the fault:

https://drive.google.com/drive/folders/14j4jrmX0B4_jWyPQsyIVV1gIfQI08sck

  • Set project to 24fps Interop
  • Add "Our Feature Presentation 720p HD.mp4" to project
  • Set End Trim to 5 frames on this content
  • Add "2K 239.mxf" to project after the first piece
  • Make DCP

It will error (in DCP-o-matic 2.14.18).

TagsNo tags attached.
Branch
Estimated weeks required
Estimated work required

Activities

overlookmotel

2019-12-18 15:11

developer   ~0003662

Mantis interpreted my trim calculation in above post as markdown and rendered it weirdly.

I meant: 5 x 96000 x 1001 / 24000 = 20020.

carl

2019-12-18 22:44

administrator   ~0003663

Last edited: 2019-12-18 22:44

Looks like a correct diagnosis. Should be fixed by 1229de2042c785a9e851e5fc53922a75bfbf195d in 2.14.19 and b5335ed37e52c216a6773789c0edba5f335c8df2 in 2.15.x.

overlookmotel

2019-12-19 00:36

developer   ~0003665

Thanks Carl!

Bug History

Date Modified Username Field Change
2019-12-18 15:07 overlookmotel New Bug
2019-12-18 15:11 overlookmotel Note Added: 0003662
2019-12-18 22:44 carl Assigned To => carl
2019-12-18 22:44 carl Status new => resolved
2019-12-18 22:44 carl Resolution open => fixed
2019-12-18 22:44 carl Note Added: 0003663
2019-12-18 22:44 carl Note Edited: 0003663
2019-12-19 00:36 overlookmotel Note Added: 0003665
2021-01-08 00:47 carl Status resolved => closed