The Dead Man
The Dead Man

Reputation: 5566

Why mp4 video wont play in a certain android phones?

I have a simple HTML 5 video banner a video has a 300x50, now everything works fine in desktop, but in mobile device android eg Motorola e5 plus and Samsung a70 the video is not working.

I tried even only the video link also not working,

Can someone tell me what might be the reason an mp4 not working on android phones?

Upvotes: 1

Views: 1210

Answers (1)

Mick
Mick

Reputation: 25481

This may be because the video is using Constrained Baseline H.264 profile - see output from ffprobe:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '300x50_zdrowo_3_test_v2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.24.101
  Duration: 00:00:06.04, start: 0.000000, bitrate: 246 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 300x50, 107 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)

This is not one of the 'official' Android supported Media Format (see below) so not all Android phones all be guaranteed to support it. There have also been reported Android Chrome bugs support for this also.

If you are able to re-encode into one of the profiles which all Android devices should support, it may solve your problem.

The link to supported codecs is: https://developer.android.com/guide/topics/media/media-formats#video-formats

See the note at the top of the page:

"The tables below describe the media format support built into the Android platform. Codecs that are not guaranteed to be available on all Android platform versions are noted in parentheses"

Upvotes: 2

Related Questions