Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public abstract class AbstractFFmpegStreamBuilder<T extends AbstractFFmpegStream
public String video_movflags;
public Integer video_frames;
public String video_pixel_format;
public String video_filter_complex;

public boolean subtitle_enabled = true;
public String subtitle_preset;
Expand Down Expand Up @@ -224,6 +225,12 @@ public T setVideoMovFlags(String movflags) {
return getThis();
}

public T setComplexVideoFilter(String filter) {
this.video_enabled = true;
this.video_filter_complex = checkNotEmpty(filter, "complex video filter must not be empty");
return getThis();
}

/**
* Sets the video's frame rate
*
Expand Down Expand Up @@ -679,5 +686,9 @@ protected void addVideoFlags(FFmpegBuilder parent, ImmutableList.Builder<String>
if (video_frame_rate != null) {
args.add("-r", video_frame_rate.toString());
}

if (!Strings.isNullOrEmpty(video_filter_complex)) {
args.add("-filter_complex", video_filter_complex);
}
}
}
2 changes: 1 addition & 1 deletion src/test/java/net/bramp/ffmpeg/ExamplesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public void testExample8() throws IOException {

// Convert a stereo mp3 into two mono tracks.
@Test
public void testExample8() throws IOException {
public void testExample9() throws IOException {
FFmpegBuilder builder = new FFmpegBuilder()
.setVerbosity(FFmpegBuilder.Verbosity.DEBUG)
.setInput("input.mp3")
Expand Down