Package ws.schild.jave.filters
Class FilterGraph
- java.lang.Object
-
- ws.schild.jave.filters.FilterGraph
-
- All Implemented Interfaces:
VideoFilter
- Direct Known Subclasses:
FilterAndWatermark,OverlayWatermark
public class FilterGraph extends java.lang.Object implements VideoFilter
A filtergraph as described by FFMPEG Documentation.A filtergraph can optionally start with sws_flags for scaling of outputs and is then composed of a semi-colon separated series of filterchains.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<FilterChain>chainsprivate java.util.Optional<java.lang.String>swsFlags
-
Constructor Summary
Constructors Constructor Description FilterGraph()Create an empty filtergraph.FilterGraph(java.lang.String swsFlags, FilterChain... chains)Create a filtergraph with a specified list of filterchains and specified sws_flags.FilterGraph(FilterChain... chains)Create a filtergraph with a specified list of filterchains.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilterGraphaddChain(FilterChain chain)Add a filterchain to this filtergraph.java.lang.StringgetExpression()The expression to be used in the video filter argument to ffmpegFilterGraphsetSwsFlags(java.lang.String swsFlags)set the sws_flags to pass to libavfilter scale filters.
-
-
-
Field Detail
-
swsFlags
private java.util.Optional<java.lang.String> swsFlags
-
chains
private java.util.List<FilterChain> chains
-
-
Constructor Detail
-
FilterGraph
public FilterGraph()
Create an empty filtergraph.
-
FilterGraph
public FilterGraph(FilterChain... chains)
Create a filtergraph with a specified list of filterchains.- Parameters:
chains- The list of filterchains to be used in this filtergraph.
-
FilterGraph
public FilterGraph(java.lang.String swsFlags, FilterChain... chains)Create a filtergraph with a specified list of filterchains and specified sws_flags.- Parameters:
chains- The list of filterchains to be used in this filtergraph.swsFlags- The sws_flags parameter to pass to libavfilter scale filters.
-
-
Method Detail
-
addChain
public FilterGraph addChain(FilterChain chain)
Add a filterchain to this filtergraph.- Parameters:
chain- The filterchain to add to this filtergraph.- Returns:
- this FilterGraph for builder pattern magic
-
setSwsFlags
public FilterGraph setSwsFlags(java.lang.String swsFlags)
set the sws_flags to pass to libavfilter scale filters.- Parameters:
swsFlags- The flags that will; be passed to libavfilter scale filters.- Returns:
- this FilterGraph for builder pattern magic
-
getExpression
public java.lang.String getExpression()
Description copied from interface:VideoFilterThe expression to be used in the video filter argument to ffmpeg- Specified by:
getExpressionin interfaceVideoFilter- Returns:
- A string that will be placed in the -vf or -filter_complex option to ffmpeg.
-
-