Fix FFmpeg wanting to use JPEG files when rendering PNG
The preview video task would attempt to use JPEG preview files when the "Preview" checkbox is checked, even when this checkbox is not shown in Blender's UI (when the output format is not EXR). Blender still stores this property, even when it's unused, and that's what tripped up the job compiler. The "Simple Blender Render" job type now first checks whether the previews are necessary at all, and only then uses them.
This commit is contained in:
parent
1cef0d48df
commit
982dca0d4e
@ -114,7 +114,8 @@ function authorRenderTasks(settings, renderDir, renderOutput) {
|
||||
}
|
||||
|
||||
function authorCreateVideoTask(settings, renderDir) {
|
||||
if (!settings.has_previews && ffmpegIncompatibleImageFormats.has(settings.format)) {
|
||||
const needsPreviews = ffmpegIncompatibleImageFormats.has(settings.format);
|
||||
if (needsPreviews && !settings.has_previews) {
|
||||
print("Not authoring video task, FFmpeg-incompatible render output")
|
||||
return;
|
||||
}
|
||||
@ -125,7 +126,7 @@ function authorCreateVideoTask(settings, renderDir) {
|
||||
|
||||
const stem = path.stem(settings.blendfile).replace('.flamenco', '');
|
||||
const outfile = path.join(renderDir, `${stem}-${settings.frames}.mp4`);
|
||||
const outfileExt = settings.has_previews ? ".jpg" : settings.image_file_extension;
|
||||
const outfileExt = needsPreviews ? ".jpg" : settings.image_file_extension;
|
||||
|
||||
const task = author.Task('preview-video', 'ffmpeg');
|
||||
const command = author.Command("frames-to-video", {
|
||||
|
Loading…
x
Reference in New Issue
Block a user