Skip to content

[timecode] Count the frames and timecodes at the production frame rate - #2310

Merged
frankrousseau merged 4 commits into
cgwire:mainfrom
NicoPennec:timecode-fps
Oct 29, 2026
Merged

frankrousseau merged 4 commits into
cgwire:mainfrom
NicoPennec:timecode-fps

Conversation

@NicoPennec

@NicoPennec NicoPennec commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Problem

  • The movie viewers turn times into frame numbers with the frame duration rounded to 4 decimals: at 24, 30, and 60 fps, the frame numbers drift from the picture, 18 frames 10 minutes into a 30 fps movie
  • Timecodes are built from frame times rounded to 4 decimals: at 30 fps, frame 31 reads 00:00:00:30 and frame 1201 reads 00:00:39:29; at 29.97 fps, the frames field reaches 30
  • The task panel and the task page read the production frame rate with parseInt: a 29.97 fps production plays at 29 fps there, so frame numbers drift, some frames cannot be reached, and a right movie raises the wrong duration warning at upload
  • With "Show in and out as timecodes" on, the shot list counts the frame in and out at 25 fps, whatever the production frame rate: in a 30 fps production, frame 1266 reads 00:00:50:16 instead of 00:00:42:06

Solution

  • Count the movie frames on the exact rate when playing, pausing, stepping, and seeking; the playlist players show the timecode of that frame, and a drawing made on a drifted frame of the playlist player now shows on that frame
  • Count the timecodes on whole frames at the nominal rate, as non-drop-frame timecodes do, and drop the last labels in the old 00:00.000 format
  • Read the production frame rate with parseFloat in the task panel and the task page, like the other players
  • Count the shot list in and out cells at the production frame rate, as the EDL import does, else at 25 fps; a fractional rate counts on its nominal one (29.97 fps counts 30 frames a second)

Related to #2303

Goes with cgwire/zou#1329

With "Show in and out as timecodes" on, the shot list counted the frame in
and frame out at 25 fps, whatever the frame rate of the production: in a
30 fps production, frame 1266 read 00:00:50:16 instead of 00:00:42:06.

Both cells now count at the frame rate of the production, as the EDL
import does, else at 25 fps. A fractional rate counts on its nominal one,
as non-drop-frame timecodes do: 29.97 fps counts 30 frames a second.

Related to cgwire#2303
The task panel and the task page read the production frame rate with
parseInt: a 29.97 fps production played at 29 fps there, so the frame
numbers drifted, some frames could not be reached, and a right movie
raised the wrong duration warning at upload.

They now read it with parseFloat, like the other players.
The timecodes were built from frame times rounded to 4 decimals, then
from the milliseconds of that time. At 30 fps, frame 31 of a comment read
00:00:00:30 and frame 1201 read 00:00:39:29; at 29.97 fps, the frames
field reached 30.

They now count whole frames at the nominal rate, as non-drop-frame
timecodes do. The @frame tag and the task player take the frame number;
the playlist players and the sounds take the time rounded to a frame,
since the frame of the playlist viewer drifts on the rounded frame
duration. The last labels in the old 00:00.000 format go too.
The movie viewers turned times into frame numbers with the frame
duration rounded to 4 decimals: at 24, 30, and 60 fps the frame numbers
drifted from the picture, 18 frames 10 minutes into a 30 fps movie.

They now count frames on the exact rate when they play, pause, step,
and seek, and the playlist players show the timecode of that frame. A
drawing made on a drifted frame of the playlist player now shows on
that frame, where the task panel already showed it.

The pause seeks 1 ms into its frame, as the other seeks do: Chromium
cuts a seek time down to whole microseconds, and a seek right on a
frame start can show the previous frame.
@frankrousseau
frankrousseau merged commit f2f881f into cgwire:main Oct 29, 2026
5 checks passed
@NicoPennec
NicoPennec deleted the timecode-fps branch October 29, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants