The Text: Simple filter in Shotcut lets you overlay dynamic text onto your video. This text can be customized using keywords that are replaced with specific information about the clip or system.
Keywords
Keywords are enclosed in hash symbols (#). For example, #timecode# represents the frame’s timecode.
Supported keywords:
#timecode# or #smpte_df#: SMPTE drop-frame timecode of the frame.
#smpte_ndf#: SMPTE non-drop-frame timecode of the frame.
#frame#: Frame number of the frame.
#filedate#: Modification date of the file (GMT).
#localfiledate#: Modification date of the file (adjusted for local time zone).
#localtime#: Current system date and time.
#resource#: Full file name with path of the source file.
#filename#: File name without the path.
#basename#: File name without the extension.
#createdate#: Creation date of the source file. Set in the playlist clip, otherwise defaults to file modification date.
#meta.<field>#: Accesses metadata properties for file based clips.
Formatting Time-based Keywords
Time-based keywords (#createdate#, #filedate#, #localfiledate#, and #localtime#) can be formatted using the strftime function.
Add the desired strftime format string after the keyword, separated by a non-# delimiter.
#localtime %I:%M:%S %p# displays the time in 12-hour format with AM/PM.
Use #meta.<field># to include properties from the “Properties > Metadata” section.
Example
#meta.media.0.codec.frame_rate# fps
displays the frame rate followed by “fps”
The best way to see what metadata properties are available for a clip is to open the project file (.mlt) in a text editor and look for the section that applies to that clip. Here is an example section:
This clip has a property called “meta.attr.composer.markup”. So, if we put “#meta.attr.composer.markup#” in the text filter, it displays “Sacha Goedegebure”.
Thanks for this.
I have wondered about all the possible keywords available in the Text: Simple filter.
Is it possible to add more? For example, the #resource# keyword displays the file name with the entire file path. Personally, I’d like one that would display only the file name.
Another suggestion maybe? What would you think about a drop-down menu containing all available keywords instead of buttons? Aside from the convenience of having them all available, it would also have the advantage of reducing the horizontal space occupied by the filter settings in the panel.
I personally remove most the ones already included. One reason is because the only one I occasionally use is Timecode. But the main reason is because in find that they all take too much horizontal space in the filters panel.
Do you think it would be possible to list them in a drop-down menu instead of using buttons?
Sorry Brian I haven’t worked in C since college - and I don’t think I’d want to write this in assembler.
For example: When I’m inserting a series of clips it would make things really simple if I could use the base name but then use GREP style commands to remove the sequencing numbers from the start, add puctuation, etc. Maybe the #filename could take an optional parameter of a grep string to apply?
The Text: Simple filter in Shotcut lets you overlay dynamic text onto your video. This text can be customized using keywords that are replaced with specific information about the clip or system.
Keywords:
Keywords are enclosed in hash symbols (#). For example, #timecode# represents the frame’s timecode.
Supported keywords:
#timecode# or #smpte_df#: SMPTE drop-frame timecode of the frame.
#smpte_ndf#: SMPTE non-drop-frame timecode of the frame.
#frame#: Frame number of the frame.
#filedate#: Modification date of the file (GMT).
#localfiledate#: Modification date of the file (adjusted for local time zone).
#localtime#: Current system date and time.
#resource#: Full file name with path of the source file.
#filename#: File name without the path.
#basename#: File name without the extension.
#createdate#: Creation date of the source file. Set in the playlist clip, otherwise defaults to file modification date.
I started writing this post using Writesonic’s Article Writer 5, but that generated text that was completely wrong, so I switched to Google Gemini. Most of the text was cribbed from humans on this forum, including:
The meta keyword
I don’t completely understand and I haven’t yet used meta, and I am nearly certain that what I wrote has errors. I changed “attr.<field>” to " “<attr>.<field>” but that might be wrong. I am perplexed by the word “markup” in “#meta.attr.<field>.markup#”. I left it in the string, but I don’t know how to use it.
Drop-down list
I noticed that the drop-down list doesn’t currently include localfiledate, localtime, or meta. Including meta would probably be a bad idea because (I think) it is an inherently incomplete keyword so it would confuse people. I’m not sure why localfiledate and localtime are not included.
Creation date and Playlist
I just realized that I meant to but forgot to include the information about using the Playlist window to change the value of createdate and I think that is useful information.
The best way to understand the meta attributes is to open up one of your Shotcut project files (.mlt) in a text editor like Notepad. Look for the “meta” tags in the chain producers.
This clip has a property called “meta.attr.composer.markup”. So, if I put “#meta.attr.composer.markup#” in the text filter, it displays “Sacha Goedegebure”
I didn’t include them because they depend on the timezone of the computer that is using Shotcut. So different users would get different results depending on where they live, or what their timezone is set to.
I see! It’s not something I urgently need, but something that felt more natural to me, then the file name, because I tend to leave the file names as they come (not very discriptive stuff like 00160.mts) and then rename the files in shotcut. Well, maybe it becomes possible one day
How do I edit the length of the text? I don’t see any way to I tried using different time codes to see if I could make one section of text disappear while another one appears and it didn’t work.
This filter does not support timed text or keyframes on the text itself. The next version 24.08 for which there is a beta/release-candidate has a Subtitles feature with a filter to overlay the subtitles that will do this.