FFmpeg 3.1.11
Since* 3.0
#

Reorder and/or duplicate video frames.

It accepts the following parameters:

mapping

Set the destination indexes of input frames. This is space or ’|’ separated list of indexes that maps input frames to output frames. Number of indexes also sets maximal value that each index may have.

The first frame has the index 0. The default is to keep the input unchanged.

Swap second and third frame of every three frames of the input:

ffmpeg -i INPUT -vf "shuffleframes=0 2 1" OUTPUT