当前位置:网站首页>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 !
边栏推荐
- MySQL advanced part 2: optimizing SQL steps
- 【高德地图POI踩坑】AMap.PlaceSearch无法使用
- [Chongqing Guangdong education] 1185t administrative leadership reference test of National Open University in autumn 2018
- 求组合数 AcWing 888. 求组合数 IV
- 2048项目实现
- our solution
- Stack acwing 3302 Expression evaluation
- Bash exercise 17 writing scripts to install the server side of FRP reverse proxy software
- Application of recyclerview
- La redirection de l'applet Wechat ne déclenche pas onload
猜你喜欢
5. Oracle TABLESPACE
Stack acwing 3302 Expression evaluation
[Gaode map POI stepping pit] amap Placesearch cannot be used
ollvm编译出现的问题纪录
[2021]GIRAFFE: Representing Scenes as Compositional Generative Neural Feature Fields
MySQL advanced part 1: stored procedures and functions
AE tutorial - path growth animation
5.Oracle-表空间
5. Oracle tablespace
MySQL advanced part 2: MySQL architecture
随机推荐
背包问题 AcWing 9. 分组背包问题
[leetcode] day95 effective Sudoku & matrix zeroing
将webApp或者H5页面打包成App
Find the combination number acwing 888 Find the combination number IV
高斯消元 AcWing 884. 高斯消元解异或線性方程組
FFmpeg build下载(包含old version)
MySQL advanced part 2: SQL optimization
H5 embedded app adapts to dark mode
容斥原理 AcWing 890. 能被整除的数
Winter vacation water test 1 Summary
时间很快,请多做有意义的事情
ADG5412FBRUZ-RL7应用 双电源模拟开关和多路复用器IC
confidential! Netease employee data analysis internal training course, white whoring! (attach a data package worth 399 yuan)
our solution
求组合数 AcWing 888. 求组合数 IV
AE tutorial - path growth animation
Using handler in a new thread
Presentation of attribute value of an item
[leetcode] day94 reshape matrix
Simple selection sort of selection sort