• 5

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

video not playing on Android (chrome) and iOS (safari)

Hi I have a few video that DOES NOT play in Android (directly on Chrome) and on iOS (directly on Safari) but plays on Windows, Mac and Linux on any browser.

Here is the ffprobe output

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'intro_sequence_01.mp4':
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    date            : 2018-10-08T08:15:57.948731
    encoder         : Lavf58.18.104
  Duration: 00:00:08.00, start: 0.000000, bitrate: 259 kb/s
    Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 1920x1080, 257 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
      handler_name    : VideoHandler

and here is the ffprobe output of another video that DOES play on Android and Chrome:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Torcia_960x540.mp4':
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2017-02-10T16:14:10.000000Z
  Duration: 00:00:11.52, start: 0.000000, bitrate: 10585 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv), 960x540 [SAR 1:1 DAR 16:9], 10576 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
      creation_time   : 2017-02-10T16:14:10.000000Z
      handler_name    : Mainconcept MP4 Video Media Handler
      encoder         : AVC Coding

Both are .mp4 format and are using h264 codec. As far as I can see, I notice a difference in codec profile h264 (High 4:4:4 Predictive) vs Video: h264 (Main) and yuv444p vs yuv420p(tv) and on metadata section.

I tried re-encoding the first video with ffmpeg but without success. Does anyone know why video1 is not compatible with Android and iOS and how to re-ffmpeg it to make it play? Thanks!

      • 2
    • @aergistal: Thanks! I have reencoded like that ffmpeg -i original.mp4 -vcodec libx264 -acodec copy -vprofile main -pix_fmt yuv420p reencoded.mp4 and now it plays! Thanks again! If you turn your comment into an answer I'll vote and accept it.

According to aeristal comment on my question above, I have re-encoded my video like this:

ffmpeg -i original.mp4 -vcodec libx264 -acodec copy -vprofile main -pix_fmt yuv420p reencoded.mp4

and now it plays back on Android and iOS too.

The key switches are -vprofile main and most important -pix_fmt yuv420p as Android / iOS does not support Hi444PP profile as stated by aergistal

  • 1
Reply Report