Class EncoderEngine
java.lang.Object
org.opencastproject.composer.impl.EncoderEngine
- All Implemented Interfaces:
AutoCloseable
Abstract base class for encoder engines.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classRewrite multiple profiles to ffmpeg complex filter filtergraph chains - inputs are passed in as options, eq: [0aa] and [0vv] Any filters in the encoding profiles are moved into a clause in the complex filter chain for each output -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()commandSplit(String str) Splits a line into tokens - mindful of single and double quoted string as single token Apache common and guava do not deal with quotesjoinNonNullString(String[] srlist, String separator) Use a separator to join a string entry only if it is not null or emptymultiTrimConcat(List<File> inputs, List<Long> edits, List<org.opencastproject.composer.api.EncodingProfile> profiles, int transitionDuration) Concatenate segments of one or more input tracks specified by trim points into the track the edits are passed in as double so that it is generic.multiTrimConcat(List<File> inputs, List<Long> edits, List<org.opencastproject.composer.api.EncodingProfile> profiles, int transitionDuration, boolean hasVideo, boolean hasAudio)
-
Method Details
-
process
protected List<File> process(List<String> commandopts) throws org.opencastproject.composer.api.EncoderException - Throws:
org.opencastproject.composer.api.EncoderException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
commandSplit
Splits a line into tokens - mindful of single and double quoted string as single token Apache common and guava do not deal with quotes- Parameters:
str-- Returns:
- an array of string tokens
-
joinNonNullString
Use a separator to join a string entry only if it is not null or empty- Parameters:
srlist- -array of stringseparator- - to join the string- Returns:
- a string
-
multiTrimConcat
public List<File> multiTrimConcat(List<File> inputs, List<Long> edits, List<org.opencastproject.composer.api.EncodingProfile> profiles, int transitionDuration) throws org.opencastproject.composer.api.EncoderException Concatenate segments of one or more input tracks specified by trim points into the track the edits are passed in as double so that it is generic. The tracks are assumed to have the same resolution.- Parameters:
inputs- - input tracks as a list of filesedits- - edits are a flat list of triplets, each triplet represent one clip: index (int) into input tracks, trim in point(long) in milliseconds and trim out point (long) in milliseconds for each segmentprofiles- - encoding profiles for each delivery target - [optional] one adaptive profile to apply to the outputs to generate manifests/playliststransitionDuration- in ms, transition time between each edited segment- Throws:
org.opencastproject.composer.api.EncoderException- - if it fails
-
multiTrimConcat
public List<File> multiTrimConcat(List<File> inputs, List<Long> edits, List<org.opencastproject.composer.api.EncodingProfile> profiles, int transitionDuration, boolean hasVideo, boolean hasAudio) throws org.opencastproject.composer.api.EncoderException, IllegalArgumentException - Throws:
org.opencastproject.composer.api.EncoderExceptionIllegalArgumentException
-