0

I need to embed video in an Android application and hope to do so quickly in order to spin up a demo for my company. No proprietary SDKs allowed, so it seems my options are:

(1) OpenMAX AL
(2) OpenMAX IL
(3) Gstreamer
(4) ?

Any recommendations on which is the best approach? Requirements are that I play MP4 (typically with h.264 video and aac audio), show a progress slider, have robust seek and start/stop performance, and do progressive download on larger files over a network.

Restricting to Android 4.x and newer is fine (so OpenMAX is fine).

RiaD
  • 46,822
  • 11
  • 79
  • 123
Fixee
  • 1,581
  • 2
  • 15
  • 25
  • 1
    none of this "options" is your option, Android already offers its own set of codecs, you also should avoid third part SDK or to implement your own version of patented codecs. – user2485710 Jul 13 '13 at 04:05

1 Answers1

2

Android natively supports playing MP4 videos as per the Supported Media Formats guide. You can use a VideoView along with a MediaController to play videos with play/pause, rewind, fast forward, and seeking for progressively downloaded videos.

ianhanniballake
  • 191,609
  • 30
  • 470
  • 443
  • Do you know if this interface provides a callback to update the app with media player's position in the video? – Fixee Jul 13 '13 at 07:15
  • Looking at [MediaController's source](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/widget/MediaController.java), they register a `Handler` which handles updating the progress by calling `VideoView.getCurrentPosition()` every second. You could certainly do something similar if you also need the current position in the video. – ianhanniballake Jul 13 '13 at 14:46