Skip to content

Commit

Permalink
tests: Add three-pass encode with target bitrate
Browse files Browse the repository at this point in the history
This was previously uncovered when this feature
regressed during CLI rework for a library upgrade.
  • Loading branch information
barrbrain authored and shssoichiro committed Nov 1, 2022
1 parent 02110c5 commit 8deb5ca
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,37 @@ mod binary {
.assert()
.success();
}

#[test]
fn three_pass_bitrate_based() {
let outfile = get_tempfile_path("ivf");
let pass1file = get_tempfile_path("pass1");
let pass2file = get_tempfile_path("pass2");

get_common_cmd(&outfile)
.arg("--first-pass")
.arg(&pass1file)
.arg("-")
.write_stdin(get_y4m_input())
.assert()
.success();

get_common_cmd(&outfile)
.arg("--second-pass")
.arg(&pass1file)
.arg("--first-pass")
.arg(&pass2file)
.arg("-")
.write_stdin(get_y4m_input())
.assert()
.success();

get_common_cmd(&outfile)
.arg("--second-pass")
.arg(&pass2file)
.arg("-")
.write_stdin(get_y4m_input())
.assert()
.success();
}
}

0 comments on commit 8deb5ca

Please sign in to comment.