Fix FFmpeg task when rendering list of frames #104286

Manually merged
Sybren A. Stüvel merged 2 commits from EmmanuelDurand/flamenco:fix/ffmpeg-list-of-frames into main 2024-02-24 11:58:25 +01:00
2 changed files with 12 additions and 8 deletions
Showing only changes of commit 857fd53c6d - Show all commits

View File

@ -148,15 +148,17 @@ function authorCreateVideoTask(settings, renderDir) {
return;
}
const stem = path.stem(settings.blendfile).replace('.flamenco', '');
var outfile = path.join(renderDir, `${stem}-${settings.frames}.mp4`);
if (outfile.search(',') != -1) {
var frames = `${settings.frames}`;
if (frames.search(',') != -1) {
// Get the first and last frame from the list
const chunks = frameChunker(settings.frames, 1);
const firstFrame = chunks[0];
const lastFrame = chunks.slice(-1)[0];
outfile = path.join(renderDir, `${stem}-${firstFrame}-${lastFrame}.mp4`);
frames = `${firstFrame}-${lastFrame}`;
}
const stem = path.stem(settings.blendfile).replace('.flamenco', '');
const outfile = path.join(renderDir, `${stem}-${frames}.mp4`);
const outfileExt = guessOutputFileExtension(settings);
const task = author.Task('preview-video', 'ffmpeg');

View File

@ -129,15 +129,17 @@ function authorCreateVideoTask(settings, renderDir) {
return;
}
const stem = path.stem(settings.blendfile).replace('.flamenco', '');
var outfile = path.join(renderDir, `${stem}-${settings.frames}.mp4`);
if (outfile.search(',') != -1) {
var frames = `${settings.frames}`;
if (frames.search(',') != -1) {
// Get the first and last frame from the list
const chunks = frameChunker(settings.frames, 1);
const firstFrame = chunks[0];
const lastFrame = chunks.slice(-1)[0];
outfile = path.join(renderDir, `${stem}-${firstFrame}-${lastFrame}.mp4`);
frames = `${firstFrame}-${lastFrame}`;
}
const stem = path.stem(settings.blendfile).replace('.flamenco', '');
const outfile = path.join(renderDir, `${stem}-${frames}.mp4`);
const outfileExt = needsPreviews ? ".jpg" : settings.image_file_extension;
const task = author.Task('preview-video', 'ffmpeg');