com.googlecode.fascinator.transformer.ffmpeg
Class FfmpegTransformer

java.lang.Object
  extended by com.googlecode.fascinator.transformer.ffmpeg.FfmpegTransformer
All Implemented Interfaces:
Plugin, Transformer

public class FfmpegTransformer
extends Object
implements Transformer

This plugin is used for converting audio and video media to web-friendly versions using FFmpeg library.

Configuration

Please refer to below wiki link for more information about the configuration options

Wiki Link

https://fascinator.usq.edu.au/trac/wiki/Fascinator/Documents/Plugins/ Transformer/Ffmpeg

Author:
Oliver Lucido, Linda Octalina, Greg Pendlebury

Constructor Summary
FfmpegTransformer()
          Basic constructor
FfmpegTransformer(Ffmpeg ffmpeg)
          Instantiate the transformer with an existing instantiation of Ffmpeg
 
Method Summary
 Payload createFfmpegErrorPayload(DigitalObject object)
          Create ffmpeg error payload
 Payload createFfmpegPayload(DigitalObject object, File file)
          Create converted ffmpeg payload
 String getId()
          Get Transformer id
 String getName()
          Get Transformer name
 PluginDescription getPluginDetails()
          Gets a PluginDescription object relating to this plugin.
 void init(File jsonFile)
          Init method to initialise Ffmpeg transformer
 void init(String jsonString)
          Init method to initialise Ffmpeg transformer
 void shutdown()
          Shut down the transformer plugin
 DigitalObject transform(DigitalObject object, String jsonConfig)
          Transforming digital object method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FfmpegTransformer

public FfmpegTransformer()
Basic constructor


FfmpegTransformer

public FfmpegTransformer(Ffmpeg ffmpeg)
Instantiate the transformer with an existing instantiation of Ffmpeg

Parameters:
ffmpeg - already instaniated ffmpeg installation
Method Detail

init

public void init(File jsonFile)
          throws PluginException
Init method to initialise Ffmpeg transformer

Specified by:
init in interface Plugin
Parameters:
jsonFile -
Throws:
IOException
PluginException

init

public void init(String jsonString)
          throws PluginException
Init method to initialise Ffmpeg transformer

Specified by:
init in interface Plugin
Parameters:
jsonString -
Throws:
IOException
PluginException

transform

public DigitalObject transform(DigitalObject object,
                               String jsonConfig)
                        throws TransformerException
Transforming digital object method

Specified by:
transform in interface Transformer
Returns:
transformed DigitalObject after transformation
Throws:
TransformerException - if the transformation fails

createFfmpegErrorPayload

public Payload createFfmpegErrorPayload(DigitalObject object)
                                 throws StorageException,
                                        FileNotFoundException,
                                        UnsupportedEncodingException
Create ffmpeg error payload

Parameters:
object - : DigitalObject to store the payload
Returns:
Payload the error payload
Throws:
FileNotFoundException - if the file provided does not exist
UnsupportedEncodingException - for encoding errors in the message
StorageException

createFfmpegPayload

public Payload createFfmpegPayload(DigitalObject object,
                                   File file)
                            throws StorageException,
                                   FileNotFoundException
Create converted ffmpeg payload

Parameters:
object - DigitalObject to store the payload
file - File to be stored as payload
Returns:
Payload new payload
Throws:
StorageException - if there is a problem trying to store
FileNotFoundException - if the file provided does not exist

getId

public String getId()
Get Transformer id

Specified by:
getId in interface Plugin
Returns:
id

getName

public String getName()
Get Transformer name

Specified by:
getName in interface Plugin
Returns:
name

getPluginDetails

public PluginDescription getPluginDetails()
Gets a PluginDescription object relating to this plugin.

Specified by:
getPluginDetails in interface Plugin
Returns:
a PluginDescription

shutdown

public void shutdown()
              throws PluginException
Shut down the transformer plugin

Specified by:
shutdown in interface Plugin
Throws:
PluginException


Copyright © 2009-2014. All Rights Reserved.