I'm trying to use FFmpeg to produce a stereoscopic side-by-side video (Full 3D SBS) from a left-right pair of videos.

If the two source videos were perfectly in sync, I could use:

ffmpeg -i left.mp4 -i right.mp4 -filter_complex hstack stereo.mp4

Unfortunately, the cameras were not synchronized and I determined that I need to trim the first 30 frames or 1.0 second from the left video to align it with the right one.

Referring to the FFmpeg wiki on Seeking, I could either use fast input seeking with -ss 1 -i left.mp4, or accurate output seeking with -i left.mp4 -ss 1. I want accurate seeking, but unfortunately -i left.mp4 -ss 1 -i right.mp4 doesn't work the way I'd hope.

How can I accurately skip the first second of left.mp4 while starting from the beginning of right.mp4?

1 Answer 1


I ended up using the tpad filter in conjunction with hstack to delay the right side 30 frames, rather than trim the left side:

ffmpeg -i left.mp4 -i right.mp4 -filter_complex \
    "[0:v]null [left]; \
     [1:v]tpad=30:start_mode=add [right]; \
     [left][right]hstack" \

(However without electronically synchronized shutters, I found that the frame alignment does drift over time by quite a lot.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .