当前位置:网站首页>记录一下Qt将少量图片输出为MP4的思路及注意事项
记录一下Qt将少量图片输出为MP4的思路及注意事项
2022-06-25 22:00:00 【北极熊的奋斗史】
1. 先使用库将所有图片保存为存储为gif图,存储到本地。库使用的刘典武大神的保存gif图库。可从下面地址下载到示例程序。示例程序。
2. 下载最新的ffmpeg运行程序,无需开发库,放到工程目录下。ffmpeg网址:Download FFmpeg
3. 使用QProess启动ffmpeg.exe进程,并附加参数:-f gif -i 源文件.gif -pix_fmt yuv420p 目标.mp4
即可将gif图片转为mp4。
注意:保存gif图片时,需设置:宽度必须是32的倍数,高度必须是2的倍数,否则会报错:width / height not divisible by 2。
采用先保存为gif,再转为MP4的办法是因为这样保存的速度快,效率高,不需要深入研究ffmpeg库的二次开发方法。
缺点是不能持续性的保存很大的视频,不能携带配套音频。
边栏推荐
- Why is BeanUtils not recommended?
- OpenJudge NOI 2.1 15:Counterfeit Dollar
- My C language learning process
- 为什么OpenCV计算的帧率是错误的?
- cookie、session、token
- Implementation of importing vscode from PDM
- Kubernetes cluster construction of multiple ECS
- STM32开发板+机智云AIoT+家庭监测控制系统
- Actual combat: how to quickly change font color in typera (blog sharing - perfect) -2022.6.25 (solved)
- Idea auto generator generates constructor get/set methods, etc
猜你喜欢

Circuit module analysis exercise 5 (power supply)

String deformation (string case switching and realization)

软件测试面试一直挂,面试官总是说逻辑思维混乱,怎么办?

2022年河南省第一届职业技能大赛网络安全项目试题

Problem recording and thinking

As a programmer, how can we learn, grow and progress happily? (personal perception has nothing to do with technology)

The applet draws a simple pie chart

Es7/es9 -- new features and regularities

ACM. HJ16 购物单 ●●

UE4_ Ue5 combines the offline voice recognition plug-in for speech recognition
随机推荐
CDN加速是什么
等价类,边界值,场景法的使用方法和运用场景
Oracle - getting started
UE4\UE5 蓝图节点Delay与Retriggerable Delay的使用与区别
Kubernetes cluster construction of multiple ECS
Live800 online customer service system: do business across time and space, starting from each interaction
leetcode_ 136_ A number that appears only once
What aspects should we start with in the feasibility analysis of dry goods?
Unity technical manual - getKey and getaxis and getbutton
Somme logarithmique (deux points) pour le Groupe 52 - - e de la course de la lune blanche de niuke
Es6-- set
关闭MongoDB一些服务需要注意的地方(以及开启的相关命令)
Applets - view and logic
Meta universe standard forum established
[opencv450 samples] create image list yaml
软件测试面试一直挂,面试官总是说逻辑思维混乱,怎么办?
Svn icon disappearing solution
ES6 const constants and array deconstruction
User interaction scanner usage Advanced Edition example
ACM. HJ16 购物单 ●●