Class VideoToolsServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.platform.video.tools.service.VideoToolsServiceImpl
- All Implemented Interfaces:
VideoToolsService,Adaptable,Component,Extensible,TimestampedService
The
VideoToolsService default implementation for handling video blobs. It provides extension points for
handling video operations, such as concat, slice, watermark and extract closed captions.- Since:
- 8.4
-
Field Summary
FieldsFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(ComponentContext context) Activates the component.Concat the input video blobs into a single video blob.extractClosedCaptions(Blob video, String outputFormat, String startAt, String endAt) Extracts the closed captions from a video blob.booleanisToolAvailable(String toolName) Checks if a determined tool is available.protected CmdParameterssetupCmdParameters(Map<String, String> parameters) Slices a video blob from a start time and the input duration.Add a watermark to a video blob.Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterContribution, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
videoTools
-
-
Constructor Details
-
VideoToolsServiceImpl
public VideoToolsServiceImpl()
-
-
Method Details
-
activate
Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
extractClosedCaptions
Description copied from interface:VideoToolsServiceExtracts the closed captions from a video blob.- Specified by:
extractClosedCaptionsin interfaceVideoToolsService- Parameters:
video- the input bloboutputFormat- the outformat of the captions (srt, txt, ttxt is the default)startAt- the start time in format "xx:xx"endAt- the end time in format "xx:xx"- Returns:
- the closed captions if any were found
-
concat
Description copied from interface:VideoToolsServiceConcat the input video blobs into a single video blob.- Specified by:
concatin interfaceVideoToolsService- Returns:
- video blob with the videos concatenated
-
slice
Description copied from interface:VideoToolsServiceSlices a video blob from a start time and the input duration. If start it empty, the blob will be sliced in n-parts with similar duration. If duration is empty, the video blob will be sliced from startAt until the end.- Specified by:
slicein interfaceVideoToolsService- Parameters:
video- the input blobstartAt- the start time in "xx:xx" formatduration- the duration of the sliced blob in secondsencode- option to re-encode the ouptut video blob- Returns:
- video blobs generated by the slicer
-
watermark
Description copied from interface:VideoToolsServiceAdd a watermark to a video blob.- Specified by:
watermarkin interfaceVideoToolsService- Parameters:
video- the input blobpicture- the picture blob to be used as the watermarkx- the x offset starting from the lefty- the y offset starting from the top- Returns:
- a video blob with a watermark at the position specified
-
isToolAvailable
Description copied from interface:VideoToolsServiceChecks if a determined tool is available.- Specified by:
isToolAvailablein interfaceVideoToolsService- Parameters:
toolName- the name of the tool- Returns:
- true if the tool is available or false otherwise
-
setupCmdParameters
-