Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Updating the Looping Feature with Per-Part Looping #1078

Closed
5 tasks done
hummelstrand opened this issue Dec 1, 2023 · 9 comments · May be fixed by #1112
Closed
5 tasks done

RFC: Updating the Looping Feature with Per-Part Looping #1078

hummelstrand opened this issue Dec 1, 2023 · 9 comments · May be fixed by #1112
Labels
Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) Contribution ✨ enhancement New feature or request RFC

Comments

@hummelstrand
Copy link
Member

hummelstrand commented Dec 1, 2023

Background

On behalf of the BBC, SuperFly.tv would like to replace the current Sofie looping functionality with an implementation that retains the current features while, at the same time, extending the looping feature set.

Proposal

We're proposing a new Sofie Core feature (not relying on the need to individually implement any new Blueprint logic), available to the users through the Rundown View. This work will replace and extend the existing playlist looping functionality, leaving the existing behaviour unchanged but adding ways of defining a partial rundown loop directly in the Sofie GUI. The plan is to allow the user of the Sofie GUI to set a start and end marker within a playlist in order to automatically loop between these markers, auto-taking the part(s).

We intend to target Sofie Release 51 with a PR for this feature.

Proposed Mode of Operations

  • A Rundown Playlist can contain a single Start and a single End marker at most, making it possible for only one looping section to exist in a Rundown Playlist.

  • Setting and clearing the markers via the Sofie GUI will only be enabled in playlists that do not already have looping enabled by the NRCS.

  • Setting the Start marker after the End marker should not be allowed.

  • Four kinds of start/end markers are possible to implement: Part, Segment, Rundown, and Playlist.

    • Playlists that are set to be looping from the NRCS will use the Playlist markers which will mimic the look of the current looping functionality.

    • Loops set by the user in the Sofie GUI will only use the Part markers which will need to be designed as part of this task.

    • Segment markers and Rundown markers will only be made available in the backend, but not exposed in any user-facing functionality. Doing so in the future will have to solve the UI/UX issue of how to present this to the end users.

  • Users should be able to right-click on a Part (but not an Invalid one) and set it as the Start/End of the loop. The context menu should also let the user remove the Start and/or End marker that has already been set on the Part.

  • Setting the Start and the End marker on the same Part is allowed and will create a one-part loop.

  • The Loop Mode is triggered when any of the Parts between the Start and End marker is taken (by an Auto Take, or by the user performing a Take manually).

  • While the Loop Mode is enabled:

    • Parts will progress automatically, as if each of them had Auto Take enabled from the NRCS. If this is not expected as the default behaviour, a setting may be added.

    • Parts within the loop that will progress automatically, will have the AUTO indicator shown as a GUI override, but they will not be altered in the database.

    • When the end of the loop is reached, Sofie sets the first item in the loop as Next and then does an Auto Take.

    • The Loop Mode can be exited via a dedicated hotkey, an AdLib Action or a context menu item, which continues to play the current part and deletes both the Start and the End markers.

    • The user should be able to adlib, and the GUI should reflect those adlibs, but all played adlibs should be removed every time the loop starts over.

    • A dynamic part (inserted by playing an adlib) while currently playing out the End part of the loop will not cause exiting the Loop Mode, and the End will be temporarily moved to that part.

    • If a Part with a duration of 0 seconds or undefined (set in the NRCS and/or by the Blueprints) is found within the looping section, the default behaviour will match the existing playlist looping functionality, but settings will be made available to treat those parts differently while in the loop (e.g. to indicate them as invalid and skip, or to applying a default duration).

    • All Parts (but not any Segment headers) outside of the loop are dimmed (black overlay with 20% opacity) but still have all the functionality (e.g. Setting as Next).

    • Counters in the Top Bar will work normally, and will not be affected by the Loop Mode.

    • There might be GUI indication showing that the Loop Mode is currently active. TBD later.

    • Sofie will act "normally" while looping -- no regular Sofie feature will be disabled in this mode.

    • Infinite piece logic will be respected and the intention is to make it behave normally.

    • Setting the Start/End markers on different Parts to modify the looping section is allowed, as long as the currently playing Part is contained within the desired section.

    • Setting a Part outside of the looping section as Next and letting the Auto Take to perform a Take, as well as performing a Take manually, will exit the Loop Mode and delete the Start/End markers.

  • Parts between the markers might get a visual indicator showing that they are within the loop.

  • It's up to the user to set the Start/End markers at sensible places. Besides Invalid Parts, Sofie will not evaluate the containing parts and prevent the user from creating a bad situation.

  • Activating and Deactivating the Rundown Playlist should delete the Part markers, except of going to the On Air Mode from Rehearsal Mode.

  • Ingest operations altering the order of Segments and Parts so that the Start marker is after the End marker will stop the Loop Mode and delete the markers.

  • Ingest operations removing the Part(s) containing a Start/End marker will stop the Loop Mode and delete the markers. (This might be revised in the future to allow a reattachment of the marker to a preceding/following Part.)

  • Ingest operations hiding the Segment in which part(s) containing a Start/End marker exist will stop the Loop Mode.

  • The Start and End markers may be deleted when source Rundowns of the Parts where they were set are moved between Playlists.

Implementation details in relation to existing features

This feature will be a replacement and an extension of the existing Playlist looping. Playlist looping enabled by the NRCS (and/or Blueprints) will use the new Loop Mode implementation, with Start and End markers locked to the Playlist start and end. No changes to the Blueprints will be necessary to continue using Playlist looping. Some additional information may be exposed to blueprint callbacks like executeAction, to make them aware of the state of the loop mode. References to the Start and End Parts (optionally Segments, and Rundowns) will be stored as properties of the Playlist.

Status

This is an RFC - Request for comments (see our
Contribution guidelines ).

The Sofie Team will evaluate this RFC and open up a discussion about it, usually within a week.

  • RFC created
  • Sofie Team has evaluated the RFC
  • A workshop has been planned
  • RFC has been discussed in a workshop
  • A conclusion has been reached, see comments in thread.
@hummelstrand hummelstrand added RFC Contribution Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) labels Dec 1, 2023
@mint-dewit
Copy link
Member

Hello!
Thank you for opening this RFC! If you haven’t already, please give our contribution guidelines a read.
We are evaluating this proposal in the team and will soon reach out to you if further discussion is needed.

@mint-dewit
Copy link
Member

Thanks for your patience and your detailed RFC!

We are considering this RFC and are in general positive towards the described changes. We ask you to pay particular notice of the following:

  • Currently NRK needs to support a workflow where a looping rundown is combined with parts that are not auto taken. These parts, in general, have no duration. So either a way to prevent the described behaviour of doing auto takes on all parts needs to be included, or parts without a duration should not be auto-taken (can also be an optional thing). Either solution is acceptable to NRK.
  • We expect there to be issues when parts with a duration of 0 or a very short duration have an auto take. Currently there is a mechanism to prevent doing a take very quickly after another. The implementation needs to take this in to account somehow.

So long as the first point is taken care of, NRK would be happy to accept a pull request containing this functionality (given the PR is of sufficient quality of course)

If you feel there is further need to discuss this or if you would like pointers on the implementation we would be more than happy to host a workshop. In that case, please contact me at mint.de.wit@nrk.no

@jstarpl
Copy link
Member

jstarpl commented Dec 6, 2023

Hey, I would just like to ask: do you have any plans for what the implementation for this feature is going to look like? One specific thing that might be a pain-point is the implementation of

Parts within the loop that will progress automatically, will have the AUTO indicator shown as a GUI override, but they will not be altered in the database.

This sounds like a context-based switch, which means that Parts will be rendered, and treated differently, based on the context of the loop mode (I suppose a property on the playlist object, or something like that?). So far, my experience with that has been relatively poor. Having that be consistent across all of the different views, view-modes and consumers of the data (say, Live Status Gateway) might be a big pain? Might be also quite difficult to implement automated testing to ensure that this behavior isn't broken at any point in any of these consumers?

I'm curious about your thoughts here.

@hummelstrand
Copy link
Member Author

Workshop planned for Friday 13:00 CET.

@ianshade
Copy link
Contributor

Thank you, @mint-dewit and @jstarpl, for your time and consideration!

These parts, in general, have no duration. So either a way to prevent the described behaviour of doing auto takes on all parts needs to be included, or parts without a duration should not be auto-taken (can also be an optional thing).

We're thinking of making a Force Auto in a Loop setting in the Studio Setting, that would have three options:

  • Disabled (Parts will auto-next only when explicitly set by the NRCS/Blueprints) - default and consistent with the current behavior of the Playlist looping
  • Enabled when Part Duration is defined and higher than 0
  • Enabled on all Parts, applying the Minimum Display Duration if needed

Exact wording is subject to change.
Minimum Display Duration is currently set through the core-settings.json, however since we already have the Minimum Take Span available in the Studio Settings, perhaps Minimum Display Duration should also be available there or in some other place visible to the admins?

We expect there to be issues when parts with a duration of 0 or a very short duration have an auto take.

Considering that zero-duration parts will not be auto-taken or will have their duration overridden - depending on the settings, this is probably less severe, but I have yet to verify how very short parts (especially multiple in a row) behave. Perhaps we could introduce a specific threshold for auto-nextable part durations?

This sounds like a context-based switch, which means that Parts will be rendered, and treated differently, based on the context of the loop mode [...]

After an internal workshop, we think this would be best solved by a custom publication which would deliver Parts with autoNext, expectedDuration and expectedDurationWithPreroll properties overridden based on the state of the loop and the aforementioned setting(s). This way, consistent data could be delivered to the GUI and potentially other consumers, like the LSG, without them having to implement any extra logic for supporting the override. Current and Next Part Instances will have those overrides applied on the actual documents, but the original values will be preserved and reverted when those parts end up outside of the looping range as a result of user actions or ingest operations. We're aware that extra care is needed to handle the override when those instances are modified by Adlib Actions or syncIngestUpdateToPartInstance.
Whether a Part (Instance) is in the looping section, will have to be computed in the GUI (possibly in the tracker of RundownTimingProvider, where all Parts and PartInstances are already processes in order) to implement presentation-specific features like dimming the parts outside of the loop. This will make it easier to dim the already-played and non-reset Part Instances. A custom Parts publication, however, opens a world of possibilities to how pre-processed Part data could be delivered to the GUI and the LSG, potentially allowing Parts and PartInstances to be combined by the backend in the future.

How do you feel about those solutions?

@mint-dewit
Copy link
Member

The described Force Auto in a Loop setting sounds good and should work fine for NRK's use case.

@jstarpl
Copy link
Member

jstarpl commented Dec 11, 2023

We're thinking of making a Force Auto in a Loop setting in the Studio Setting, that would have three options:

* _Disabled (Parts will auto-next only when explicitly set by the NRCS/Blueprints)_ - default and consistent with the current behavior of the Playlist looping

* _Enabled when Part Duration is defined and higher than 0_

* _Enabled on all Parts, applying the Minimum Display Duration if needed_

My only comment here would be to consider if this should be "applying the Minimum Display Duration", or if it should be "applying a Fallback Duration", with a specific "Fallback Duration" to be set within the Studio. The "Minimum Display Duration" is a quirk of the Timeline view, necessitated by it's characteristics and it doesn't really translate to anything else. I'm unsure if it makes sense to promote something that is essentially a stylistic choice to a system-wide property, or if that should be a separate value, that one can choose to configure to be the same. I appreciate that the use of "Minimum Display Duration" is supposed to allow for visual consistency in the UI when using the timeline view, but for someone using the Segment List view, this will set an arbitrary duration value and will ultimately be inconsistent. What's more, to change this arbitrary value, you'll need to modify a setting that supposedly doesn't affect the Segment List view at all.

Come to think of it, maybe it just makes sense to rename "Minimum Display Duration" to "Fallback Duration", refactor it to be a property of the Studio - like you suggested - and change the power dynamic: no longer would it be a "Minimum Display Duration" value owned by the Timeline, but rather a generic "Fallback Duration", and it would just so happen that the Timeline would use that "Fallback Duration" when it can't render a Part any other way.

@jstarpl jstarpl added the ✨ enhancement New feature or request label Jan 8, 2024
@jstarpl jstarpl linked a pull request Feb 9, 2024 that will close this issue
4 tasks
@hummelstrand
Copy link
Member Author

There's now a PR for this functionality: #1112

@mint-dewit
Copy link
Member

Since there is now a PR for this RFC I am closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) Contribution ✨ enhancement New feature or request RFC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants