Class EncoderEngine

java.lang.Object
org.opencastproject.composer.impl.EncoderEngine
All Implemented Interfaces:
AutoCloseable

public class EncoderEngine extends Object implements AutoCloseable
Abstract base class for encoder engines.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    Rewrite 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 Type
    Method
    Description
    void
     
    Splits a line into tokens - mindful of single and double quoted string as single token Apache common and guava do not deal with quotes
    joinNonNullString(String[] srlist, String separator)
    Use a separator to join a string entry only if it is not null or empty
    multiTrimConcat(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)
     
    protected List<File>
    process(List<String> commandopts)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      close in interface AutoCloseable
    • commandSplit

      public List<String> 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 quotes
      Parameters:
      str -
      Returns:
      an array of string tokens
    • joinNonNullString

      public String joinNonNullString(String[] srlist, String separator)
      Use a separator to join a string entry only if it is not null or empty
      Parameters:
      srlist - -array of string
      separator - - 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 files
      edits - - 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 segment
      profiles - - encoding profiles for each delivery target - [optional] one adaptive profile to apply to the outputs to generate manifests/playlists
      transitionDuration - 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.EncoderException
      IllegalArgumentException