Text: Rich would be nice with more options

Ok, now I see what you mean.
I think it’s doable with Shotcut filters, or, as @shotcut said, with Glaxnimate.

But what would be great for you is a HTML template with some kind of script that would export a PNG image of the table borders, semi-transparent table background and text on a transparent background.
You could import the PNG images in your Shotcut project instead of using the Text filters.

I think @Elusien would be more than able to create such a template. It could include many configurable parameters, such as:
Project size.
Table size and position.
Table corner radius value
Table background color
Table border color
Table background transparency
An input for each cell. Example: Text in cell 1, Text in cell 2, text in cell 3…
Etc…

Glaxnimate is not difficult for simple things especially with no animation and for simple shapes. Oh well.

1 Like

Thanks, i will take a look on his page.

I tried Glaxinate for some speech bubbles. It was frustrating when I tried to use it several times in the same project.
For 1 Video ok, but not the right way (for me) when I create hundreds of videos with different texts.

I looked on his website.
Almost all effects don’t seem to work with newer Shotcut versions (higher 20.07.11)?!

Partly you have to film the screen for text effects, if I understood correctly.
This seems to be very time-consuming for many texts per project.

Hi @thegrobi , is it important for you to have the text in a table? As alternative I made this demo to demonstrate how I might do it.

How I made it:
V1: video/photo
V2: Black colour clip, cropped with rounded corners (following @musicalbox’s advice)
V3: Text:simple filter (German text)
V4: Copy of text:simple filter but with English words
V5: Black and white “gradient line - expanding out/in” mp4 video which I made for other projects. I applied a Blend Mode(ADD) filter to remove the black background.
I faded the clips in and out… see screenshot:

PS - just FYI, the gradient line MP4 I mentioned above was first mentioned by me in this thread:

*Il est tout à fait possible de faire ce que vous souhaitez avec l’ancienne version 20.07.11 en installant les filtres Text: Webvfx et Simple Shape disponibles sur le site d’ @Elusien *
Si votre projet nécessite les fonctions des nouvelles versions, il vous suffit d’exporter l’image du texte (réalisée avec l’ancienne version) et de l’importer sur une piste supérieure dans votre projet avec la nouvelle version.

It is quite possible to do what you want with the old version 20.07.11 by installing the filters Text: Webvfx and Simple Shape available on the site of @Elusien
If your project needs the functions of the new versions, you just have to export the image of the text (made with the old version) and import it on a higher track in your project with the new version.

2 Likes

Shotcut’s Text:Rich filter is based on Qt’s RichText framework: Rich Text Processing | Qt GUI 6.4.2
which has a restricted subset of HTML and as such is not something that Shotcut’s developers can influence.

Text processing software (like LibreOffice Writer) don’t seem to allow rounded corners on tables. Namna’s solution is a good one. Dan’s suggestion for tthe use of Glaxnimate may be good, but I have yet to get to grips with using this software. HTML allows rounded corners, but it requires a bit of jiggery-pokery to get it to work well if the cells themselves have borders.

I have created an HTML file that allows you to input text into the cells, set their size, colour, font, border size and colour, position of the table on the screen etc… Once you are happy with the result you click on an “Export” button and a PNG file is dowloaded which has a transparent background and the table in the correct place. You can then input this PNG as an overlay on a transparent track above your video footage.

Just download the following file, remove the .txt suffix and run it in a browser. It is highly parameterised so it should be easy to change parameters by editing the file, then use it over and over again - simple.

Rounded_Tables.html.txt (6.9 KB)

Le filtre Text:Rich de Shotcut est basé sur le framework RichText de Qt : Rich Text Processing | Qt GUI 6.4.2
qui a un sous-ensemble restreint de HTML et en tant que tel n’est pas quelque chose que les développeurs de Shotcut peuvent influencer.

Les logiciels de traitement de texte (comme LibreOffice Writer) ne semblent pas autoriser les coins arrondis sur les tableaux. La solution de Namna est bonne. La suggestion de Dan pour l’utilisation de Glaxnimate est peut-être bonne, mais je n’ai pas encore maîtrisé l’utilisation de ce logiciel. HTML autorise les coins arrondis, mais il faut un peu de zigzag pour que cela fonctionne bien si les cellules elles-mêmes ont des bordures.

J’ai créé un fichier HTML qui vous permet de saisir du texte dans les cellules, de définir leur taille, leur couleur, leur police, la taille et la couleur de la bordure, la position du tableau à l’écran, etc. Une fois que vous êtes satisfait du résultat, vous cliquez sur sur un bouton “Exporter” et un fichier PNG est téléchargé avec un fond transparent et le tableau au bon endroit. Vous pouvez ensuite saisir ce PNG en superposition sur une piste transparente au-dessus de votre séquence vidéo.

Téléchargez simplement le fichier suivant, supprimez le suffixe .txt et exécutez-le dans un navigateur. Il est hautement paramétré, il devrait donc être facile de modifier les paramètres en éditant le fichier puis utilisez-le encore et encore - simple.

1 Like

@namna and @elusien - fantastic. There’s a wealth of creativity here…

@elusien - I knew that would be a piece of cake for you … :wink:
I can offer another method: I did this just using Shotcut (latest version) - basically using it as a graphics design program:
First, I made this, using black and white colour clips, Crop and SPR filters, then exported as a frame:

Then imported into the photo and added text filters:

Took about 5 minutes.
In retrospect I should have made the lines a little thinner…

For me, @elusien’s HTML file would be the easiest option.

I agree. The main problem with the other solutions is that the table varies in size, depending on the text the OP puts into it. So each time you probably have to use a Size, Position, Rotate filter. This has several problems:

  • It is computationally epensive.
  • It’s fiddly to get right.
  • The border size could be different from table to table, depending on how much resizing needs to be done. Especially as you would only be resizing in the vertical direction, so the vertical line-width may not match the horizontal.

With my HTML file you set the parameters you want once and save the changes, then for each table you just insert the text on the webpage, click the “Export” button, then change the text and hit the “Export” button again for as many tables as you require. You then input the generated PNGs into your Shotcut project and move the clips to the relevant position on the timeline - simples!

I HAVE PUT A NEW VERSION UP FOR DOWNLOADING IN POST #16

This restores the “Export” buttone once the PNG has been downloaded so you can then just overwrite the text in the two cells and press “Export” again, rather than having to reload the HTML file each time.

1 Like

@elusien - this is genius. You never cease to amaze!!

Just one thing - wouldn’t it be a good idea to be able to make the PNG have a totally black background (and also a black the grid background) with just the grid lines and text white? Then you could just apply a Blend mode (or Chroma-key) to make the black disappear…

OK, scrap that! I realise what you did, to make the background of the grid semi-transparent. D’OH! My mistake… apologies…

Yes, I only export “#screen”, which has a transparent background, not “body or html”, where the coloured/gradient background exists. The opacity (and colour) of the table’s background is a parameter that can be changed.

1 Like

Ah, yes, of course. What threw me was, I thought the PNG background was white. Until I realised it was transparent.
Clever. Works a treat!! Bravo, yet again…

1 Like

PS I just tweaked the HTML file as follows:

--border_radius: 30px;
--border       : 4px solid white;

Wow. Thanks for all the offers of help.
I will now see if something works for me.

I would like to make the following general comment:
My streams are 1-3 minute badminton-practice films with about 1-10 text notes in each.
So far I have created about 180 streams and there are many more to come:
My Streams on youtube

When I have exported a stream with shotcut and watch it, I may change the German texts and/or English translations again because I don’t like some words.
That’s why the conversion should work with a simple text change in shotcut without changing programms if possible.

If you want to do it all in Shotcut without too much work your only real option is use the Text:Rich filter with tables that have square corners. Anything else will be quite a bit of hassle.

Personally, if you want round corners, my workflow would be:

  • Create a text file with each of your texts in it.
  • Open the HTML file in a browser and copy-paste each text to create the PNG files.
  • Insert them in the timeline.
  • If you want to edit a text, do so in the editor for the text file then copy-pate it to the table on the HTML webpage and export the PNG.
  • Replace the PNG on the timeline with the new one.

This is a very quick and relatively simple way to get what you want.


That is the result with Elusiens html-png-export.
It looks exactly the way it should. :ok_hand:

I will still not use this great solution:

  1. I have to change the programms. Shotcut/Browser/Shotcut.
  2. Each project gets 1 *.mlt and 1-10 *.png.
  3. For a small word change, both languages have to be completely re-entered and a new *.png created.
  4. For position changes, 1 additional filter must be inserted.

The rounded corners would be nice, but then I better stick to pointed corners.
I was hoping to have 1 *.html per text: Rich customised with rounded corners to use again and again.
I will then probably have to live with 1 *.html with pointed corners.

That really is the only way if you want a solution that only uses the Shotcut Text:Rich filter. There is no way to get round-corners using this.

1 Like

I still have one question about the one with Text: Rich saved *.html

I can enlarge the 3 pages of the table (top, left, right) as I want. The transparent background fits exactly.
If I drag at the bottom line, the background moves out of the table (see picture).
I always have to adjust the bottom margin exactly after entering text.
What can i change?

This is the generated *.html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
<table border="2" style=" border-color:#ffffff; border-style:solid; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" width="100%" cellspacing="0" cellpadding="10">
<tr>
<td style=" vertical-align:top;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:30pt; font-weight:600; color:#ffffff;">De: </span></p></td>
<td style=" vertical-align:top;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:30pt; color:#ffffff;">Auf der Rückhandseite im Hinterfeld</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:30pt; color:#ffffff;">verwende priorisiert die Vorhand.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:30pt; color:#ffffff;">Die Schlagart im Vorderfeld ist frei wählbar.</span></p></td></tr>
<tr>
<td style=" vertical-align:top;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:30pt; font-weight:600; color:#ffffff;">En:</span></p></td>
<td style=" vertical-align:top;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:30pt; color:#ffffff;">On the backhand side in the backcourt</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:30pt; color:#ffffff;">use the forehand with priority.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:30pt; color:#ffffff;">The type of stroke in the frontcourt is freely selectable.</span></p></td></tr></table></body></html>