I'm currently testing why a video made with an iOS device does not seems to work on my Galaxy S3.

Here's the file info from ffmpeg :

Video took with Galaxy S3:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20130715_151126.mp4':
    major_brand     : isom
    minor_version   : 0
    compatible_brands: isom3gp4
    creation_time   : 2013-07-15 13:12:08
  Duration: 00:00:41.33, start: 0.000000, bitrate: 17143 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 17015 kb/s, 30.01 fps, 30 tbr, 90k tbn, 180k tbc (default)
      rotate          : 90
      creation_time   : 2013-07-15 13:12:08
      handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, 123 kb/s (default)
      creation_time   : 2013-07-15 13:12:08
      handler_name    : SoundHandle

Video took with iPhone 4S:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'trim.BE866F9A-654A-4C76-AC43-5CDF4923A2F0.mp4':
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2013-11-15 12:44:22
    encoder         : 6.0
    encoder-fra     : 6.0
    date            : 2013-05-31T14:22:11+0200
    date-fra        : 2013-05-31T14:22:11+0200
    model           : iPhone 4S
    model-fra       : iPhone 4S
    make            : Apple
    make-fra        : Apple
  Duration: 00:00:21.79, start: 0.000000, bitrate: 4221 kb/s
    Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, 62 kb/s (default)
      creation_time   : 2013-11-15 12:44:22
      handler_name    : Core Media Data Handler
    Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 4147 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
      rotate          : 90
      creation_time   : 2013-11-15 12:44:22
      handler_name    : Core Media Data Handler

They seems to be fairly the same video and audio encoding using h264/aac The only thing that differs I can see are :

  • The resolution (It should not be a problem)
  • The FPS (should not be a problem)
  • In iOS the audio is stream 0:0 while in Android it is 0:1

The thing is, a video took with a Galaxy S3 does work fine on iOS without recoding it.

Anyone knows why ?

migrated from superuser.com Nov 15 '13 at 13:35

This question came from our site for computer enthusiasts and power users.

  • Per developer.android.com/guide/appendix/media-formats.html Android only supports Baseline H.264. Why it creates High Profile video in the first place baffles me though. – slhck Nov 15 '13 at 13:36
  • @slhck I think you should put that in as an answer. :) – geffchang Nov 15 '13 at 14:00
  • So Android only support Baseline Profile, but create High Profile... I don't get it ;-) – TheSquad Nov 15 '13 at 14:06
  • Have you tried using a different video player? – Compro01 Nov 15 '13 at 14:14
  • I would like to use the default player, since it is to create an Cross-Platform App iOS - Android, I don't want to ask Android user to download another player in order to play it. And since video should be saved on the users gallery, I can't even do a Player myself... I would have to re-encode the video. – TheSquad Nov 15 '13 at 14:18

If you do not want your users to download a player to show the videos, then you have no other choice but to create videos with the H.264 Baseline profile. This is because the stock Android player does not support anything higher.

iOS on the other hand does support the Main and High profile. While not listed in the iOS specifications, the iPhone 4S and upwards should support it.

It could very well be that your Samsung's video app records High profile video and can also play it (because Samsung included a non-stock player*). In any case, converting to Baseline profile would ensure that the video is playable on all devices.

ffmpeg -i input.mp4 -c:v libx264 -profile:v baseline -pix_fmt yuv420p -crf 23 output.mp4

That should do it. You can change the CRF parameter to change quality. Check the x264 encoding guide for more.

* Disclaimer: I don't own a Samsung Android phone. No idea if they have a non-stock player.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.