当前位置:网站首页>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 !
边栏推荐
- Package webapp or H5 pages into apps
- 时间很快,请多做有意义的事情
- LSA Type Explanation - detailed explanation of lsa-2 (type II LSA network LSA) and lsa-3 (type III LSA network Summary LSA)
- Financial risk control practice -- feature derivation based on time series
- Inclusion exclusion principle acwing 890 Divisible number
- MySQL怎么运行的系列(八)14张图说明白MySQL事务原子性和undo日志原理
- ‘mongoexport‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
- Find the combination number acwing 889 01 sequence meeting conditions
- 2.Oracle-数据文件的添加及管理
- Bash exercise 17 writing scripts to install the server side of FRP reverse proxy software
猜你喜欢

Bit of MySQL_ OR、BIT_ Count function

VLAN experiment

达梦数据库全部

Client use of Argo CD installation

代码中的英语全部

Find the combination number acwing 887 Find combination number III

2021apmcm post game Summary - edge detection

4.Oracle-重做日志文件管理

Interval problem acwing 906 Interval grouping

4. Oracle redo log file management
随机推荐
5.Oracle-表空间
There are three kinds of SQL connections: internal connection, external connection and cross connection
Nested method, calculation attribute is not applicable, use methods
LSA Type Explanation - lsa-1 [type 1 LSA - router LSA] detailed explanation
2022/6/29-日报
LSA Type Explanation - lsa-5 (type 5 LSA - autonomous system external LSA) and lsa-4 (type 4 LSA - ASBR summary LSA) explanation
Leetcode backtracking method
求组合数 AcWing 889. 满足条件的01序列
Stack acwing 3302 Expression evaluation
Alibaba established the enterprise digital intelligence service company "Lingyang" to focus on enterprise digital growth
H5 embedded app adapts to dark mode
Operator priority, one catch, no doubt
What is socket? Basic introduction to socket
Gauss Cancellation acwing 884. Solution d'un système d'équations Xor linéaires par élimination gaussienne
C - XOR to all (binary topic)
Inclusion exclusion principle acwing 890 Divisible number
H5 模块悬浮拖动效果
C Primer Plus Chapter 15 (bit operation)
vsCode创建自己的代码模板
Leetcode divide and conquer / dichotomy