[FFmpeg-user] Overlay video sync

Riley Schutt rrs76 at cornell.edu
Fri May 27 20:59:27 CEST 2011


Hello,

I have two videos that I would like to combine side-by-side using the
overlay filter. The two videos are both h264 @60fps and capture the
same event from different angles. I would like to get frame-exact
syncing of the videos but because the I-frames do not line up, it
seems the videos cannot be clipped or started with frame-exact
precision. I have tried the following without success:

ffmpeg -i clip_01_Bow.mp4 \
    -acodec copy \
    -vcodec libx264 -preset slow -crf 20 -threads 0 \
    -vf "[in] setpts=PTS-STARTPTS,transpose=1,scale=404:720,pad=1280:720:0:0
[b1] ; movie=clip_01_Mast.mp4:seek_point=0.66 [m1]; [m1]
setpts=PTS-STARTPTS,crop=876:720:150:0 [m2];[b1][m2] overlay=404:0
[out]" \
    test.mp4

How can I go about shifting the overlayed (or input) video in time by
2 or 3 frames?

Thanks,
Riley


More information about the ffmpeg-user mailing list