当前位置:网站首页>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 !
边栏推荐
- [2021]IBRNet: Learning Multi-View Image-Based Rendering Qianqian
- H5 module suspension drag effect
- __ builtin_ Popcount() counts the number of 1s, which are commonly used in bit operations
- VLAN experiment
- What's wrong with this paragraph that doesn't work? (unresolved)
- Alibaba's new member "Lingyang" officially appeared, led by Peng Xinyu, Alibaba's vice president, and assembled a number of core department technical teams
- How to make water ripple effect? This wave of water ripple effect pulls full of retro feeling
- Series of how MySQL works (VIII) 14 figures explain the atomicity of MySQL transactions and the principle of undo logging
- [Chongqing Guangdong education] 1185t administrative leadership reference test of National Open University in autumn 2018
- Using handler in a new thread
猜你喜欢
Gaussian elimination acwing 884 Gauss elimination for solving XOR linear equations
容斥原理 AcWing 890. 能被整除的数
Alibaba's new member "Lingyang" officially appeared, led by Peng Xinyu, Alibaba's vice president, and assembled a number of core department technical teams
Record of problems in ollvm compilation
Vant Weapp SwipeCell设置多个按钮
SolidWorks template and design library are convenient for designers to call
阿里新成员「瓴羊」正式亮相,由阿里副总裁朋新宇带队,集结多个核心部门技术团队
Paper reading report
高斯消元 AcWing 884. 高斯消元解异或线性方程组
MySQL advanced part 2: SQL optimization
随机推荐
Niu Mei's math problems
Winter vacation water test 1 Summary
[leetcode] day95 effective Sudoku & matrix zeroing
Design specification for mobile folding screen
Stack acwing 3302 Expression evaluation
阿里巴巴成立企业数智服务公司“瓴羊”,聚焦企业数字化增长
3.Oracle-控制文件的管理
栈 AcWing 3302. 表达式求值
Relevant information of National Natural Science Foundation of China
【高德地图POI踩坑】AMap.PlaceSearch无法使用
Dataframe (1): introduction and creation of dataframe
SolidWorks template and design library are convenient for designers to call
H5 embedded app adapts to dark mode
Chart. JS - Format Y axis - chart js - Formatting Y axis
2021apmcm post game Summary - edge detection
达梦数据库全部
Find the combination number acwing 888 Find the combination number IV
7. Oracle table structure
TypeScript入门
区间问题 AcWing 906. 区间分组