I am confused. I thought you were only extracting one column from the image (after resizing). Are you trying to get every column of each resized image.
In a word, yes. Lemme try to break it down.
The first thing I do is dump out a number of frames from the source video. Basically I give ffmpeg a "frame rate" for conversion to output images that is much lower than the original frame rate—this skips many frames of the movie and just outputs a single still image every
n frames. Since each column of pixels in a barcode, regardless of mode, represents one frame from the movie, I tell the script how many frames I want by specifying the final desired width of the barcode(s). So if I want a barcode that's 1920 pixels wide, the script calculates the frame rate to dump 1920 frames out of the total number of frames in the original movie, evenly spaced out across its entire duration.
My script then has the ability to create a barcode (or barcodes, I'll get to that in a second) in one of a couple different ways. Its original mode, "resize" (the one that generates barcodes that look like the ones on the Tumblr I linked), creates a single barcode by resizing each dumped frame horizontally to 1 pixel wide (averaging it horizontally) and then appends those "slices" together to make a barcode. That takes a while, because it HAS to read and process every frame to make each slice, but that's fine. It only makes ONE barcode.
I'm not talking about that mode.
Its second mode, "crop", makes more detailed, vibrant, and "noisy" barcodes by cropping out a single column of pixels from each dumped frame (usually one at the center of the frame, horizontally—say, column 960 in a 1920px wide video). This is also "slow" when creating a single barcode, but again, that's not that big a deal—crop mode is also only making ONE barcode.
I'm not REALLY talking about this mode either, exactly.
The third mode is the one I'm trying to speed up. This mode, "animation", uses the aforementioned crop methodology to make MANY barcodes—as many barcodes as there are pixels across in the original frames (their width). So, for a 1920 pixel wide video, the animation mode will create
1920 separate barcodes which are as wide as the number of frames that were dumped (again, this can be variable, but defaults to 1920, so let's just keep that our measure for simplicity's sake). The first barcode will be comprised of column 1 of every dumped frame. The second barcode will be comprised of column 2 of every dumped frame. And so on up through the one-thousand nine-hundred and twentieth barcode. Imagine this as creating an effect where each column of pixels in the resulting piece is like an extremely narrow window, each one a view "panning" across a separate moment in time (frame) from the original movie (and while each of these views "pans across", the cumulative visual effect of seeing these played in sequence is not one of left-to-right movement, but a lot of shifting, morphing vertical up-and-down movement—it's really kinda neat).
Any clearer?