Class BaseInput<T extends BaseInput<T>>
java.lang.Object
com.github.kokorin.jaffree.ffmpeg.BaseInOut<T>
com.github.kokorin.jaffree.ffmpeg.BaseInput<T>
- Type Parameters:
T- self
- All Implemented Interfaces:
Input
- Direct Known Subclasses:
CaptureInput,TcpInput,UrlInput
Base class which handles all arguments for ffmpeg input.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuild a list of command line arguments that are common for ffmpeg input & output.setReadAtFrameRate(boolean readAtFrameRate) Read input at native frame rate.setStreamLoop(Integer streamLoop) Set number of times input stream shall be looped.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.Input
helperThread
-
Constructor Details
-
BaseInput
- Parameters:
input- path to file or URI
-
-
Method Details
-
setStreamLoop
Set number of times input stream shall be looped. Loop 0 means no loop, loop -1 means infinite loop.- Parameters:
streamLoop- number of loops- Returns:
- this
-
setReadAtFrameRate
Read input at native frame rate. Mainly used to simulate a grab device, or live input stream (e.g. when reading from a file).Should not be used with actual grab devices or live input streams (where it can cause packet loss).
By default ffmpeg attempts to read the input(s) as fast as possible. This option will slow down the reading of the input(s) to the native frame rate of the input(s).
It is useful for real-time output (e.g. live streaming).
- Parameters:
readAtFrameRate- whether or not to read at native frame rate- Returns:
- this
-
buildArguments
Build a list of command line arguments that are common for ffmpeg input & output.- Specified by:
buildArgumentsin interfaceInput- Overrides:
buildArgumentsin classBaseInOut<T extends BaseInput<T>>- Returns:
- list of command line arguments
-