View Bug Details

IDProjectCategoryView StatusLast Update
0001700DCP-o-maticGeneralpublic2024-01-03 00:26
Reporteroverlookmotel Assigned Tocarl  
PrioritynormalSeverityminorReproducibilityhave not tried
Status acknowledgedResolutionopen 
PlatformMacOSOS XOS Version10.14
Product Version2.14.15 
Summary0001700: DCP-o-matic's logic for reducing/increasing frame rate?
Description

DCP-o-matic does deals with frame rate in different ways depending on degree of difference between content and DCP frame rate.

e.g.:

  • Content 25fps, DCP 24fps -> Retain all frames, DCP runs 4% longer than content
  • Content 50fps, DCP 25fps -> Drop every 2nd frame, DCP runs same length as content
  • Content 12fps, DCP 24fps -> Repeat each frame twice, DCP runs same length as content

There are other places in between where I don't know what DCP-o-matic does e.g.:

  • Content 60fps, DCP 24fps -> Drop every 2nd frame and then play 25% slower? Or drop 2 out of every 5 frames so DCP runs same length as content?
  • Content 18fps, DCP 24fps -> Repeat frames, or play each frame for a shorter time?

I am wondering:

  • At what point does DCP-o-matic switch between stretching frames / dropping/repeating frames?
  • Which frames does it drop (the 1st of every two, or the 2nd?)
  • Where a 60fps input has 101 frames, and output DCP is 30fps, is length of DCP 50 frames, or 51? i.e. does is round up or down? Or does trim end get incremented automatically to make it explicit which way the rounding is going?

I'm not quite sure what I'm asking here, but just starting a conversation. Some possible outcomes might be:

  1. Document what logic DCP-o-matic follows on this.
  2. Include in metadata.xml Content section a field EffectiveVideoFrameRate which would be different from VideoFrameRate where DCP-o-matic is going to drop/repeat frames.
  3. Include in metadata.xml Content section a field EffectiveVideoLength which would be different from VideoLength where DCP-o-matic is going to drop/repeat frames.
  4. Allow control over what DCP-o-matic does in the GUI. i.e. Allow user to decide to convert 60fps to 30fps by making the DCP play twice as long as the content (which would set one of the above fields in metadata.xml.

My particular use case is that I want to be able to accurately predict the length of resulting DCP just from the info in metadata.xml. But other people may have other different uses for this.

The example of Content 18fps, DCP 24fps may be relevant for anyone who is making DCPs from digitised archive film, for example, and they might like control over how the frame rate conversion is performed.

TagsNo tags attached.
Branch
Estimated weeks required
Estimated work required

Activities

carl

2019-12-23 00:40

administrator   ~0003674

Last edited: 2019-12-23 00:40

DCP-o-matic (currently) never drops frames in that sense; perhaps it should, sometimes. All it does is try to skip or repeat frames to get closer to the required rate, and then it gives up and runs the content too fast or too slow, as required.

I don't think it makes much sense for external tool authors to reimplement DCP-o-matic's logic; apart from anything else, it may change.

Your solutions based on writing XML to the metadata.xml look OK, though it seems a little bit of a shame to "clutter" that file with stuff that DoM can calculate by itself.

An alternative might be some API where you could ask DoM to tell you this stuff; for example, what if you could do

$ dcpomatic_info --total-dcp-length my_great_dom_project
dcp_length 01:30:44

Would that solve your problem?

overlookmotel

2019-12-23 13:39

developer   ~0003676

Two things:

Calculating end position of content

Ah ha! Yes, you're right an addition to the CLI API would solve this problem better. Please see 0001702 for a suggestion.

Control of how DCP-o-matic does frame rate conversion

I think it would be useful in some cases for the user to have control over how DCP-o-matic does frame rate conversion.

For example, if I have a 60fps file and want to make a 24fps DCP, at present DCP-o-matic skips every 2nd frame to get it to 30fps and then slows what remains down to 24fps. There's no way to change that.

The user might prefer to skip more frames, in order to go from 60fps -> 24fps without changing the running time of the film. i.e. skip 3 frames out of every 5.

Another example: 18fps source -> 24fps DCP. User might want to repeat frames to get to desired frame rate, rather than speed up the film 33%.

An extra control "Conform frame rate" would satisfy both cases. Frames would be dropped/repeated to get to the Conform Frame Rate and then speeded up/down to get to the Output Frame Rate.

Personally, I would prefer such a control to be able to be set per piece of content, rather than for the DCP overall. A good place for it could be at the very bottom of the Timing tab.

What do you think?

carl

2019-12-23 22:00

administrator   ~0003680

I am not very experienced with the visual effects of dropping frames, but I was always under the impression that dropping e.g. 3 out of 5 looked so bad that nobody would want to do it! :)

If it's a useful option we can certainly support it. It's a bit of a worry to add new and potentially scary GUI controls but things get scary enough by the bottom of the timing tab that it would probably be fine.

overlookmotel

2019-12-23 23:02

developer   ~0003682

Well, yes, generally you wouldn't want to drop frames unevenly. But sometimes, if you have a 30fps film and the projector it needs to play on only supports 24fps, you don't have much choice.

Motion-compensating frame rate conversion (an algorithm that "intelligently" constructs new frames by detecting differences between frames before and after) can be a better option, but it also can produce nasty artefacts. It doesn't work well with some types of footage.

Having said all this... Personally, I don't feel there's a strong need for this feature. For me at least, occasions where it would come in useful are pretty rare, so it's not a big deal in these cases to convert the source to desired frame rate in other software prior to putting it into DCP-o-matic.

If it was easy to implement, it might be worthwhile, but otherwise maybe wait until someone else brings it up as something they have a real need for.

My main objective in all this was to find a way to correctly calculate the end position of content, which is now going to be covered by 0001702.

Bug History

Date Modified Username Field Change
2019-12-22 16:11 overlookmotel New Bug
2019-12-23 00:40 carl Assigned To => carl
2019-12-23 00:40 carl Status new => feedback
2019-12-23 00:40 carl Note Added: 0003674
2019-12-23 00:40 carl Note Edited: 0003674
2019-12-23 00:40 carl Note Edited: 0003674
2019-12-23 13:39 overlookmotel Note Added: 0003676
2019-12-23 13:39 overlookmotel Status feedback => assigned
2019-12-23 22:00 carl Note Added: 0003680
2019-12-23 23:02 overlookmotel Note Added: 0003682
2024-01-03 00:26 carl Status assigned => acknowledged