mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-12 22:37:21 +02:00
[nodes] KeyframeSelection: Flag outputExtension
for video inputs
If at least one of the inputs is a video, then the `outputExtension` attribute should never be set to "none": if it is, no frame will ever be written on disk, and as a consequence, no SfMData file will be written, meaning that the whole score computation and keyframe selection process will have been done for nothing.
This commit is contained in:
parent
e6bf7e6e2d
commit
76d2e8680e
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,9 @@ __version__ = "4.1"
|
|||
import os
|
||||
from meshroom.core import desc
|
||||
|
||||
# List of supported video extensions (provided by OpenImageIO)
|
||||
videoExts = [".avi", ".mov", ".mp4", ".m4a", ".m4v", ".3gp", ".3g2", ".mj2", ".m4v", ".mpg"]
|
||||
|
||||
class KeyframeSelectionNodeSize(desc.DynamicNodeSize):
|
||||
def computeSize(self, node):
|
||||
inputPathsSize = super(KeyframeSelectionNodeSize, self).computeSize(node)
|
||||
|
@ -273,6 +276,8 @@ You can extract frames at regular interval by configuring only the min/maxFrameS
|
|||
value="none",
|
||||
values=["none", "exr", "jpg", "png"],
|
||||
exclusive=True,
|
||||
validValue=lambda node: not (any(ext in input.value.lower() for ext in videoExts for input in node.inputPaths.value) and node.outputExtension.value == "none"),
|
||||
errorMessage="A video input has been provided. The output extension should be different from 'none'.",
|
||||
uid=[0],
|
||||
),
|
||||
desc.ChoiceParam(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue