Encode, Speed Up, Trim, and Rotate a Video in a Single FFmpeg Command

MARCH 5, 2021

This script re-encodes the seconds between second 25 and 45 of an video from mov to mp4; rotates the frames 180 (the hflip,vflip flags flip all pixels vertically and horizontally); removes the audio (with the -an flag); and speeds up the video (i.e., skips frames, with the flag setpts=0.05*PTS, which you could adjust to have more frames, for instance, as setpts=0.1*PTS).

ffmpeg -ss 00:00:25 -to 00:00:45 \
       -i "" \
       -an -filter:v "hflip,vflip,setpts=0.05*PTS" \