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
Clip Modifications
If the filter graph is constructed with a single input, the resultant duration of the filter graph is clearly the duration of the input.
However, if you wish to clip a video, you can use the 'clip' filter as follows:
<input> filter:clip in=100 out=200
This of course assumes that the input is seekable, but of course, if an input isn't seekable, it's not much use in a video editing environment :-).
Clip also allows the use of negative offsets – these are treated as relative to the length of the input, thus:
<input> filter:clip in=0 out=-1
is equivalent to the entire length of the input clip, while:
<input> filter:clip in=-25 out=-1
is equivalent to the last 25 frames of the input.
Clips can also be extracted in reverse order:
<input> filter:clip in=-1 out=0
Note that as a courtesy, audio samples are also reversed.
These are provided to allow easier 'blind' use of a clip – the duration doesn't need to be known to split or reverse video in an easy manner.
