当前位置:网站首页>Use ffmpeg to rotate, flip up and down, and flip horizontally
Use ffmpeg to rotate, flip up and down, and flip horizontally
2022-07-05 06:30:00 【Third master takes you to fly】
brief introduction : In the use of ffmpeg do .h264 After coding, you may use vlc When playing, the image is vertically reversed . Probable cause :RGB There are two ways to store images : One is to scan from top to bottom ; The other is scanning from bottom to top .OpenCV Scanning from top to bottom ,ffmpeg It may also be a top-down storage method , and OpenGL/Unity The frame buffer data in may be scanned from bottom to top , This leads to the problem of vertical flipping of the image .
Vertical rotation :
ffmpeg -i Original video .mp4 -vf vflip -y Flip left and right .mp4
Flip left and right horizontally :
ffmpeg -i Original video .mp4 -vf hflip -y Flip left and right .mp4
The picture rotates clockwise 90 degree :
ffmpeg -i Original video .mp4 -vf transpose=1 along 90 degree .mp4
The picture rotates counterclockwise 90°:
ffmpeg -i Original video .mp4 -vf transpose=2 The inverse 90 degree .mp4
The processing method of pictures is consistent with that of videos , Switch the corresponding type to picture .
ffmpeg -i Original picture .png -vf vflip -y Flip up and down .png
ffmpeg -i Original picture .png -vf hflip -y Flip left and right .png
ffmpeg -i Original picture .png -vf transpose=1 along 90 degree .png
ffmpeg -i Original picture .png -vf transpose=2 The inverse 90 degree .png
Final execution result :

WeChat official account : Play with test development
Welcome to your attention , Common progress , thank you !
边栏推荐
- Niu Mei's math problems
- Dataframe (1): introduction and creation of dataframe
- H5内嵌App适配暗黑模式
- Genesis builds a new generation of credit system
- 2022-5-the fourth week daily
- Applicable to Net free barcode API [off] - free barcode API for NET [closed]
- MPLS experiment
- Leetcode divide and conquer / dichotomy
- La redirection de l'applet Wechat ne déclenche pas onload
- Install opencv -- CONDA to establish a virtual environment and add the kernel of this environment in jupyter
猜你喜欢

Gauss Cancellation acwing 884. Solution d'un système d'équations Xor linéaires par élimination gaussienne

VLAN experiment

There are three kinds of SQL connections: internal connection, external connection and cross connection

安装OpenCV--conda建立虚拟环境并在jupyter中添加此环境的kernel

Find the combination number acwing 889 01 sequence meeting conditions

Client use of Argo CD installation

'mongoexport 'is not an internal or external command, nor is it a runnable program or batch file.

博弈论 AcWing 892. 台阶-Nim游戏

Redis-01.初识Redis

How to make water ripple effect? This wave of water ripple effect pulls full of retro feeling
随机推荐
Time is fast, please do more meaningful things
博弈论 AcWing 893. 集合-Nim游戏
[2020]GRAF: Generative Radiance Fields for 3D-Aware Image Synthesis
[learning] database: several cases of index failure
Speedtree01 generator properties
TypeScript入门
Redis-02.Redis命令
Stack acwing 3302 Expression evaluation
Chapter 6 relational database theory
Client use of Argo CD installation
3.Oracle-控制文件的管理
2048 project realization
Game theory acwing 893 Set Nim game
SQL三种连接:内连接、外连接、交叉连接
Interval problem acwing 906 Interval grouping
[leetcode] day94 reshape matrix
Game theory acwing 892 Steps Nim game
Suppose a bank's ATM machine, which allows users to deposit and withdraw money. Now there is 200 yuan in an account, and both user a and user B have the right to deposit and withdraw money from this a
Chart. JS - Format Y axis - chart js - Formatting Y axis
Leetcode dynamic programming