How to convert .movpkg to mp4 How to convert .movpkg to mp4 ios ios

How to convert .movpkg to mp4


According to https://en.wikipedia.org/wiki/HTTP_Live_Streaming, those "fragments" are MPEG-2 TS fragments. You can simply concatenate all these fragments and play the result in most video players, but it will not be a real mp4 file as you wanted. But it's worth testing, maybe the resulting ".ts" video file is good enough for your needs.But it isn't good enough (e.g., my favorite streamer works much better with mp4 files than with) MPEG-2 TS, it does make sense to convert. I usually do this in Linux, with ffmpeg:

ffmpeg -i all.ts -acodec copy -absf aac_adtstoasc -vcodec copy out.mp4

Where "all.ts" is the concatenation of all fragments (in proper order, of course, as specified in the m3u8 or often as part of the filename), and the output will go to "out.mp4". This conversion just plays with the containers and does not need to re-encode the video so it's very fast.

This answer may not be exactly what you're looking for (it's not objective-C or Swift code or anything you can run on your iPhone) but maybe it will give you a hint what to look for, or at least something you can test on your desktop.