OpenMediaLib User and Development Guide
- OpenMediaLib User Development Guide
- Introduction
- High Level Use
- Reverse Polish Notation
- Applying RPN to Video/Audio
- Clip Modifications
- Compositing
- Playlists
- Stack Manipulations
- Advanced Stack Usage
- Aspect Ratio Considerations
- The Encoding Filter Graph
- Compositing Revisited
- Really, Really Advanced Stack Usage
- General Audio Issues
- Python
- Interpolation
- Threading
Compositing
Another problem related to length lies in the previously demonstrated composite filter.
Here we have:
colour: <input> filter:composite
The duration here is rather arbitrarily defaulted to the duration of the 0th slot – this being the colour.
We can enforce a duration of the colour: input by specifying its out point:
colour: out=1000 <input> filter:composite
Depending on the requirements of the filter graph, this might be fine, but typically, it would be nice to force the background duration to be that of the foreground.
The composite filter provides a property known (rather ambiguously) as 'slot' which can be used to determine which of the slots controls the duration:
colour: <input> filter:composite slot=1
Alternatively, you can use the composites swap property and specify the inputs in the other order:
<input> colour: filter:composite swap=1
Since slot=0 by default, there's no need to stipulate the slot property (unless you want to drive duration from the 1st slot of course).
