How to Flip a Video With FFmpeg: Mirror Filters Require Re-encoding

A tutorial explains that FFmpeg's hflip and vflip filters produce left-right and top-bottom mirror images rather than rotations, so the frame dimensions remain unchanged. Because these are video filters, they cannot be combined with stream copy for the video track, so the video must be re-encoded. Audio can still be copied without re-encoding, preserving the original AAC bitstream. The author verified the behavior with pixel-level comparisons on an 8-second test clip using FFmpeg 9.0.1 and Python. The article also includes a small Python module and pytest checks to validate the results.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in