Class CropServiceImpl

java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.crop.impl.CropServiceImpl
All Implemented Interfaces:
CropService, JobProducer, org.osgi.service.cm.ManagedService

public class CropServiceImpl extends AbstractJobProducer implements CropService, org.osgi.service.cm.ManagedService
Media analysis plugin that takes a video stream and removes black bars on each side

This plugin runs

     ffmpeg -i input.file -vf cropdetect=24:16:0 -max_muxing_qurue_size 2000 -f null -

     ffmpeg -i input.file -vf startCropping=wi-2*x:hi:x:0 -max_muxing_queue_size 2000 -y output.file
 
  • Field Details

    • COLLECTION_ID

      public static final String COLLECTION_ID
      Resulting collection in the working file repository
      See Also:
    • binary

      protected String binary
      Path to the executable
    • FFMPEG_BINARY_CONFIG

      public static final String FFMPEG_BINARY_CONFIG
      See Also:
    • FFMPEG_BINARY_DEFAULT

      public static final String FFMPEG_BINARY_DEFAULT
      See Also:
    • DEFAULT_CROP_JOB_LOAD

      public static final float DEFAULT_CROP_JOB_LOAD
      The load introduced on the system by creating a caption job
      See Also:
    • CROP_JOB_LOAD_KEY

      public static final String CROP_JOB_LOAD_KEY
      The key to look for in the service configuration file to override the DEFAULT_CROP_JOB_LOAD
      See Also:
    • CROP_FFMPEG_GREYSCALE_LIMIT

      public static final String CROP_FFMPEG_GREYSCALE_LIMIT
      The threshold of greyscale to use for cropping
      See Also:
    • DEFAULT_CROP_GREYSCALE_LIMIT

      public static final String DEFAULT_CROP_GREYSCALE_LIMIT
      See Also:
    • CROP_FFMPEG_ROUND

      public static final String CROP_FFMPEG_ROUND
      The value which the width/height should be divisible by
      See Also:
    • DEFAULT_CROP_FFMPEG_ROUND

      public static final String DEFAULT_CROP_FFMPEG_ROUND
      See Also:
    • CROP_FFMPEG_RESET

      public static final String CROP_FFMPEG_RESET
      The counter that determines after how many frames cropdetect will be executed again
      See Also:
    • DEFAULT_CROP_FFMPEG_RESET

      public static final String DEFAULT_CROP_FFMPEG_RESET
      See Also:
    • CROP_FFMPEG_PARAM

      public static final String CROP_FFMPEG_PARAM
      Additional parameters that will be added to the ffmpeg command line
      See Also:
    • DEFAULT_CROP_FFMPEG_PARAM

      public static final String DEFAULT_CROP_FFMPEG_PARAM
      See Also:
    • CROP_FFMPEG_TARGET_EXTENSION

      public static final String CROP_FFMPEG_TARGET_EXTENSION
      File extension for the resulting cropped video
      See Also:
    • DEFAULT_CROP_FFMPEG_TARGET_EXTENSION

      public static final String DEFAULT_CROP_FFMPEG_TARGET_EXTENSION
      See Also:
    • CROP_FFMPEG_REGEX

      public static final String CROP_FFMPEG_REGEX
      Regular expression to grep the detected crop parameters from the ffmpeg output. Be aware that the names for the named groups must be present.
      See Also:
    • DEFAULT_CROP_FFMPEG_REGEX

      public static final String DEFAULT_CROP_FFMPEG_REGEX
      See Also:
    • CROP_FFMPEG_MAX_CROPPING_RATIO

      public static final String CROP_FFMPEG_MAX_CROPPING_RATIO
      Regular expression to grep the detected crop parameters from the ffmpeg output. Be aware that the names for the named groups must be present.
      See Also:
    • DEFAULT_CROP_FFMPEG_MAX_CROPPING_RATIO

      public static final Integer DEFAULT_CROP_FFMPEG_MAX_CROPPING_RATIO
  • Constructor Details

    • CropServiceImpl

      public CropServiceImpl()
      Creates a new instance of the startCropping service.
  • Method Details