Calculation in text filter

Hi, I’m a newbie, I do not find any easy way to insert something like this:
In the Text filter: Simple
= (# frame # * 360/2828) +2.4
as if it were a spreadsheet formula.
Thanks in advance and congratulations for the project.

This is not possible using Text Filter: Simple. Someone might be able to find a way to do it using HTML overlay with custom Javascript.

Hello, it’s an attempt to get the frames and pass them to degrees, example:


(#frame # * (360/2828)) + 0.2
number of frame * (360 degrees / number of total frames) + offset to fine-tune accuracy.
Surely it will be possible with the HTML filter, but my knowledge in HTML / Java is practically null.
Thanks for the interest.

Yes, this is a doddle in HTML/javascript. However, I’m not exactly sure what you are asking for, If you just want to display the text in a box e.g. 123 ° 25’ 12 " it is fairly simple. Please let me know and I’ll see what I can do for you.

Hi, thanks for the help.
Basically I want a text in SS.SS, as in the following screenshot. (2296 * (360/2950) +0.01) = 280.01º
(Current frame * (360 / totalframes) + “finetuning”)

Hi,

I fairly quickly created some HTML/Javascript code that I think does what you want. It is in the following ZIP file.

compass.zip (30.9 KB)

Just unzip it in a directory (it contains an HTML file “compass.html” with the Javascript included, and a copy of my webvfx.js framework).

Then startup Shotcut and open your video/MLT file. Select the clip in question, position the playhead at the beginning of the clip and open the “filters” panel and choose “Overlay HTML” (or “Text -> HTML” on the latest Shotcut version), select the option “Use WebVfx javascript extension” and confirm that you know what you are doing. Then open the compass.html file.

You can “fine-tune” by changing the value highlighted in the HTML.

You can style the text by changing the values highlighted in the CSS (between the <style></style> tags.

Let me know how you get on.

Thank you very much, it has worked changing the name of WebVfx.js to webvfx.js
Now when I have time I will look more deeply at the CSS and testing.
Excellent work, congratulations.

The first satisfactory test using Elusien instructions. Thanks again.

1 Like

Glad to have been of service. You’ll find that many of the members on the forum are happy to help sort out problems or provide solutions (like filters), which is why Shotcut is a good solution for many people.

This topic was automatically closed after 90 days. New replies are no longer allowed.