Skip to content

Review picks container creation time as start of video file instead of first embedded timestamo #83

@basrijn

Description

@basrijn

Ran into an interesting issue where a video scored on Laptop1 does no align with Laptop2. The actual timestamp for a given "frame" is different.

The video files I create have very accurate timestamps on each frame, but file creation is not very accurate. The current code:

_In FFReader.cpp:244–262 the native reader sets first_utc_us from (in priority):

  1. com.crewtimer.first_utc_us custom tag (precise μs from capture software)
  2. creation_time standard container tag (whole-second Unix μs via av_parse_time) ← added fallback
  3. Otherwise first_utc_us stays 0 → FFReaderAPI.cpp:118 falls through to the pixel-row decode

And in FFReaderAPI.cpp:118 the code treats any non-zero first_utc_us as ground truth:
if (ffreader->getFirstUtcUs() != 0) {
tsMicro = firstUtcUs + pts*... // branch A — container-based
} else {
tsMicro = extractTimestampFromFrame(row 0/1) / 10 // branch B — pixel-decoded
}_

For my video files, the embedded timestamp is correct. I would actually suggest:

  1. Embedded TS (tools that write the custom tag will likely not also write the embedded TS)
  2. custom tag
  3. creation_time

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions