🐛 burn_captions works with png_sequence, still and gif exports instead of calling them audio only
Browse files at this commit6a8d9903e9d6ca7890764a2c5fcfd67ded0cc87dParent: bc736392 changed files +6 -1
crates/engine/src/export.rsmodified+5 -0
| @@ -315,6 +315,11 @@ impl Format { | ||
| 315 | 315 | ) |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | + /// Whether it shows a picture at all: a video format, or the PNG and GIF ones. | |
| 319 | + pub fn shows_picture(self) -> bool { | |
| 320 | + self.has_video() || matches!(self, Self::PngSequence | Self::Still | Self::Gif) | |
| 321 | + } | |
| 322 | + | |
| 318 | 323 | /// Whether the picture in it is AV1 rather than H.264 -- which encoder runs |
| 319 | 324 | /// and which of the two AV1 containers is being written are separate |
| 320 | 325 | /// questions, and this is the first. |
crates/mcp/src/tools/export.rsmodified+1 -1
| @@ -1540,7 +1540,7 @@ fn export_start(srv: &mut Server, args: &Value) -> Reply { | ||
| 1540 | 1540 | Ok(v) => v, |
| 1541 | 1541 | Err(e) => return Reply::err(e), |
| 1542 | 1542 | }; |
| 1543 | - if burn.is_some() && sound_only { | |
| 1543 | + if burn.is_some() && (!format.shows_picture() || (!has_picture && format.ext() == "mp4")) { | |
| 1544 | 1544 | return Reply::err(format!( |
| 1545 | 1545 | "burn_captions draws into the picture, and {} is audio only: drop burn_captions, or export a video format", |
| 1546 | 1546 | format_name(format) |