|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.sauronsoftware.jave.Encoder
public class Encoder
Main class of the package. Instances can encode audio and video streams.
| Constructor Summary | |
|---|---|
Encoder()
It builds an encoder using a DefaultFFMPEGLocator instance to
locate the ffmpeg executable to use. |
|
Encoder(FFMPEGLocator locator)
It builds an encoder with a custom FFMPEGLocator. |
|
| Method Summary | |
|---|---|
void |
encode(java.io.File source,
java.io.File target,
EncodingAttributes attributes)
Re-encode a multimedia file. |
void |
encode(java.io.File source,
java.io.File target,
EncodingAttributes attributes,
EncoderProgressListener listener)
Re-encode a multimedia file. |
java.lang.String[] |
getAudioDecoders()
Returns a list with the names of all the audio decoders bundled with the ffmpeg distribution in use. |
java.lang.String[] |
getAudioEncoders()
Returns a list with the names of all the audio encoders bundled with the ffmpeg distribution in use. |
MultimediaInfo |
getInfo(java.io.File source)
Returns a set informations about a multimedia file, if its format is supported for decoding. |
java.lang.String[] |
getSupportedDecodingFormats()
Returns a list with the names of all the file formats supported at decoding time by the underlying ffmpeg distribution. |
java.lang.String[] |
getSupportedEncodingFormats()
Returns a list with the names of all the file formats supported at encoding time by the underlying ffmpeg distribution. |
java.lang.String[] |
getVideoDecoders()
Returns a list with the names of all the video decoders bundled with the ffmpeg distribution in use. |
java.lang.String[] |
getVideoEncoders()
Returns a list with the names of all the video encoders bundled with the ffmpeg distribution in use. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Encoder()
DefaultFFMPEGLocator instance to
locate the ffmpeg executable to use.
public Encoder(FFMPEGLocator locator)
FFMPEGLocator.
locator - The locator picking up the ffmpeg executable used by the
encoder.| Method Detail |
|---|
public java.lang.String[] getAudioDecoders()
throws EncoderException
EncoderException - If a problem occurs calling the underlying ffmpeg executable.
public java.lang.String[] getAudioEncoders()
throws EncoderException
EncoderException - If a problem occurs calling the underlying ffmpeg executable.
public java.lang.String[] getVideoDecoders()
throws EncoderException
EncoderException - If a problem occurs calling the underlying ffmpeg executable.
public java.lang.String[] getVideoEncoders()
throws EncoderException
EncoderException - If a problem occurs calling the underlying ffmpeg executable.
public java.lang.String[] getSupportedEncodingFormats()
throws EncoderException
EncoderException - If a problem occurs calling the underlying ffmpeg executable.
public java.lang.String[] getSupportedDecodingFormats()
throws EncoderException
EncoderException - If a problem occurs calling the underlying ffmpeg executable.
public MultimediaInfo getInfo(java.io.File source)
throws InputFormatException,
EncoderException
source - The source multimedia file.
InputFormatException - If the format of the source file cannot be recognized and
decoded.
EncoderException - If a problem occurs calling the underlying ffmpeg executable.
public void encode(java.io.File source,
java.io.File target,
EncodingAttributes attributes)
throws java.lang.IllegalArgumentException,
InputFormatException,
EncoderException
source - The source multimedia file. It cannot be null. Be sure this
file can be decoded (see
getSupportedDecodingFormats(),
getAudioDecoders() and
getVideoDecoders()).target - The target multimedia re-encoded file. It cannot be null. If
this file already exists, it will be overwrited.attributes - A set of attributes for the encoding process.
java.lang.IllegalArgumentException - If both audio and video parameters are null.
InputFormatException - If the source multimedia file cannot be decoded.
EncoderException - If a problems occurs during the encoding process.
public void encode(java.io.File source,
java.io.File target,
EncodingAttributes attributes,
EncoderProgressListener listener)
throws java.lang.IllegalArgumentException,
InputFormatException,
EncoderException
source - The source multimedia file. It cannot be null. Be sure this
file can be decoded (see
getSupportedDecodingFormats(),
getAudioDecoders() and
getVideoDecoders()).target - The target multimedia re-encoded file. It cannot be null. If
this file already exists, it will be overwrited.attributes - A set of attributes for the encoding process.listener - An optional progress listener for the encoding process. It can
be null.
java.lang.IllegalArgumentException - If both audio and video parameters are null.
InputFormatException - If the source multimedia file cannot be decoded.
EncoderException - If a problems occurs during the encoding process.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||