Why does this MP4 video not play on iOS?

Open with the document App, only the file name and file type will be displayed, and the general video can be played directly.

So, I switched to AVplayer to play this video with only sound but no picture.

mp4info:

File:
  major brand:      mp42
  minor version:    0
  compatible brand: mp42
  compatible brand: mp41
  fast start:       yes

Movie:
  duration:   18842880 (media timescale units)
  duration:   209365 (ms)
  time scale: 90000
  fragments:  no

Found 2 Tracks
Track 1:
  flags:        1 ENABLED
  id:           1
  type:         Video
  duration: 209320 ms
  language: eng
  media:
    sample count: 5233
    timescale:    25000
    duration:     5233000 (media timescale units)
    duration:     209320 (ms)
    bitrate (computed): 9592.363 Kbps
  display width:  1920.000000
  display height: 1080.000000
  frame rate (computed): 25.000
  Sample Description 0
    Coding:       avc1 (H.264)
    Codec String: avc1.640029
    AVC Profile:          100 (High)
    AVC Profile Compat:   0
    AVC Level:            41
    AVC NALU Length Size: 4
    AVC SPS: [67640029ac2ca501e0111f7350101014000003000400000300ca10]
    AVC PPS: [68e881135250]
    Width:       1920
    Height:      1080
    Depth:       24
Track 2:
  flags:        1 ENABLED
  id:           2
  type:         Audio
  duration: 209320 ms
  language: eng
  media:
    sample count: 9814
    timescale:    48000
    duration:     10049536 (media timescale units)
    duration:     209365 (ms)
    bitrate (computed): 317.376 Kbps
  Sample Description 0
    Coding:       mp4a (MPEG-4 Audio)
    Codec String: mp4a.40.2
    Stream Type: Audio
    Object Type: MPEG-4 Audio
    Max Bitrate: 407250
    Avg Bitrate: 317375
    Buffer Size: 1536
    MPEG-4 Audio Object Type: 2 (AAC Low Complexity)
    MPEG-4 Audio Decoder Config:
      Sampling Frequency: 48000
      Channels: 2
    Sample Rate: 48000
    Sample Size: 16
    Channels:    2

I used the video conversion tool to convert it to fit the iPhone:

File:
  major brand:      isom
  minor version:    200
  compatible brand: isom
  compatible brand: iso2
  compatible brand: avc1
  compatible brand: mp41
  fast start:       yes

Movie:
  duration:   209320 (media timescale units)
  duration:   209320 (ms)
  time scale: 1000
  fragments:  no

Found 2 Tracks
Track 1:
  flags:        3 ENABLED IN-MOVIE
  id:           1
  type:         Video
  duration: 209320 ms
  language: eng
  media:
    sample count: 5233
    timescale:    12800
    duration:     2679296 (media timescale units)
    duration:     209320 (ms)
    bitrate (computed): 11996.339 Kbps
  display width:  1920.000000
  display height: 1080.000000
  frame rate (computed): 25.000
  Sample Description 0
    Coding:       avc1 (H.264)
    Codec String: avc1.640033
    AVC Profile:          100 (High)
    AVC Profile Compat:   0
    AVC Level:            51
    AVC NALU Length Size: 4
    AVC SPS: [27640033ac1316c0780227e5c05a8080809818002ee0000bb82f7be0f8442370]
    AVC PPS: [28ee1f2c]
    Width:       1920
    Height:      1080
    Depth:       24
Track 2:
  flags:        3 ENABLED IN-MOVIE
  id:           2
  type:         Audio
  duration: 209320 ms
  language: eng
  media:
    sample count: 9812
    timescale:    48000
    duration:     10047360 (media timescale units)
    duration:     209320 (ms)
    bitrate (computed): 317.379 Kbps
  Sample Description 0
    Coding:       mp4a (MPEG-4 Audio)
    Codec String: mp4a.40.2
    Stream Type: Audio
    Object Type: MPEG-4 Audio
    Max Bitrate: 317379
    Avg Bitrate: 317379
    Buffer Size: 0
    MPEG-4 Audio Object Type: 2 (AAC Low Complexity)
    MPEG-4 Audio Decoder Config:
      Sampling Frequency: 48000
      Channels: 2
    Sample Rate: 48000
    Sample Size: 16
    Channels:    2

The AVC Level and bitrate both higher than the first video, but it plays normally。

So why can't the first video play?

I want to know which MP4 videos the iPhone can't play. Apple doesn't have specific specs, but says it supports MP4 and H.264

Post not yet marked as solved Up vote post of flyff1991 Down vote post of flyff1991
993 views

Replies

@flyff1991 I have been trying to play an MP4 from remote resource and I get the same symptoms, audio, no video. If I take the url I used and past in safari, same issue. Other urls I have with MP4s as the resource work fine but I can't seem to find why sometimes they don't work.

Did you ever find an answer to this?

I inspected the stream in VLC (where it does work), and noticed these differences between a working and non working mp4

  1. Slightly different buffer resolution (e.g. buffer resolution 1920x1090 v video resolution 1920x1080)
  2. Decoded format: Planar 4:2:0 YUV
  3. Color Space : ITU-R BT.601 Range

In the mp4's that work, the buffer and video resolution match, and it did not include the decoded format or color space field.

One thing I noticed in your logs above is differences in timescales

Movie:
  duration:   18842880 (media timescale units)
  duration:   209365 (ms)
  time scale: 90000

v

Movie:
  duration:   209320 (media timescale units)
  duration:   209320 (ms)
  time scale: 1000