Class MediaConfig

java.lang.Object
org.apache.tika.parser.inference.MediaConfig
All Implemented Interfaces:
Serializable, Initializable

public class MediaConfig extends Object implements Serializable, Initializable
The "media" parse-context block: how audio and video are cut into segments before a MEDIA binding sees them. One grid per document, shared by every binding, so the vectors of one segment land on one chunk. Defaults: 25 s windows, 5 s overlap, 480 segments; 25 s keeps an audio item under the 30 s cap hosted omni engines enforce (Jina rejects 30.0 s).
See Also:
  • Constructor Details

    • MediaConfig

      public MediaConfig()
  • Method Details

    • getSegment

      public MediaConfig.Segment getSegment()
    • setSegment

      public void setSegment(MediaConfig.Segment segment)
    • getMaxSegments

      public int getMaxSegments()
      Segments per document; the rest of the file is not embedded. -1 for no limit.
    • setMaxSegments

      public void setMaxSegments(int maxSegments)
    • initialize

      public void initialize() throws TikaConfigException
      Runs at config load and per request; the task checks again for a programmatic block.
      Specified by:
      initialize in interface Initializable
      Throws:
      TikaConfigException - if there is a problem with the configuration