mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-27 11:37:02 -06:00
fix: CLI --bitrate now applies to VP9 WebM (#440)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Mara Johnson
co-authored by
Claude Opus 5.5
parent
30aaddf7c2
commit
c195e6c40b
@@ -624,7 +624,7 @@ fn from_cwd(path: &str) -> Result<String, Failure> {
|
||||
/// `render`: queue `--comp` (or the active comp) with the given settings unless `--queue`, then
|
||||
/// render the queue with a progress line on stderr. Fails if any item fails.
|
||||
fn render(args: &Args, json_out: bool) -> Result<(), Failure> {
|
||||
use effectcraft_engine::project::render_queue::RenderStatus;
|
||||
use effectcraft_engine::project::render_queue::{OutputFormat, RenderStatus};
|
||||
if args.opt("--bridge").is_some() {
|
||||
return usage_err("render runs headless; use `exec renderQueue.add` / `renderQueue.render` with --bridge");
|
||||
}
|
||||
@@ -670,6 +670,11 @@ fn render(args: &Args, json_out: bool) -> Result<(), Failure> {
|
||||
}
|
||||
if let Some(v) = args.num("--bitrate")? {
|
||||
p["bitrate"] = json!(v);
|
||||
// VP9 WebM encodes by quality unless told to target the bitrate (#440).
|
||||
// The format parser decides what is WebM, so its aliases (`vp9`, `webmvp9opus`) count.
|
||||
if p["format"].as_str().and_then(OutputFormat::from_name) == Some(OutputFormat::WebM) {
|
||||
p["webmBitrate"] = json!(true);
|
||||
}
|
||||
}
|
||||
for (flag, key) in [
|
||||
("--profile", "profile"),
|
||||
|
||||
Reference in New Issue
Block a user