Constructor and Description |
---|
UrlInOut() |
Modifier and Type | Method and Description |
---|---|
T |
addCodec(StreamSpecifier streamSpecifier,
String codecName) |
T |
addCodecCopy()
Sets special "copy" codec for all streams
|
T |
addCodecCopy(StreamSpecifier streamSpecifier)
Sets special "copy" codec for specified streams
|
T |
addOption(Option option)
Add custom option.
|
T |
addOption(String key) |
T |
addOption(String key,
String value) |
protected List<Option> |
buildCommonOptions() |
abstract List<Option> |
buildOptions() |
T |
setDuration(long durationMillis)
When used as an input option, limit the duration of data read from the input file.
|
T |
setDuration(long duration,
TimeUnit timeUnit) |
T |
setFormat(String format)
Force input or output file format.
|
T |
setPosition(long positionMillis)
When used as an input option, seeks in this input file to position.
|
T |
setPosition(long position,
TimeUnit unit) |
T |
setPositionEof(long positionEofMillis)
Like the
setPosition(long) (-ss) option but relative to the "end of file". |
T |
setPositionEof(long positionEof,
TimeUnit unit)
Like the
setPositionEof(long) (-ss) option but relative to the "end of file". |
public T setFormat(String format)
format
- formatpublic T setDuration(long durationMillis)
When used as an output option, stop writing the output after its duration reaches duration.
durationMillis
- duration in millisecondspublic T setDuration(long duration, TimeUnit timeUnit)
duration
- durationtimeUnit
- unit of durationsetDuration(long)
public T setPosition(long positionMillis)
Note that in most formats it is not possible to seek exactly, so ffmpeg will seek to the closest seek point before position. When transcoding and -accurate_seek is enabled (the default), this extra segment between the seek point and position will be decoded and discarded. When doing stream copy or when -noaccurate_seek is used, it will be preserved.
When used as an output option (before an output url), decodes but discards input until the timestamps reach position.
positionMillis
- position in milliseconds.public T setPosition(long position, TimeUnit unit)
position
- position.unit
- time unitsetPosition(long)
public T setPositionEof(long positionEofMillis)
setPosition(long)
(-ss) option but relative to the "end of file".
That is negative values are earlier in the file, 0 is at EOF.positionEofMillis
- position in milliseconds, relative to the EOFpublic T setPositionEof(long positionEof, TimeUnit unit)
setPositionEof(long)
(-ss) option but relative to the "end of file".
That is negative values are earlier in the file, 0 is at EOF.positionEof
- position, relative to the EOFunit
- time unitsetPositionEof(long)
public T addCodecCopy()
public T addCodecCopy(StreamSpecifier streamSpecifier)
public T addCodec(StreamSpecifier streamSpecifier, String codecName)
public T addOption(Option option)
option
- option to addCopyright © 2017. All rights reserved.