Android无法播放H264 / AAC视频

时间:2015-08-20 21:17:49

标签: android ios video mp4 h.264

我们正在iOS应用程序中录制视频文件,并希望它们在iOS / Android / Web上播放。所以我们选择了MP4容器中的H264 / AAC。 但是,在不同的设置中,iOS H264视频不会在Android设备上播放(LG D335 / Galaxy S4)。 我们如何播放视频?简单的测试方法是从直接链接下载视频,然后在Android设备上的下载中打开它。 对于任何iOS H264视频,我们收到“无法播放此文件”/“抱歉,此视频无法播放”

视频文件的Mediainfo位于下方。

想知道,为什么这些视频文件无法在Android上播放,而它是H264 / AAC和Baseline个人资料?

谢谢。

MediaInfo输出

iOS 1280x720:

General
Complete name                            : /Users/a/Desktop/ios_1280.mp4
Format                                   : MPEG-4
Format profile                           : QuickTime
Codec ID                                 : qt  
File size                                : 6.46 MiB
Duration                                 : 1s 220ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 44.5 Mbps
Recorded date                            : 2015-08-20T20:33:20+0300
Encoded date                             : UTC 2015-08-20 17:33:20
Tagged date                              : UTC 2015-08-20 17:33:22
Writing application                      : 7.1.2
Writing library                          : Apple QuickTime
Model                                    : iPhone 4
Make                                     : Apple
com.apple.quicktime.make                 : Apple
com.apple.quicktime.creationdate         : 2015-08-20T20:33:20+0300
com.apple.quicktime.software             : 7.1.2
com.apple.quicktime.model                : iPhone 4

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L4.1
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Format settings, GOP                     : N=1
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1s 220ms
Source duration                          : 1s 235ms
Bit rate mode                            : Variable
Bit rate                                 : 43.8 Mbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Rotation                                 : 90°
Frame rate mode                          : Variable
Frame rate                               : 29.970 fps
Minimum frame rate                       : 28.571 fps
Maximum frame rate                       : 30.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 1.587
Stream size                              : 6.45 MiB (100%)
Source stream size                       : 6.45 MiB (100%)
Title                                    : Core Media Video
Encoded date                             : UTC 2015-08-20 17:33:20
Tagged date                              : UTC 2015-08-20 17:33:22
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 1s 220ms
Source duration                          : 1s 254ms
Bit rate mode                            : Constant
Bit rate                                 : 64.0 Kbps
Channel(s)                               : 1 channel
Channel positions                        : Front: C
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 9.61 KiB (0%)
Source stream size                       : 9.78 KiB (0%)
Title                                    : Core Media Audio
Encoded date                             : UTC 2015-08-20 17:33:20
Tagged date                              : UTC 2015-08-20 17:33:22

iOS 640x480:

General
Complete name                            : /Users/a/Desktop/ios_640.mp4
Format                                   : MPEG-4
Format profile                           : QuickTime
Codec ID                                 : qt  
File size                                : 349 KiB
Duration                                 : 1s 133ms
Overall bit rate                         : 2 527 Kbps
Recorded date                            : 2015-08-18T17:46:22+0300
Encoded date                             : UTC 2015-08-18 14:46:22
Tagged date                              : UTC 2015-08-18 14:46:23
Writing application                      : 8.4.1
Writing library                          : Apple QuickTime
Model                                    : iPhone 5s
Make                                     : Apple
com.apple.quicktime.creationdate         : 2015-08-18T17:46:22+0300
com.apple.quicktime.model                : iPhone 5s
com.apple.quicktime.software             : 8.4.1
com.apple.quicktime.make                 : Apple

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L3
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1s 133ms
Bit rate                                 : 2 434 Kbps
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Rotation                                 : 90°
Frame rate mode                          : Variable
Frame rate                               : 25.588 fps
Minimum frame rate                       : 24.000 fps
Maximum frame rate                       : 30.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.310
Stream size                              : 337 KiB (96%)
Title                                    : Core Media Video
Encoded date                             : UTC 2015-08-18 14:46:22
Tagged date                              : UTC 2015-08-18 14:46:23
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.601

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 1s 133ms
Source duration                          : 1s 184ms
Bit rate mode                            : Constant
Bit rate                                 : 58.7 Kbps
Nominal bit rate                         : 64.0 Kbps
Channel(s)                               : 1 channel
Channel positions                        : Front: C
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 8.11 KiB (2%)
Source stream size                       : 8.44 KiB (2%)
Title                                    : Core Media Audio
Encoded date                             : UTC 2015-08-18 14:46:22
Tagged date                              : UTC 2015-08-18 14:46:23

机器人:

General
Complete name                            : /Users/a/Desktop/android.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42
File size                                : 2.56 MiB
Duration                                 : 3s 546ms
Overall bit rate                         : 6 051 Kbps
Performer                                : LGE
Encoded date                             : UTC 2015-08-18 18:34:11
Tagged date                              : UTC 2015-08-18 18:34:11

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline@L4
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 3s 434ms
Bit rate                                 : 6 084 Kbps
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Rotation                                 : 90°
Frame rate mode                          : Variable
Frame rate                               : 30.000 fps
Minimum frame rate                       : 29.900 fps
Maximum frame rate                       : 30.030 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.660
Stream size                              : 2.49 MiB (97%)
Title                                    : VideoHandle
Language                                 : English
Encoded date                             : UTC 2015-08-18 18:34:11
Tagged date                              : UTC 2015-08-18 18:34:11
mdhd_Duration                            : 3434

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 3s 546ms
Duration_FirstFrame                      : 26ms
Bit rate mode                            : Constant
Bit rate                                 : 155 Kbps
Nominal bit rate                         : 12.2 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 67.0 KiB (3%)
Title                                    : SoundHandle
Language                                 : English
Encoded date                             : UTC 2015-08-18 18:34:11
Tagged date                              : UTC 2015-08-18 18:34:11

0 个答案:

没有答案