View Full Version : vspreview: Invalid Name Template
jay123210599
1st September 2024, 17:25
Hey, for the naming in vspreview, I tried to put in {frame}_{index}_{Name}, but it says that the naming template was invaild. What should I do to fix that?
Tiramisu
5th October 2024, 12:43
Hey, for the naming in vspreview, I tried to put in {frame}_{index}_{Name}, but it says that the naming template was invaild. What should I do to fix that?
Try {node_name} or {script_name} instead of {Name} https://github.com/Jaded-Encoding-Thaumaturgy/vs-preview/blob/master/docs/save_frame_placeholders.md
LightArrowsEXE
8th October 2024, 09:18
The error more specifically is that you do not appear to have the "Name" property set, so it can't find it. I've updated it (https://github.com/Jaded-Encoding-Thaumaturgy/vs-preview/commit/24b669f0aa4fb9aef815a65e6dc078bf6d7f0afa) to show you the invalid keys now.
https://i.imgur.com/kJkTi3L.png
jay123210599
10th October 2024, 20:15
The error more specifically is that you do not appear to have the "Name" property set, so it can't find it. I've updated it (https://github.com/Jaded-Encoding-Thaumaturgy/vs-preview/commit/24b669f0aa4fb9aef815a65e6dc078bf6d7f0afa) to show you the invalid keys now.
https://i.imgur.com/kJkTi3L.png
How do I properly set it, then?
LightArrowsEXE
10th October 2024, 20:19
You set the frame property:
src.std.SetFrameProps(Name="name you want to give your clip")
where `src` is the name of your variable.
This specific property can also be set via `vstools.set_output`
from vstools import set_output
...
set_output(src, name='name you want here')
See the `set_output` docstring (https://github.com/Jaded-Encoding-Thaumaturgy/vs-tools/blob/733ebcca48c78215af9186512970f899e0e0d80c/vstools/utils/misc.py#L535-L541) for more information.
jay123210599
12th October 2024, 22:38
You set the frame property:
src.std.SetFrameProps(Name="name you want to give your clip")
where `src` is the name of your variable.
This specific property can also be set via `vstools.set_output`
from vstools import set_output
...
set_output(src, name='name you want here')
See the `set_output` docstring (https://github.com/Jaded-Encoding-Thaumaturgy/vs-tools/blob/733ebcca48c78215af9186512970f899e0e0d80c/vstools/utils/misc.py#L535-L541) for more information.
I meant for the frames I am extracting from the video.
_Al_
13th October 2024, 04:41
Question is: Does vspreview always name placeholders from a current frame property, probably is, or just loads properties from the same frame, like from a frame zero.
Vapoursynth can have a property set for each frame, not just for a clip (same property value for all frames).
Setting a property for all frames:
clip = core.bs.VideoSource(source='video.mp4')
clip = clip.std.SetFrameProps(name="name you want to give your clip that will be same for all frames")
clip.set_output()
Setting a frame property for a particular frame number:
clip = core.bs.VideoSource(source="video.mp4")
clip = clip.std.SetFrameProps(name="")
NAMES = {
57: "my favourite frame",
102: "funny one",
305: "superhero bang"
}
def naming(n, f):
f_out = f.copy()
if n in NAMES:
f_out.props["name"] = NAMES[n]
return f_out
clip = clip.std.ModifyFrame(clip, selector=naming)
clip.set_output()
So even if it loaded props from a current frame, you'd need to set it up in vapoursynth yourself, those names, and that is really cumbersome.
Just use {frame} placeholder that would print current frame number in your name. Or of course, you type text while saving an image.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.