Loop text that wipes left to right using FFMPEG drawtext filter

This works:

-vf "drawtext=text=string1 string2 string3 string4 string5 string6 string7 :expansion=normal:fontfile=foo.ttf: y=h-line_h-10:x=(mod(5*n\,w+tw)-tw): fontcolor=white: fontsize=40: shadowx=2: shadowy=2"

See Desmos for how it works.

Graph

x-axis is the video width.

y-axis is time.

The black line is the width of the image (adjustable in Desmos through a slider, x).

The black shade is the text in my formula.

t in Desmos corresponds to tw in FFmpeg CMD, which is the width of the text.

Blue area is the text in your original formula.