Skip to content

fix(vidispine): read time codes with numeric time bases - #517

Merged
KillerX merged 1 commit into
masterfrom
fix/tc-numeric-timebase
Oct 22, 2026
Merged

KillerX merged 1 commit into
masterfrom
fix/tc-numeric-timebase

Conversation

@KillerX

@KillerX KillerX commented Oct 22, 2026

Copy link
Copy Markdown
Member

Problem

On VX-520074 (a 50 fps item) the export tool lists only the "Intro" chapter, even though the item has 13 subclips.

TCToSeconds only accepted <SAMPLES>@PAL. The item's start time code is 180000@50, so it failed to parse. GetChapterMetaForClips ignored that error and used 0 as the start. It then asked Vidispine for chapters in 0–5321.7 s instead of 3600–8921.7 s, and only Intro overlaps the wrong window. Both intervals were checked directly against Vidispine.

The same parse failure hits subclip in/out points (GetInOut), so exporting a single subclip of a 50 fps item fails as well.

Change

  • TCToSeconds now accepts numeric time bases (samples per second, e.g. @50 or @48000) as well as @PAL. @NTSC and other named time bases are still errors.
  • GetChapterMetaForClips returns the error instead of quietly using 0. If the item has no start time code, it defaults to 0@PAL.

Testing

  • go test ./services/vidispine/vscommon/ ./services/vidispine/ passes. New TCToSeconds cases cover @50, @48000 and invalid input.
  • Ran GetDataForExport + GetChapterMetaForClips against Vidispine for VX-520074: it now returns 12 chapters. The 13th has the same title as another chapter ("Panelsamtale - Samvirk"), and chapters are keyed by title, so one is dropped. That's an existing limitation and not changed here.

🤖 Generated with Claude Code

TCToSeconds only accepted <SAMPLES>@pal, so a 50 fps item's start time
code (e.g. 180000@50) failed to parse. GetChapterMetaForClips ignored the
error and used 0 as the start, so it queried the wrong interval and only
found chapters in the first part of the item (VX-520074 showed only
"Intro"). Subclip in/out points failed to parse for the same reason.

Accept numeric time bases (samples per second) alongside PAL, and return
the error from GetChapterMetaForClips instead of silently using 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KillerX
KillerX merged commit a87b118 into master Oct 22, 2026
3 checks passed
@KillerX
KillerX deleted the fix/tc-numeric-timebase branch October 22, 2026 10:02
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.

1 participant