Repository navigation
fix(vidispine): read time codes with numeric time bases - #517
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On VX-520074 (a 50 fps item) the export tool lists only the "Intro" chapter, even though the item has 13 subclips.
TCToSecondsonly accepted<SAMPLES>@PAL. The item's start time code is180000@50, so it failed to parse.GetChapterMetaForClipsignored that error and used 0 as the start. It then asked Vidispine for chapters in0–5321.7s instead of3600–8921.7s, 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
TCToSecondsnow accepts numeric time bases (samples per second, e.g.@50or@48000) as well as@PAL.@NTSCand other named time bases are still errors.GetChapterMetaForClipsreturns the error instead of quietly using 0. If the item has no start time code, it defaults to0@PAL.Testing
go test ./services/vidispine/vscommon/ ./services/vidispine/passes. NewTCToSecondscases cover@50,@48000and invalid input.GetDataForExport+GetChapterMetaForClipsagainst 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