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

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!

  • 2
    See the geq filter – Gyan Jan 13 at 19:49
  • 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? – Bendie Jan 13 at 20:28

Thanks to @Gyan, I was able to fix it.

ffmpeg -i input.mp4 -vf "geq=p(mod(X+Y*2\,W)\, Y)" output.mp4
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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