Setting SEEK and LENGTH on movie and audio#121
Setting SEEK and LENGTH on movie and audio#121mellbergsimon wants to merge 7 commits intosvt:mainfrom
Conversation
Signed-off-by: Simon Mellberg <mellbergsimon@example.com>
Signed-off-by: Simon Mellberg <mellbergsimon@example.com>
Signed-off-by: Simon Mellberg <mellbergsimon@example.com>
…et.cjs Signed-off-by: Simon Mellberg <mellbergsimon@example.com>
Signed-off-by: Simon Mellberg <mellbergsimon@example.com>
Signed-off-by: Simon Mellberg <mellbergsimon@example.com>
Then there would be a new API function for calculating the effective playback duration of any item in the rundown. Logically resolving to the You are correct that duration can be static and essentially be the total duration available in the clip. I did not want to change too much and therefore added another essentially static duration. Could you explain how the API function part? Essentially creating a new duration in parallell which will be used by the gui to show correct duration?
A default frame rate could work. I guess normally most operators have the same frame rates. But it could be that setting 24fps and then trying to play a 60fps clip. I did not think about users writing the name of a file directly but of course that is possible. I guess right clicking in the rundown and adding a caspar playable. One thought I had was that if there is a server default frame rate setting. If it is not set it could be automatically set in the background. Based on the majority of clips with a certain frame rate or similar. But that could cause confusion why the inpoint and outpoints are not exact. |

Seek and Length
Description
This PR attempts to add functionality for setting the seek and length options for caspar. This enables the user to quickly select where to start and end the video or audio.
Changes
I needed to add 2 more variables to the item.data field. Specifically:
data: { name: item.name, caspar: { server: item?._filter?.serverId, target: item.name, ...(DEFAULT_VALUES[item.type] || {}) }, duration: asset.calculateDurationMs(item), + medialength: Number.parseInt(item?.duration), + framerate: asset.frameRateFractionToDecimal(item?.framerate) }Not the most beautiful implementation and I appreciate tips how to improve this.
The Seek field itself is expected by Caspar to be in frames:

This is not the most intuitive solution and I know we discussed there being some sort of drop down selector for these in the future.
General usage:
3 points of selection. Left (seek), right (length) and the entire bar. Small rounding error can occur when dragging bar from start to end.
general.usage.mov
I tried to limit the amount of userefs and divide the component into smaller manageable chunks. But I am still a little bit unsure about the SUIT naming convention. I really tried my best with the naming scheme in this, but I am sure I have made mistakes.
Fixes #68
New issue?
I tried to implement that if the duration is changed, the length setting should follow but after changing the duration field it seems to lock until the item in the rundown is pressed once again.
duration.locks.after.editing.mov
My though process was that we could clamp the duration so that it would not be possible to write a larger value than what the media actually has. But the duration field could also used in making counters with a defined time so I am not sure what the best solution going forward would be.
White theme
The colors i selected does not look good on white theme. I would like some assistance selecting a good color palate that works on all themes.
Type of change
How Has This Been Tested?
I have tested it against my own Linux caspar server filled with different testing media.
Test Configuration:
Checklist: