Class BaseOutput<T extends BaseOutput<T>>
java.lang.Object
com.github.kokorin.jaffree.ffmpeg.BaseInOut<T>
com.github.kokorin.jaffree.ffmpeg.BaseOutput<T>
- Type Parameters:
T- self
- All Implemented Interfaces:
Output
- Direct Known Subclasses:
NullOutput,TcpOutput,UrlOutput
Base class which handles all arguments for ffmpeg output.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMap(int inputFileIndex) Maps all streams from the input file.addMap(int inputFileIndex, StreamType streamType) Designate one or more input streams as a source for the output file.Designate one or more input streams as a source for the output file.An alternative [linklabel] form will map outputs from complex filter graphs (see the -filter_complex option) to the output file.addProgram(int number, String title, int... streams) Creates a program with the specified title, program_num and adds the specified stream(s) to it.addProgram(int number, String title, String... streams) Creates a program with the specified title, program_num and adds the specified stream(s) to it.Build a list of command line arguments that are common for ffmpeg input & output.Sets special "copy" codec for all streams.copyCodec(StreamType streamType) Sets special "copy" codec for specified streams.Sets special "copy" codec for specified streams.disableStream(StreamType streamType) Disable stream of the specified type.setFrameCount(StreamType streamType, Long frameCount) Stop writing to the stream after specified number of frames.setOutputPosition(long positionMillis) Stop writing the output at outputPosition.setOutputPosition(Number position, TimeUnit unit) Stop writing the output at outputPosition.setSizeLimit(long sizeLimitBytes) Set the file size limit, expressed in bytes.Methods inherited from class com.github.kokorin.jaffree.ffmpeg.BaseInOut
addArgument, addArguments, getAdditionalArguments, helperThread, setCodec, setCodec, setDuration, setDuration, setFormat, setFrameRate, setFrameRate, setFrameSize, setFrameSize, setFrameSize, setPixelFormat, setPixelFormat, setPosition, setPosition, setPositionEof, setPositionEof, thisAsT, toArgumentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.kokorin.jaffree.ffmpeg.Output
helperThread
-
Constructor Details
-
BaseOutput
- Parameters:
output- output path to file or URI
-
-
Method Details
-
setOutputPosition
Stop writing the output at outputPosition.outputPosition (-to) and duration (-t) are mutually exclusive and duration has priority.
- Parameters:
positionMillis- outputPosition in milliseconds- Returns:
- this
- See Also:
-
setOutputPosition
Stop writing the output at outputPosition.outputPosition (-to) and duration (-t) are mutually exclusive and duration has priority.
- Parameters:
position- outputPositionunit- unit- Returns:
- this
- See Also:
-
setSizeLimit
Set the file size limit, expressed in bytes. No further chunk of bytes is written after the limit is exceeded.The size of the output file is slightly more than the requested file size.
- Parameters:
sizeLimitBytes- size limit in bytes- Returns:
- this
-
copyAllCodecs
Sets special "copy" codec for all streams.- Returns:
- this
-
copyCodec
Sets special "copy" codec for specified streams.- Parameters:
streamSpecifier- stream specifier- Returns:
- this
- See Also:
-
copyCodec
Sets special "copy" codec for specified streams.- Parameters:
streamType- stream type- Returns:
- this
-
disableStream
Disable stream of the specified type.- Parameters:
streamType- stream type- Returns:
- this
-
setFrameCount
Stop writing to the stream after specified number of frames.- Parameters:
streamType- stream typeframeCount- frame count- Returns:
- this
-
addMap
Maps all streams from the input file.Each input stream is identified by the input file index input_file_id. Index starts at 0.
- Parameters:
inputFileIndex- index of input file- Returns:
- this
-
addMap
Designate one or more input streams as a source for the output file.Each input stream is identified by the input file index input_file_id and the input stream index input_stream_id within the input file. Both indices start at 0.
- Parameters:
inputFileIndex- index of input filestreamType- stream type- Returns:
- this
-
addMap
Designate one or more input streams as a source for the output file.Each input stream is identified by the input file index input_file_id and the input stream index input_stream_id within the input file. Both indices start at 0.
- Parameters:
inputFileIndex- index of input filestreamSpecifier- specifier for stream(s) in input file- Returns:
- this
- See Also:
-
addMap
An alternative [linklabel] form will map outputs from complex filter graphs (see the -filter_complex option) to the output file.linklabel must correspond to a defined output link label in the graph.
- Parameters:
linkLabel- label in complex filter- Returns:
- this
-
addProgram
Creates a program with the specified title, program_num and adds the specified stream(s) to it.- Parameters:
number- program numbertitle- program titlestreams- stream to add to a program- Returns:
- this
-
addProgram
Creates a program with the specified title, program_num and adds the specified stream(s) to it.- Parameters:
number- program numbertitle- program titlestreams- stream to add to a program- Returns:
- this
-
buildArguments
Build a list of command line arguments that are common for ffmpeg input & output.- Specified by:
buildArgumentsin interfaceOutput- Overrides:
buildArgumentsin classBaseInOut<T extends BaseOutput<T>>- Returns:
- list of command line arguments
-