{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://reels.canadian-ai.ca/schemas/reel/v1.json","title":"Feature Reels reel/v1","description":"A whole video as JSON: a composition, public-URL assets, a visual track of clips that play back to back (registry component references), and audio tracks. See docs/design-docs/portable-reel-spec.md.","type":"object","required":["version","id","name","composition","tracks"],"properties":{"$schema":{"type":"string"},"version":{"const":1},"id":{"$ref":"#/$defs/id"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"category":{"type":"string"},"composition":{"type":"object","required":["width","height","fps"],"properties":{"width":{"type":"integer","minimum":1,"maximum":8192},"height":{"type":"integer","minimum":1,"maximum":8192},"fps":{"type":"integer","minimum":1,"maximum":120},"background":{"type":"string","maxLength":64}}},"brand":{"type":"object","properties":{"ref":{"type":"string"},"music":{"type":"string","description":"\"brand://default\" uses the owner's default brand music."}}},"assets":{"type":"object","propertyNames":{"pattern":"^[\\w-]{1,64}$"},"additionalProperties":{"type":"object","required":["type","url"],"properties":{"type":{"enum":["image","video","audio","model"]},"url":{"type":"string","pattern":"^https://\\S+$"},"license":{"type":"string"},"credit":{"type":"object"},"provenance":{"type":"object","required":["sourcePage","commercialUseConfirmed","verification"],"additionalProperties":false,"properties":{"sourcePage":{"type":"string","pattern":"^https://\\S+$","maxLength":2048},"commercialUseConfirmed":{"const":true},"verification":{"const":"caller-attested"}}}}}},"tracks":{"type":"array","items":{"oneOf":[{"$ref":"#/$defs/visualTrack"},{"$ref":"#/$defs/audioTrack"}]}},"captionTrack":{"type":"object","required":["style","captions"],"properties":{"style":{"enum":["caption-karaoke","caption-highlight-box","caption-active-pop","caption-dim-progress","caption-subtitle"]},"captions":{"type":"array","minItems":1,"maxItems":10000,"items":{"type":"object","required":["text","startMs","endMs","timestampMs","confidence"],"properties":{"text":{"type":"string","minLength":1,"maxLength":300},"startMs":{"type":"number","minimum":0,"maximum":3600000},"endMs":{"type":"number","exclusiveMinimum":0,"maximum":3600000},"timestampMs":{"type":["number","null"]},"confidence":{"type":["number","null"],"minimum":0,"maximum":1}}}},"props":{"type":"object","properties":{"fontSize":{"type":"number","minimum":16,"maximum":140},"fontWeight":{"type":"number","minimum":100,"maximum":900},"color":{"type":"string","maxLength":64},"activeColor":{"type":"string","maxLength":64},"boxColor":{"type":"string","maxLength":64},"dimOpacity":{"type":"number","minimum":0,"maximum":1},"holdMs":{"type":"number","minimum":0,"maximum":2000},"combineTokensWithinMilliseconds":{"type":"number","minimum":0,"maximum":3000},"shadow":{"type":"boolean"}},"additionalProperties":false}}},"output":{"type":"object","properties":{"format":{"const":"mp4"},"presets":{"type":"array","items":{"enum":["16:9","9:16","1:1"]}}}},"credits":{"type":"array","items":{"type":"object"}}},"$defs":{"id":{"type":"string","pattern":"^[\\w-]{1,64}$"},"seconds":{"type":"number","minimum":0,"maximum":3600},"visualTrack":{"type":"object","required":["id","kind","clips"],"properties":{"id":{"$ref":"#/$defs/id"},"kind":{"const":"visual"},"clips":{"type":"array","minItems":1,"items":{"type":"object","required":["id","component","duration"],"properties":{"id":{"$ref":"#/$defs/id"},"component":{"type":"string","pattern":"^(cai-motion|cai-films|cai-ui|cai-templates)/[a-z0-9][a-z0-9-]*$"},"duration":{"type":"integer","minimum":1,"maximum":108000,"description":"Frames."},"label":{"type":"string","maxLength":120},"props":{"type":"object","description":"Overrides for the component defaults. \"asset://<id>\" strings resolve to asset URLs."}}}}}},"audioTrack":{"type":"object","required":["id","kind","clips"],"properties":{"id":{"$ref":"#/$defs/id"},"kind":{"const":"audio"},"clips":{"type":"array","items":{"type":"object","required":["id","src"],"properties":{"id":{"$ref":"#/$defs/id"},"src":{"type":"string","description":"\"asset://<id>\", an https URL to audio, or a path under audio/."},"from":{"type":"integer","minimum":0},"trimStart":{"$ref":"#/$defs/seconds"},"trimEnd":{"$ref":"#/$defs/seconds"},"volume":{"type":"number","minimum":0,"maximum":1},"fadeIn":{"$ref":"#/$defs/seconds"},"fadeOut":{"$ref":"#/$defs/seconds"},"role":{"enum":["music","sfx"]},"name":{"type":"string","maxLength":120}}}}}}}}