Split fragmented MP4 into multiple MP4 files

家住魔仙堡 提交于 2019-12-02 14:36:21

问题


We're trying to parse the fragments of an fMP4 file into separate independent MP4s. Can anyone help point us in the right direction to do this, or is there any open source code that exists that we could leverage?


回答1:


I think MP4Box might be what you are looking for. It's open source, so you can have a look at the code if you want to know how this can be done. It can also be used as command line tools, e.g. as described in this blog post (skip to the "Segmenting" section):

MP4Box -dash 4000 -rap -segment-name segment_ myInput.mp4

Use either the -segment-name or the -profile option to generate one file per fragment. The -rap flag is also important so the content is split in a way that each file starts with a key frame, as this is a requirement for most players. The -dash 4000 specifies the length in milliseconds (i.e. in this example 4 seconds) of the resulting files.



来源:https://stackoverflow.com/questions/36850090/split-fragmented-mp4-into-multiple-mp4-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!