feat(pj_base): AssetVideo clip-window (start_ns/end_ns)#97
Merged
Conversation
|
All contributors have signed the CLA. Thank you! |
6 tasks
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
…ip window The previous `duration_ns` field carried the total playable duration of a video asset but had no readers: pj_scene2D's FileVideoSource asks ffmpeg directly on open, and no other consumer in plotjuggler_core or pj_scene2D read the value. Removing it makes room for an in-file playback window `[start_ns, end_ns]` expressed as ns offsets from the first frame. The new semantics unlock LeRobot v3.0 datasets, where a single per-camera MP4 file packs many concatenated episodes back-to-back. The episodes parquet exposes per-episode `[from_timestamp, to_timestamp]` in float seconds, which map directly to `[start_ns, end_ns]` after a *1e9 cast. v2.1 datasets and any other producer that wants whole-file playback leave both fields absent — unchanged behavior. New fields are 8 and 9 (optional int64, varint).
75bee20 to
ec6e2c0
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Replaces
AssetVideo::duration_nswith a[start_ns, end_ns)clip-window so asingle MP4 asset can be addressed as a fragment instead of "the whole file from
frame 0".
Motivation
LeRobot v3.0 datasets pack multiple episodes into the same
.mp4: episodeeoccupies a
[start, end)time range within the shared video, identified viameta/episodes/chunk-NNN/file-MMM.parquetshard metadata. The previousduration_nsfield assumes 1 entity = 1 full file and can't express this.start_ns/end_nsis also strictly more general — for the single-episode caseset
start_ns=0,end_ns=duration_nsand behavior is identical.Downstream
This unblocks two consumer PRs:
feat/asset-video-clip-consumer:FileVideoSourcehonors theclip-window through
pj_scene2D.feat/lerobot-v3-support: the LeRobot v3.0 readeremits clip-windows from
episode_shards.Test plan
pj_basebuilds + existing tests pass