<pre><code>#! /bin/bash
set -e

ffmpeg -ss 0:18 -i &quot;$1&quot; -to 10 -vf &quot;crop=2:1080:960:1080&quot; &quot;video%03d.png&quot;
montage -tile x1 -geometry +0+0 video*png out.png
rm video*png
</code></pre>
<p>The code above achieved what I was looking for: it takes out vertical strip out of every frame (for 10s, starting from 0:18) and writes it to a file. These files are assembled next to each other into a single image.</p>

CC BY-SA 4.0
2024-06-07T19:14:24.980Z
2024-06-07T19:14:24.980Z
Christian Lindig
<p>In sports with close finishes a <a href="https://en.wikipedia.org/wiki/Photo_finish" rel="nofollow noreferrer">photo finish</a> is used: this takes repeatedly a vertical line of pixels of the finish line and assembles them next to each other into a photo. Now the horizontal position in the photo corresponds to the time. This is done with special equipment but could it be also recreated from a video using ffmpeg? Say, you take the vertical pixel line from the middle of the frame and assemble them into a photo.</p>

<ffmpeg>
Create a photo finish from a video?
Christian Lindig
# Create a photo finish from a video?

(Asked by: username_0 on 2020-08-17)

In sports with close finishes a [photo finish](https://en.wikipedia.org/wiki/Photo_finish) is used: this takes repeatedly a vertical line of pixels of the finish line and assembles them next to each other into a photo. Now the horizontal position in the photo corresponds to the time. This is done with special equipment but could it be also recreated from a video using ffmpeg? Say, you take the vertical pixel line from the middle of the frame and assemble them into a photo.

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_0 on 2024-06-07. Score: 0

#! /bin/bash
set -e

ffmpeg -ss 0:18 -i "$1" -to 10 -vf "crop=2:1080:960:1080" "video%03d.png"
montage -tile x1 -geometry +0+0 video*png out.png
rm video*png

The code above achieved what I was looking for: it takes out vertical strip out of every frame (for 10s, starting from 0:18) and writes it to a file. These files are assembled next to each other into a single image.


---

