Skip to content

Add proposal for support for init segments in Flows#167

Open
j616 wants to merge 15 commits into
mainfrom
jamessa-flowInitSegments
Open

Add proposal for support for init segments in Flows#167
j616 wants to merge 15 commits into
mainfrom
jamessa-flowInitSegments

Conversation

@j616
Copy link
Copy Markdown
Contributor

@j616 j616 commented Jan 28, 2026

Details

Support for init Segments in Flows

Jira Issue (if relevant)

Jira URL: https://jira.dev.bbc.co.uk/browse/CLOUDFIT-5501

Related PRs

Where appropriate. Indicate order to be merged.

Submitter PR Checks

(tick as appropriate)

  • PR completes task/fixes bug
  • API version has been incremented if necessary
  • ADR status has been updated, and ADR implementation has been recorded
  • Documentation updated (README, etc.)
  • PR added to Jira Issue (if relevant)
  • Follow-up stories added to Jira

Reviewer PR Checks

(tick as appropriate)

  • PR completes task/fixes bug
  • Design makes sense, and fits with our current code base
  • Code is easy to follow
  • PR size is sensible
  • Commit history is sensible and tidy

Info on PRs

The checks above are guidelines. They don't all have to be ticked, but they should all have been considered.

@j616 j616 force-pushed the jamessa-flowInitSegments branch from 893daf0 to 7689cf9 Compare April 7, 2026 16:15
@samdbmg samdbmg linked an issue Apr 29, 2026 that may be closed by this pull request
@j616 j616 force-pushed the jamessa-flowInitSegments branch 2 times, most recently from d0d74d8 to 27d82aa Compare May 13, 2026 15:45
@j616 j616 force-pushed the jamessa-flowInitSegments branch from cec3208 to 87f693d Compare May 18, 2026 15:46
@j616 j616 marked this pull request as ready for review May 18, 2026 15:50
@j616 j616 requested a review from a team as a code owner May 18, 2026 15:50
j616 added 2 commits May 18, 2026 16:55
While `video/mp4` is sometimes used, `video/iso.segment` is strictly speaking correct.
@j616 j616 force-pushed the jamessa-flowInitSegments branch from 87f693d to b3b3ac6 Compare May 18, 2026 15:55
Comment thread api/examples/flow-segments-get-200-init.json Outdated
Comment thread api/schemas/flow-segment.json Outdated
@j616 j616 force-pushed the jamessa-flowInitSegments branch from e6f66ac to 7d93a5b Compare May 19, 2026 13:08
@j616 j616 force-pushed the jamessa-flowInitSegments branch from 7d93a5b to 02a5555 Compare May 19, 2026 13:09
Copy link
Copy Markdown
Member

@samdbmg samdbmg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall changes make sense and look good. Requesting changes because the examples don't match the schema (although I've inlined a question about the schema).

Also, should we call out around DELETE /flows/<flowid>/segments that you should hang on to init segment objects that are referenced by media objects, and delete them when no longer referenced, same as for media objects referenced by Flows?

Comment thread docs/adr/0045-flow-init-segments.md
Comment thread docs/adr/0045-flow-init-segments.md
Comment thread docs/appnotes/0024-using-init-segments.md Outdated
Comment thread docs/appnotes/0024-using-init-segments.md
Comment thread docs/appnotes/0024-using-init-segments.md Outdated
Comment thread api/examples/flow-get-200-video-h264-fmp4.json Outdated
Comment thread api/examples/flow-segments-get-200-init.json Outdated
"default": false
},
"init_segments": {
"description": "Whether the Flow makes use of initialisation segments. This parameter MUST be set to `true` if Media Objects have `init_object` populated. If set to `true`, all Media Objects MUST have `init_object` populated. Assume `false` if omitted.",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on whether this should be a Flow property? Since it's kinda an artifact of how the container and splitting into objects works (and lines up with the Flow GET example in this PR, which seems neater IMO)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've partly placed this here due to how the Profiles proposal has been architected. I think it would need to be at this level to allow the profile to match on this property which has a significant role in compatibility of media.

Comment thread docs/appnotes/0024-using-init-segments.md
Comment thread api/schemas/flow-storage-post.json Outdated
@j616 j616 force-pushed the jamessa-flowInitSegments branch from ef5d6cf to ff75229 Compare May 21, 2026 09:54
@j616 j616 force-pushed the jamessa-flowInitSegments branch from ff75229 to ced27ab Compare May 21, 2026 09:56
@j616
Copy link
Copy Markdown
Contributor Author

j616 commented May 21, 2026

Also, should we call out around DELETE /flows//segments that you should hang on to init segment objects that are referenced by media objects, and delete them when no longer referenced, same as for media objects referenced by Flows?

@samdbmg I've added a note to here and DELETE /flows/. It seems that while we've implied the need for reference counting in the past, we haven't ever called it out against these methods.

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.

Add support for fMP4 (and init segments in general)

3 participants