public class ScreenExtractor extends Object
| Constructor and Description |
|---|
ScreenExtractor()
It builds an extractor using a
DefaultFFMPEGLocator instance to
locate the ffmpeg executable to use. |
ScreenExtractor(FFMPEGLocator locator)
It builds an extractor with a custom
FFMPEGLocator. |
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfScreens() |
void |
render(MultimediaObject multimediaObject,
int width,
int height,
int seconds,
File target,
int quality)
Generate a single screenshot from source video.
|
void |
render(MultimediaObject multimediaObject,
int width,
int height,
int seconds,
File outputDir,
String fileNamePrefix,
String extension,
int quality)
Generates screenshots from source video.
|
public ScreenExtractor()
DefaultFFMPEGLocator instance to
locate the ffmpeg executable to use.public ScreenExtractor(FFMPEGLocator locator)
FFMPEGLocator.locator - The locator picking up the ffmpeg executable used by the
extractor.public int getNumberOfScreens()
public void render(MultimediaObject multimediaObject, int width, int height, int seconds, File outputDir, String fileNamePrefix, String extension, int quality) throws InputFormatException, EncoderException
multimediaObject - Source MultimediaObject @see MultimediaObjectwidth - Output widthheight - Output heightseconds - Interval in seconds between screensoutputDir - Destination of output imagesfileNamePrefix - Name all thumbnails will start withextension - Image extension for output (jpg, png, etc)quality - The range is between 1-31 with 31 being the worst qualityInputFormatException - If the source multimedia file cannot be
decoded.EncoderException - If a problems occurs during the encoding
process.public void render(MultimediaObject multimediaObject, int width, int height, int seconds, File target, int quality) throws EncoderException
multimediaObject - Source MultimediaObject @see MultimediaObjectwidth - Output widthheight - Output heightseconds - Interval in seconds between screenstarget - Destination of output imagequality - The range is between 1-31 with 31 being the worst qualityInputFormatException - If the source multimedia file cannot be
decoded.EncoderException - If a problems occurs during the encoding
process.Copyright © 2018. All rights reserved.