ffmpeg- dynamic drawbox
Since drawbox doesn't support time reference, you need to use a workaround

ffmpeg -y -loop 1 -t 5 -i img001.jpg
  -filter_complex "color=red@0.5:s=Wx100[c];
                   [0][c]overlay='-W+300*t':0"
  -y out.mp4


A color source is created equal to the final size of the box you wanted to draw i.e. image width (W) x 100. Then it is overlaid on the image and animated so that it starts revealing at the rate of 300*t.