Forums - Video scrubbing on Android / Snapdragon

1 post / 0 new
Video scrubbing on Android / Snapdragon
Tim Closs
Join Date: 7 Nov 13
Location: London
Posts: 1
Posted: Thu, 2013-11-07 01:38
We have an iOS app that we are currently rebuilding for Android. The app relies on being able to scrub video with frame accuracy. We have medical animations that are rendered out as single frames; we build subsets of frames into lots of small (1-2 second) videos; and the app provides the ability to scrub those videos and see each individual frame.

The MP4 videos we initially created work fine on iOS. When we tried to get them working on Android (using the MediaPlayer class), we entered a world of pain! What we need to do is find a video format that will play *and allow frame-accurate scrubbing* across all Android devices. Initially we are targetting Android 3.0 and above, but we probably want to stretch back to 2.3.3 after our initial release. Here's what I've discovered so far:

- Android claims that H264 "baseline profile" should be supported everywhere: (URL). However, within that, there are dozens of other settings that may or may not be supported. Is there a more fine-grained list anywhere? Currently we are converting to H264 within an MP4 container.

- I haven't yet seen an Android device that will accurately scrub H264 files without inserting keyframes ("intra frames"). iOS will happily take H264 files *without* keyframes and provide accurate scrubbing. It seems that, to allow accurate scrubbing, we need to insert a keyframe for *every* frame of the video (the relevant ffmpeg setting is "-g 1"). This significantly increases the file size.

- However, inserting a keyframe for *every* frame results in a video that will not play at all on the Samsung Galaxy Note 3 (Snapdragon chipset I believe). Reducing the keyframes to every second frame or above seems to work (ffmpeg setting "-g 2").


To summarise:
- MediaPlayer.seekTo() seems very dependent on the video format, and varies across devices. Is this the intention?
- Is there a base level of behaviour that seekTo() is supposed to provide, regardless of format?
- Can you provide a precise description of a video format that will allow frame-accurate scrubbing across all Android (Qualcomm) devices (at least for 3.0 and above?)

Regards,
Tim
  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.