Job compiler: simplify output video name on rendering list of frames

When a more complex list of frames is to be rendered (like `1, 4, 5, 10,
15`), simplify the video filename to `{first}-{last}`.

Before: `somename-1, 4, 5, 10, 15.mp4`
Now:    `somename-1-15.mp4`
This commit is contained in:
Emmanuel Durand 2024-02-22 13:59:58 -05:00 committed by Sybren A. Stüvel
parent 5b17fb24fd
commit 1ffe0a10bd
3 changed files with 21 additions and 2 deletions

@ -7,6 +7,7 @@ bugs in actually-released versions.
## 3.5 - in development
- Add MQTT support. Flamenco Manager can now send internal events to an MQTT broker.
- Simplify the preview video filename when a complex set of frames rendered ([#104285](https://projects.blender.org/studio/flamenco/issues/104285)). Instead of `video-1, 4, 10.mp4` it is now simply `video-1-10.mp4`.
## 3.4 - released 2024-01-12

@ -148,8 +148,17 @@ function authorCreateVideoTask(settings, renderDir) {
return;
}
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];
frames = `${firstFrame}-${lastFrame}`;
}
const stem = path.stem(settings.blendfile).replace('.flamenco', '');
const outfile = path.join(renderDir, `${stem}-${settings.frames}.mp4`);
const outfile = path.join(renderDir, `${stem}-${frames}.mp4`);
const outfileExt = guessOutputFileExtension(settings);
const task = author.Task('preview-video', 'ffmpeg');

@ -129,8 +129,17 @@ function authorCreateVideoTask(settings, renderDir) {
return;
}
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];
frames = `${firstFrame}-${lastFrame}`;
}
const stem = path.stem(settings.blendfile).replace('.flamenco', '');
const outfile = path.join(renderDir, `${stem}-${settings.frames}.mp4`);
const outfile = path.join(renderDir, `${stem}-${frames}.mp4`);
const outfileExt = needsPreviews ? ".jpg" : settings.image_file_extension;
const task = author.Task('preview-video', 'ffmpeg');