当前位置:网站首页>记录一下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库的二次开发方法。
缺点是不能持续性的保存很大的视频,不能携带配套音频。
边栏推荐
- Leetcode(605)——种花问题
- Es6-- set
- 首个大众可用PyTorch版AlphaFold2复现,哥大开源OpenFold,star量破千
- #23class介绍
- Kubernetes cluster construction of multiple ECS
- Use and difference between ue4\ue5 blueprint node delay and retroggable delay
- Xampp重启后,MySQL服务就启动不了。
- 异或运算符简单逻辑运算 a^=b
- The sum of logarithms in group 52--e of Niuke Xiaobai monthly race (two points)
- LM小型可编程控制器软件(基于CoDeSys)笔记十七:pto脉冲功能块
猜你喜欢

首个大众可用PyTorch版AlphaFold2复现,哥大开源OpenFold,star量破千

Oracle - getting started

No absurd tea applet - rule change

Pycharm student's qualification expires, prompting no suitable licenses associated with account solution
![[eosio] eos/wax signature error is_ Canonical (c): signature is not canonical](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[eosio] eos/wax signature error is_ Canonical (c): signature is not canonical

ACM. HJ16 购物单 ●●

Idea FAQ collection

Xampp重启后,MySQL服务就启动不了。

leetcode_ 136_ A number that appears only once

电路模块分析练习5(电源)
随机推荐
22 years of a doctor in Huawei
Several optimization scenarios using like fuzzy retrieval in SQL
Civil Aviation Administration: by 2025, China will initially build a safe, intelligent, efficient and green aviation logistics system
Idea FAQ collection
小程序-视图与逻辑
OpenJudge NOI 2.1 15:Counterfeit Dollar
LM small programmable controller software (based on CoDeSys) note XVII: PTO pulse function block
Comp212 distributed protocol
Flex & Bison 开始
Windows安装Redis及简单使用
ES6 - numerical extension and object extension
[modulebuilder] GP service realizes the intersection selection of two layers in SDE
Kubernetes cluster construction of multiple ECS
首个大众可用PyTorch版AlphaFold2复现,哥大开源OpenFold,star量破千
2. What is the geometric meaning of a vector multiplying its transpose?
[opencv450 samples] create image list yaml
ES6 learning -- let
pdm的皮毛
Jupiter notebook common shortcut keys
golang Make a list of intervals with sequential numbers