2

At the moment I've successfully generated MP4 files via MediaCodec, but I can't play them back in Instagram or Whatsapp after uploading them. Right now I assume that the problem lies with the MP4 files being not streamable as the MPEG4Writer says, and that in order to make them streamable, I have to move the MooV atom to the beginning of the MP4 file.

I know of the qt-faststart option in libav/ffmpeg, but I'm ruling that out because ffmpeg will bloat my APK size. I heard it's possible to do this using MP4Parser, though.

My questions:

  1. Is there any other alternative when it comes to moving the MooV atom to the beginning of the MP4 file?
  2. Does Instagram and Whatsapp require the MP4 file to be streamable like this?
Gensoukyou1337
  • 1,507
  • 1
  • 13
  • 31

1 Answers1

1

Actually, you don't need all of libav/ffmpeg to use qt-faststart, it's a self-contained small application - you only need the single C file that it is contained in, so it's in practice a very small tool.

I don't know if this is the reason why Instagram and Whatsapp can't work with your video, though, or if it is due to some other issue.

mstorsjo
  • 12,983
  • 2
  • 39
  • 62
  • Thanks for your answer. Turns out the video is fine as-is, because I can share it in Instagram without a hitch. Sharing in Whatsapp, however, still doesn't work - I was thinking it's a URI issue or something, I'm not exactly sure. – Gensoukyou1337 Apr 27 '16 at 11:00