如何使用 ffmpeg 将视频旋转 90°/180°/270°
要使用 ffmpeg 旋转名为 input.mp4 的视频,使用以下命令:
旋转 90°(顺时针)
ffmpeg_rotate_90.sh
ffmpeg -i input.mp4 -vf "transpose=1" rotated.mp4旋转 180°
ffmpeg_rotate_180.sh
ffmpeg -i input.mp4 -vf "transpose=2" rotated.mp4旋转 270°(顺时针)
这相当于逆时针旋转 90°。
ffmpeg_rotate_270.sh
ffmpeg -i input.mp4 -vf "transpose=3" rotated.mp4Check out similar posts by category:
Audio/Video
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow