I transcode H.264 files in a MP4 container using FFmpeg, the header will be placed in the end and needs to be moved.So, how do I move the header from the end of the file to the beginning of the file?I need Objective C code.
Asked
Active
Viewed 584 times
4
-
3See http://stackoverflow.com/questions/7614635/h264-mp4-index-to-front-command-line/31414747#31414747 – Ronald S. Bultje Jul 15 '15 at 13:26
-
Ronald,I need to do it from code, not from command line. – Pramuka Dias Jul 23 '15 at 10:28
-
Do you want to call ffmpeg in objective C code, or do you want to use the FFmpeg (libavformat) API to do it? – Ronald S. Bultje Jul 23 '15 at 10:57
-
I need objective C code.I want to cache a video.I'm using AVAssetResourceLoader .I can take data from that.but i need header to store that data as mp4. – Pramuka Dias Jul 24 '15 at 04:14
-
I don't know what AVAssetResourceLoader is, but it sounds like it's something that handles network / authentication requests for you. I don't think that's useful here, I mean, you would obviously do this on local files, not over network. The resulting output file with header in front could stream over network but then you wouldn't care about moving the header anymore. You can't move the header transparently in AVAssetResourceLoader without reading the full file. – Ronald S. Bultje Jul 24 '15 at 13:44