What governs playback speed when encoding with Android's MediaCodec + mp4parser?

心已入冬 提交于 2019-12-02 11:15:28

I figured it out: When encapsulating with mp4parser (needed if you target API<18), you need to set the speed in mp4parser's API. The presentation time you provide to queueInputBuffer appearently make no difference if you're not using Android's built-in muxer (available only from API18).

I stumbled on this question on github, which indicates the following is required:

 new H264TrackImpl(new FileDataSourceImpl(rawDataFile), "eng", 100, 10);
  • the last two parameters (timeScale and frameTick) set the playback speed to 'noraml'.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!