3

UPD: I guess I found the problem. For some reason, 1800x1080 video aren't playing while same vid resized to 800x480 with same set of encoding settings is working just fine. So the question is: why I couldn't play video with res. bigger than the size of my screen?

I'm trying to build a simple video-streaming app for android.

For the purpose of testing, I used this video http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4, and it worked fine.

However I miserably failed trying to prepare my own video for streaming. I'm using FFmpeg & libx264 with the following line (last attempt):

ffmpeg -i <input> -c:v libx264 -profile:v baseline -c:a aac -strict experimental <output>

Then I passed the output to qt-faststart, as some people suggested... No effect.

Here is the output of ffmpeg -i for my video:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bbb_audio_h264.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2008-05-27 18:40:35
    encoder         : Lavf53.32.100
  Duration: 00:00:10.04, start: 0.000000, bitrate: 5048 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 4605 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc
    Metadata:
      creation_time   : 2008-05-27 18:40:35
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, s16, 440 kb/s
    Metadata:
      creation_time   : 2008-05-27 18:40:35
      handler_name    : 

And for the working one:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'big_buck_bunny.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42avc1
    creation_time   : 2010-02-09 01:55:39
  Duration: 00:01:00.09, start: 0.000000, bitrate: 733 kb/s
    Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 22050 Hz, stereo, s16, 65 kb/s
    Metadata:
      creation_time   : 2010-02-09 01:55:39
      handler_name    : Apple Sound Media Handler
    Stream #0:1(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360, 612 kb/s, 23.96 fps, 24 tbr, 600 tbn, 1200 tbc
    Metadata:
      creation_time   : 2010-02-09 01:55:39
      handler_name    : Apple Video Media Handler
    Stream #0:2(eng): Data: none (rtp  / 0x20707472)
    Metadata:
      creation_time   : 2010-02-09 01:55:39
      handler_name    : hint media handler
    Stream #0:3(eng): Data: none (rtp  / 0x20707472)
    Metadata:
      creation_time   : 2010-02-09 01:55:39
      handler_name    : hint media handler
Timofey
  • 490
  • 1
  • 4
  • 18
  • What exactly went wrong with the 1080p video? – Alex Cohn Dec 16 '13 at 23:58
  • The app reported with standard message "couldn't play the video". – Timofey Dec 17 '13 at 20:46
  • Which app? The built-in video player? That won't be surprising, but depends on device and ROM. – Alex Cohn Dec 17 '13 at 20:56
  • Yes, I think so. I test on HTC Desire S, if it matters. The app uses MediaController & VideoView. I pretty new into development for android and used this article as a guide: http://www.androidbegin.com/tutorial/android-video-streaming-videoview-tutorial/ – Timofey Dec 17 '13 at 23:58
  • 1
    OK, so this is definitely the case. The fact that your device cannot play a 1080p baseline h264 stream is because ghe device manufacturer did not include such support. Other devices may play your stream even if their screens are ldss than 1080 pixels wide. – Alex Cohn Dec 18 '13 at 04:52
  • According to http://androidforums.com/htc-desire-s/341630-htc-desire-s-720p.html, your device can play 720p, even though the scree is only 800×480 – Alex Cohn Dec 18 '13 at 05:01

0 Answers0