Length of exported tracks (stem export)

Hi all,

in a multitrack audio project, with a large number of tracks, some tracks are short (2 seconds, 5 seconds, etc.) other tracks are long (up to 30 seconds).
If I put “end” at the end of the long tracks, then I do the stem export, I get files all 30 seconds long.

Is there a way to export (stem) each track with its length in one go? So that, for example: from the 2 second long track I get a 2 second long audio file, and so on.
[Ardour 8.1 on Linux]

Thank you,
a.