首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >android jcodec:如何设置帧率

android jcodec:如何设置帧率
EN

Stack Overflow用户
提问于 2013-11-26 23:54:20
回答 1查看 4.2K关注 0票数 2

我有一组图像,我想生成一个幻灯片作为视频文件。我正在使用jcodec。当我对帧进行编码时,是否可以指定该帧必须显示一定的时间(例如,1秒)?

EN

回答 1

Stack Overflow用户

发布于 2014-01-21 22:16:33

是的,可以指定帧的时间。它在https://github.com/jcodec/jcodec/issues/21#issuecomment-23095738中有解释

代码语言:javascript
复制
     new MP4Packet(
result,      // Bytebuffer that contains encoded frame
i,             // Presentation timestamp ( think seconds ) expressed in timescale units ( just multiply second by
               // timescale value below. This is to avoid floats.
               // Example: timescale = 25, pts = 0, 1, 2, 3, 4, 5 .... ( PAL 25 fps )
               // Example: timescale = 30000, pts = 1001, 2002, 3003, 4004, 5005, 6006, 7007 ( NTSC 29.97 fps )
timescale, // See above
1,            // Duration of a frame in timescale units ( think seconds multiplied by number above)
               // Examlle: timescale = 25, duration = 1 ( PAL 25 fps )
               // Example: timescale = 30000, duration = 1001 ( NTSC 29.97 fps )
frameNo,  // Just a number of frame, doesn't have anything to do with timing
true,         // Is it an I-frame, i.e. is this a seek point? Players use this information to instantly know where to seek
null,         // just ignore, should be null. This is used by the older brother of MP4 - Apple Quicktime which supports
               // tape timecode
i,             // just put the same as pts above
0             // sample entry, should be 0
)
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20221836

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档