androidvideoaudio-streamingmovacc

Android Streaming video MOV with ACC (mp4a) audio and H264 video


I would like to show some video in my android application. Video are like: http://myserver.com/video/myvideo.mov All the video are in .mov and some in .flv.

.mov have H264 - MPEG-4 AVC (avc1) video channel, and MPEG ACC Audio (mp4a) audio channel.

.flv have Flash Video (flv1) video channel, and MPEG Audio layer 1/2/3 (mpga) audio channel.

If I play the .mov with the default android player I can see the video image, but I can't hear anithing. With the .flv I can see and hear the file in the default android player.

Is there a way to play correctly the .mov with the MPEG ACC Audio (mp4a) audio channel? Anyone know if there is a custom library to play this .mov files? Thank you in advance!


Solution

  • As stated here MOV container even with H264/AAC inside is not supported in Android. The underlying reason is that MOV (aka quicktime file format) is a proprietary container from Apple (it is a close one from MP4 but still not the same) - most of the time it works 100% only on Apple device and/or quicktime player.

    FLV container from Adobe is also not supported in Android (FLV can be packed with H263 or H264 video inside).

    It can work on some device but as you experienced it, it can be clunky and surely inconsistent across devices.

    Your best bet is to package/transcode your file in a format where you know you will have cross-Android compatibility.

    If you want it badly you could think about building your own video player/decoder to play back mov/flv files (like with ffmpeg) but it is an advanced project in itself and providing code for that would be outside of the scope of stackoverflow - maybe have a look here.