Timeline times are always drop frame (also affects makers)

What is your operating system?
windows 10 x64

What is your Shotcut version (see Help > About Shotcut)?
24.10.29

Can you repeat the problem? If so, what are the steps?
The bug is more obvious the longer the timeline so going straight to the 1h:

  • start a project at 59.94fps and add a long ~1h color clip.
  • move playback head at the 1h mark

Now if the Settings → Time Format is Timecode (drop frame) everything lines up correctly.
But if Time format is Timecode (non drop frame) the 1h mark does not match the 1h text on the timeline, it is off by almost 4s at 59:56:24. Typing 1:0:0:0 in the project’s time also moves the head at the equivalent non drop frame time of 59:56:24 and subsequent pressing of Enter key moves the playhead backwards to he non drop frame conversion.

An extra level of conversion happens if you try to add a marker. Pressing M at the (apparent) 1h mark which is in fact 00:59:56:24 will add the marker at the 00:59:52:48 position (this marker offset was reported previously in a different thread but with no clear reproduction steps).

A quick note is that subsequent M presses will keep adding new markers on that same [offset] place. Another quick note is that hovering the mouse on the 1h timeline string will show a popup with the “converted” time.

The simple and easy workaround is to use the drop frame time format, but I suspect there’s more shenanigans going on with the non-drop-frame times.

The timeline ruler times do not use timecode or Settings > Time Format. It uses HH:MM:SS by design.

The code base does not currently implement support for non-drop frame as an input. In other words, the timecode text parser does not know about existence of non-drop-frame timecode. This is way down in the engine, which is inherently based on frame count. So, it needs to convert string to number of frames (mlt_property.c:time_code_to_frames()). Only the function to convert frames to a string knows about non-drop frame timecode (mlt_property.c:time_smpte_from_frames()). I have no plans to add that myself, but someone else can volunteer. Bear in mind that existing external function signatures cannot be changed. If a new function is added, Shotcut still needs to be able to build with an older version of MLT (currently >= 7.22.0).

With respect to markers, they are saved in the MLT XML using the current Settings > Time Format, which can cause problems. There is another bug report about how this negatively affects File > Export > Markers as Chapters.

I think we should try to address this more glaring bug in this report.

I am willing to change this to respect Settings for the version after next.

The timeline ruler times do not use timecode or Settings > Time Format. It uses HH:MM:SS by design.

This makes sense now and I agree it is more technically correct this way - as it will be the actual exported video time and it is especially useful when using Time format → frames to have an idea of time.
I’m actually going back to always using drop frame now, I assumed the difference is insignificantly small but it’s quite real.

For the rest of the non drop frame format issues in my opinion a simple popup warning that timeline and some other places will not use non drop times would suffice.

So the only real bug here is the markers thing.