Answers.Body: <p>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</p>
  <pre><code>-vf &quot;crop=1440:750:1:1 , vidstabdetect=shakiness=1:stepsize=2:mincontrast=0.6&quot;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-21T19:12:20.983Z
Answers.LastActivityDate: 2022-12-21T20:18:58.303Z
Answers.LastEditDate: 2022-12-21T20:18:58.303Z
Answers.UserDisplayName: Neil Erath
Body: <p>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)</p>
  <p>I want to keep the timestamp on the final video.</p>
  <p>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)</p>
  <p>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)</p>
  <p>Or, if this can't be done with vidstabdetect, is there an alternative filter I can use with ffmpeg</p>
  
Tags: <ffmpeg><stabilisation>
Title: Ignore region of video for vidstabdetect
UserDisplayName: DJL
ThreadText: # Ignore region of video for vidstabdetect
  
  (Asked by: username_0 on 2022-03-07)
  
  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
  
  **Tags:** ffmpeg, stabilisation
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-12-21. Score: 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"
  
  ```
  
  
  ---
  
  