当前位置:网站首页>记录一下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库的二次开发方法。
缺点是不能持续性的保存很大的视频,不能携带配套音频。
边栏推荐
- Unity technical manual - getKey and getaxis and getbutton
- STM32 development board + smart cloud aiot+ home monitoring and control system
- Comp2913 database
- 2. What is the geometric meaning of a vector multiplying its transpose?
- Exclusive or operator simple logic operation a^=b
- Ue4 Ue5 combine le plug - in de reconnaissance vocale de bureau pour la reconnaissance vocale
- Es6-- set
- Idea auto generator generates constructor get/set methods, etc
- Actual combat: how to quickly change font color in typera (blog sharing - perfect) -2022.6.25 (solved)
- Oracle - data query
猜你喜欢

Live800在线客服系统:跨越时空做生意,从每次互动开始

做接口测试,这3种工具到底什么时候用?
![[modulebuilder] GP service realizes the intersection selection of two layers in SDE](/img/4a/899a3c2a0505d2ec2eaae97a3948c9.png)
[modulebuilder] GP service realizes the intersection selection of two layers in SDE

电路模块分析练习5(电源)

Oracle - getting started

Idea auto generator generates constructor get/set methods, etc

leetcode_ 136_ A number that appears only once

Fegin client entry test

Meta universe standard forum established

Problem recording and thinking
随机推荐
关闭MongoDB一些服务需要注意的地方(以及开启的相关命令)
汇编语言核心要点
Idea auto generator generates constructor get/set methods, etc
The sum of logarithms in group 52--e of Niuke Xiaobai monthly race (two points)
NLP text summary: use the pre training model to perform text summary tasks [transformers:pipeline, T5, Bart, Pegasus]
UE4_ Ue5 combines the offline voice recognition plug-in for speech recognition
How to use JMeter for interface testing
Oracle -- table operation
[2023 proofreading and bidding questions] Part 1: Measurement Technology FPGA post (roughly analytical version)
Flex & Bison 開始
Unity的Ping类使用
. SQL database import error: / *! 40101 SET @OLD_ COLLATION_ [email protected]@COLLATION_ CONNECTION */
Flex & Bison Start
STM32开发板+机智云AIoT+家庭监测控制系统
ES6-Const常量与数组解构
小程序-视图与逻辑
Unity technical manual - color in life cycle coloroverlifetime-- speed color colorbyspeed
Basic operator
2022年河南省第一届职业技能大赛网络安全项目试题
论文笔记: 多标签学习 MSWL