Large composite image/panorama from scrolling video

I have a video of a mechanical piano roll being played that shows the moving bars that make up the paper roll. It is very similar to this one on youtube:

What I would like to do is obtain a large composite image of the piano roll from this video. In other words, after cropping the video to a small horizontal segment that shows an even background colour and no curve, I need to compile that video into a long, thin panoramic picture.

I am not sure if After Effects is the ideal software for such a task, though through my workplace I do have access to quite a few other types of video software.

Unfortunately, all freeware programs I have tried thus far have failed to make any kind of panorama from my video, as they all seem to rely on their own automatic detection systems which don't work for this type of video.

I should add that speed at which the video scrolls through the piano roll is constant throughout, which should simplify matters.

Any advice on how I can do this, without manually aligning thousands of frames from the video?

Create a comp that is one pixel tall and however many pixels wide. This slit will basically be the apex of the curve/center section of the frame you're showing us. Render out a frame sequence and you have a sequence of one pixel long slits, the amount of images in the sequence is also the long dimension of your panorama.

I would assume from there you could do some stacking/alignment in Photoshop by creating an image sized to your height x number of images in sequence and hitting "distribute alignment"

I'd do the final composite in Ae instead of Ps. Bring the image sequence into Ae as a set of images, not as an image sequence. Drop them all into a comp sized as Angelo describes, then Alt-click the stopwatch for the position property and enter the following expression:

[value[0],index-1]

Next, with the property position selected, Edit > Copy Expression Only. You can then Select All and Paste, and the expression will be applied to every layer in the comp.

That will keep the X value of the position for every layer, but set the Y value to one less than the layer's index. In other words, in a 1920 px wide comp, Layer 1 will be positioned at [540,0]; Layer 2 will be positioned at [540,1]; Layer 3 will be positioned at [540,2], etc.

There are other similar ways to approach this with time remapping or with time slice, but Angelo's approach is very straightforward, and is probably the easiest to explain and to understand.

Thank you both for your suggestions. They have worked, just as I'd hoped.

I've been playing around with the settings these past few weeks and managed, from simple videos like the one I used as an example, to get a perfectly accurate composite picture of the whole paper roll. I was able to generate a MIDI file from it using some other software, so now have a secure digital backup of the music from which I could potentially have a new roll cut should I ever need to.