Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The answer to this question will never be consistent across all devices or across all videos.</p> <p>Whether a given video file will play in a given player depends on three things:</p> <ul> <li>The video container format (file type). </li> <li>The codecs the video (and potentially audio) streams are encoded with</li> <li>Your player's support for that combination of container format and codec</li> </ul> <p>The codec and player/device support for it is almost certainly the cause of the inconsistent results you've seen. (A codec, if you didn't know, is basically a repeatable mathematical formula that tells your system how to turn bits and bytes packed into a file into moving pictures(and back again, for that matter))</p> <p>There are a large variety of video codecs in the video files floating around out there. Support for these codecs is wildly inconsistent just due to the history of video distribution. Many devices won't support streams encoded with certain codecs. There are a variety of reasons for this, but the most common are obscurity or licensing costs.</p> <p>For example, up until a few years ago, almost everything was encoded in an .FLV container with an On2 VP6/VP7/VP8 codec. This is causing headaches today because while On2 owned these codecs, they kept a tight rein on the licenses. That didn't relax until .FLV had already begun to lose relevance, and so there is not a whole lot of (legitimate) software out there that can work with On2-encoded content.</p> <p>What all of this means is that there is no silver bullet. All video will never run on all devices, at least not without the aid of video players that install and use their own codecs to decode the streams. </p> <p>Needless to say, this does not include the libraries provided to you and your end users by the factory-installed Android libraries.</p> <p>So, what do you do? Well, short of producing a video player that carries its own codecs, you can most effectively address the problem with a two-step approach:</p> <ol> <li>Target specific devices that you want your application to work on</li> <li>Encode your content to use use a video codec that works on all the devices you want to target. You may need to produce two copies of your video if you find that there is no codec that works across all devices you plan to support.</li> </ol> <p>Today, the widest support is available with an MP4 container and a video stream encoded with the H.264 (AVC) codec. As I said, there is no silver bullet, and H.264 support is not universal by any means, but this one format will be playable more potential users than any other single choice you could make, due to its popularity and wide support in modern desktop and mobile environments.</p> <p>Some tools you may find helpful:</p> <ul> <li><a href="http://sourceforge.net/projects/mediainfo/">MediaInfo</a> will let you peek inside MPEG-flavored video containers to see what codecs are in use. This will be helpful in determining which devices are having trouble with which codecs.</li> <li><a href="http://www.ffmpeg.org/">FFmpeg</a> is an encoding application that can convert your content to MP4/H.264</li> </ul> <p>Good luck!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload