当前位置:网站首页>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 !
边栏推荐
- [learning] database: MySQL query conditions have functions that lead to index failure. Establish functional indexes
- 求组合数 AcWing 889. 满足条件的01序列
- 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
- H5 模块悬浮拖动效果
- 2022/6/29-日报
- Speedtree01 generator properties
- 2022-5-第四周日报
- [moviepy] unable to find a solution for exe
- MySQL advanced part 2: the use of indexes
- H5 embedded app adapts to dark mode
猜你喜欢
MySQL advanced part 2: SQL optimization
Chinese remainder theorem acwing 204 Strange way of expressing integers
2. Addition and management of Oracle data files
LSA Type Explanation - detailed explanation of lsa-2 (type II LSA network LSA) and lsa-3 (type III LSA network Summary LSA)
Paper reading report
博弈论 AcWing 892. 台阶-Nim游戏
[moviepy] unable to find a solution for exe
4.Oracle-重做日志文件管理
Gaussian elimination acwing 884 Gauss elimination for solving XOR linear equations
LeetCode-54
随机推荐
Financial risk control practice -- feature derivation based on time series
'mongoexport 'is not an internal or external command, nor is it a runnable program or batch file.
Redis-01. First meet redis
阿里新成员「瓴羊」正式亮相,由阿里副总裁朋新宇带队,集结多个核心部门技术团队
2021apmcm post game Summary - edge detection
What's wrong with this paragraph that doesn't work? (unresolved)
11-gorm-v2-02-create data
LeetCode-54
‘mongoexport‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
our solution
微信小程序路由再次跳转不触发onload
There are three kinds of SQL connections: internal connection, external connection and cross connection
Using handler in a new thread
Filter the numbers and pick out even numbers from several numbers
1.手动创建Oracle数据库
Paper reading report
H5 embedded app adapts to dark mode
Bit of MySQL_ OR、BIT_ Count function
2.Oracle-数据文件的添加及管理
Nested method, calculation attribute is not applicable, use methods