I am using ffmpeg with vidstabdetect and vidstabstransform to (try to) stabilise some rather shaky footage. The input file has a time stamp at the top of the video. In the transformed video you can see this timestamp moves around a lot but it never rotates, while the video is still all over the place in terms of rotation. I strongly suspect this is because the timestamp is confusing vidstabdetect (not unreasonably)

I want to keep the timestamp on the final video.

So far I didn't pass any parameters to vidstabdetect and vidstabtransform as the defaults appear to be reasonable (e.g. I think rotation is enabled by default)

Is there a way I can ignore a specific region of the input video while vidstabdetect does it's thing, while keeping that region in the final video (despite any rotations that may be present)

Or, if this can't be done with vidstabdetect, is there an alternative filter I can use with ffmpeg

1 Answer 1


You can use a crop filter in the detect phase. I do this to ignore the date/timestamp in the bottom of my old videos. E.g. for my 1440x1080p 60fps video I use

-vf "crop=1440:750:1:1 , vidstabdetect=shakiness=1:stepsize=2:mincontrast=0.6"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.