Alex Balgavy

Just some stuff about me.

Here's my dotfiles repository.

Check out my blog.

My keys: PGP, SSH

My crypto wallets (BTC, XMR)

ffmpeg how to rgb shift a video

Written by John Riselvato - original link

RBG shifting is one of the coolest and easiest effects for emulating 3D or add that Vaporwave Aesthetics. With rgbashift, the RGBA pixels can freely shift horizontally and/or vertically.

Figure 61.0: red horizontal shift{width=“436” height=“240”}

In this example, a red horizontal shift is applied to create red/blue 3D, as seen in figure 61.0:

$ ffmpeg -i input.mp4 -vf "rgbashift=rh=-10" -pix_fmt yuv420p output.mp4

Figure 61.1: blue horizontal shift{width=“436” height=“240”}

In this example, a blue horizontal shift is applied, as seen in figure 61.1:

$ ffmpeg -i input.mp4 -vf "rgbashift=bh=10" -pix_fmt yuv420p output.mp4

Figure 61.2: green vertical shift{width=“436” height=“240”}

In this example, a green vertical shift is applied, as seen in figure 61.2:

$ ffmpeg -i input.mp4 -vf "rgbashift=gv=10" -pix_fmt yuv420p output.mp4