public class EncodingAttributes extends Object implements Serializable
| Constructor and Description |
|---|
EncodingAttributes() |
| Modifier and Type | Method and Description |
|---|---|
Optional<AudioAttributes> |
getAudioAttributes()
Returns the attributes for the encoding of the audio stream in the target multimedia file.
|
Optional<Integer> |
getDecodingThreads()
Number of threads to use for decoding (if supported by codec) -1 means use default of ffmpeg
|
Optional<Float> |
getDuration()
Returns the duration (seconds) of the re-encoded stream.
|
Optional<Integer> |
getEncodingThreads()
Number of threads to use for encoding (if supported by codec) No value (Optional.empty()) means
use default of ffmpeg
|
Map<String,String> |
getExtraContext()
Returns any additional user supplied context.
|
Optional<Integer> |
getFilterThreads() |
Optional<String> |
getInputFormat()
Returns the format name for the incoming multimedia file.
|
boolean |
getLoop()
Returns if the input is to be considered for looping.
|
Optional<Float> |
getOffset()
Returns the start offset time (seconds).
|
Optional<String> |
getOutputFormat()
Returns the format name for the encoded target multimedia file.
|
Optional<Integer> |
getSafe()
Returns whether or not the encoder will consider file paths "safe".
|
Optional<VideoAttributes> |
getVideoAttributes()
Returns the attributes for the encoding of the video stream in the target multimedia file.
|
boolean |
isMapMetaData() |
EncodingAttributes |
setAudioAttributes(AudioAttributes audioAttributes)
Sets the attributes for the encoding of the audio stream in the target multimedia file.
|
EncodingAttributes |
setDecodingThreads(int decodingThreads)
Number of threads to use for decoding (if supported by codec) -1 means use default of ffmpeg
|
EncodingAttributes |
setDuration(Float duration)
Sets the duration (seconds) of the re-encoded stream.
|
EncodingAttributes |
setEncodingThreads(Integer encodingThreads)
Number of threads to use for encoding (if supported by codec) null means use default of ffmpeg
|
EncodingAttributes |
setExtraContext(Map<String,String> context)
Adds all key/value pairs from context to the extraContext private variable.Meant to be used in
conjunction with
Encoder.addOptionAtIndex(EncodingArgument, Integer).Add
context here and retrieve the context via an EncodingArgument. |
EncodingAttributes |
setFilterThreads(int filterThreads)
ffmpeg uses multiple cores for filtering
|
EncodingAttributes |
setInputFormat(String inputFormat)
Sets the format name for the source multimedia file.
|
EncodingAttributes |
setLoop(boolean loop)
Sets if the inputs will be looped or not.
|
EncodingAttributes |
setMapMetaData(boolean mapMetaData)
Copy over meta data from original file to new output if possible
|
EncodingAttributes |
setOffset(Float offset)
Sets the start offset time (seconds).
|
EncodingAttributes |
setOutputFormat(String format)
Sets the format name for the encoded target multimedia file.
|
EncodingAttributes |
setSafe(Integer safe)
Are the file paths considered "safe": A file path is considered safe if it does not contain a
protocol specification and is relative and all components only contain characters from the
portable character set (letters, digits, period, underscore and hyphen) and have no period at
the beginning of a component.
|
EncodingAttributes |
setVideoAttributes(VideoAttributes videoAttributes)
Sets the attributes for the encoding of the video stream in the target multimedia file.
|
String |
toString() |
void |
validate() |
public Map<String,String> getExtraContext()
Encoder.addOptionAtIndex(EncodingArgument, Integer)public EncodingAttributes setExtraContext(Map<String,String> context)
Encoder.addOptionAtIndex(EncodingArgument, Integer).Add
context here and retrieve the context via an EncodingArgument.context - extra contextpublic Optional<String> getInputFormat()
public EncodingAttributes setInputFormat(String inputFormat)
inputFormat - the format name for the incoming multimedia file.public Optional<String> getOutputFormat()
public EncodingAttributes setOutputFormat(String format)
Encoder.getSupportedEncodingFormats().format - The format name for the encoded target multimedia file.public Optional<Float> getOffset()
public EncodingAttributes setOffset(Float offset)
offset - The start offset time (seconds).public Optional<Float> getDuration()
public EncodingAttributes setDuration(Float duration)
duration - The duration (seconds) of the re-encoded stream.public boolean getLoop()
public EncodingAttributes setLoop(boolean loop)
loop - if the input should be looped.public Optional<Integer> getSafe()
public EncodingAttributes setSafe(Integer safe)
safe - 0 for not safe; 1 for safe; is equivalent to 1 if the format was automatically
probed and 0 otherwise. 1 is the defaultpublic Optional<AudioAttributes> getAudioAttributes()
public EncodingAttributes setAudioAttributes(AudioAttributes audioAttributes)
audioAttributes - The attributes for the encoding of the audio stream in the target
multimedia file.public Optional<VideoAttributes> getVideoAttributes()
public EncodingAttributes setVideoAttributes(VideoAttributes videoAttributes)
videoAttributes - The attributes for the encoding of the video stream in the target
multimedia file.public boolean isMapMetaData()
public EncodingAttributes setMapMetaData(boolean mapMetaData)
mapMetaData - the mapMetaData to setpublic Optional<Integer> getFilterThreads()
public EncodingAttributes setFilterThreads(int filterThreads)
filterThreads - Maximum number of cores/cpus to use -1 means use default of ffmpegpublic Optional<Integer> getDecodingThreads()
public EncodingAttributes setDecodingThreads(int decodingThreads)
decodingThreads - the decodingThreads to setpublic Optional<Integer> getEncodingThreads()
public EncodingAttributes setEncodingThreads(Integer encodingThreads)
encodingThreads - the encodingThreads to setpublic void validate()
Copyright © 2020. All rights reserved.