当前位置:网站首页>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 !
边栏推荐
- [Chongqing Guangdong education] National Open University 2018 autumn 0702-22t contemporary Chinese political system reference questions
- [2021]GIRAFFE: Representing Scenes as Compositional Generative Neural Feature Fields
- 1. Create Oracle database manually
- 4. Oracle redo log file management
- 博弈论 AcWing 892. 台阶-Nim游戏
- 高斯消元 AcWing 884. 高斯消元解异或线性方程组
- 20220213-CTF MISC-a_ good_ Idea (use of stegsolve tool) -2017_ Dating_ in_ Singapore
- Traversal of leetcode tree
- 2022/6/29-日报
- 阿里新成员「瓴羊」正式亮相,由阿里副总裁朋新宇带队,集结多个核心部门技术团队
猜你喜欢
![LSA Type Explanation - lsa-1 [type 1 LSA - router LSA] detailed explanation](/img/1f/30407bce35c324cc90f139b6f09fd1.jpg)
LSA Type Explanation - lsa-1 [type 1 LSA - router LSA] detailed explanation

Find the combination number acwing 887 Find combination number III

ollvm编译出现的问题纪录

MySQL advanced part 2: the use of indexes

MPLS experiment

Sorting out the latest Android interview points in 2022 to help you easily win the offer - attached is the summary of Android intermediate and advanced interview questions in 2022

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

Client use of Argo CD installation

Redis-01. First meet redis

Single chip computer engineering experience - layered idea
随机推荐
Chinese remainder theorem acwing 204 Strange way of expressing integers
Applicable to Net free barcode API [off] - free barcode API for NET [closed]
论文阅读报告
Nested method, calculation attribute is not applicable, use methods
H5内嵌App适配暗黑模式
2048项目实现
__ builtin_ Popcount() counts the number of 1s, which are commonly used in bit operations
Configuration method and configuration file of SolidWorks GB profile library
时间很快,请多做有意义的事情
Presentation of attribute value of an item
NotImplementedError: Cannot convert a symbolic Tensor (yolo_boxes_0/meshgrid/Size_1:0) to a numpy ar
Find the combination number acwing 889 01 sequence meeting conditions
2022-5-第四周日报
How to set the drop-down arrow in the spinner- How to set dropdown arrow in spinner?
LeetCode-54
Series of how MySQL works (VIII) 14 figures explain the atomicity of MySQL transactions and the principle of undo logging
vsCode创建自己的代码模板
P3265 [jloi2015] equipment purchase
求组合数 AcWing 887. 求组合数 III
Chart. JS - Format Y axis - chart js - Formatting Y axis