Answers.Body: <p>Thanks to @Gyan, I was able to fix it.</p>
  
  <pre><code>ffmpeg -i input.mp4 -vf "geq=p(mod(X+Y*2\,W)\, Y)" output.mp4
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-13T21:48:22.210Z
Answers.LastActivityDate: 2020-01-13T21:48:22.210Z
Answers.UserDisplayName: Bendie
Body: <p>In our university sometimes the recordings of videos are very distorted.</p>
  
  <p>Example frame (please ignore the red bar it's just there for privacy reasons):</p>
  
  <p><a href="https://i.sstatic.net/oQCpS.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oQCpS.png" alt="Example Frame"></a></p>
  
  <p>I know that basically I would need to move each pixel of each frame horizontally based on its vertical position. Is there a way to do this with FFmpeg?</p>
  
  <p>Thanks in advance!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-13T19:49:59.553Z
Comments.Text: See the geq filter
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-13T20:28:38.583Z
Comments.Text: Thanks Gyan, this seems good. But sadly I see that when the position would be outside the frame, it just uses the edge. Is there a way to set it to repeat?
Comments.UserDisplayName: Bendie
Tags: <ffmpeg>
Title: Fix distorted mp4 files
UserDisplayName: Bendie
ThreadText: # Fix distorted mp4 files
  
  (Asked by: username_0 on 2020-01-13)
  
  In our university sometimes the recordings of videos are very distorted.
  
  Example frame (please ignore the red bar it's just there for privacy reasons):
  
  [![Example Frame](https://i.sstatic.net/oQCpS.png)](https://i.sstatic.net/oQCpS.png)
  
  I know that basically I would need to move each pixel of each frame horizontally based on its vertical position. Is there a way to do this with FFmpeg?
  
  Thanks in advance!
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: See the geq filter  
  > **username_0**: Thanks username_1, this seems good. But sadly I see that when the position would be outside the frame, it just uses the edge. Is there a way to set it to repeat?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-01-13. Score: 1
  
  Thanks to @username_1, I was able to fix it.
  
  ```
  ffmpeg -i input.mp4 -vf "geq=p(mod(X+Y*2\,W)\, Y)" output.mp4
  
  ```
  
  
  ---
  
  