Android 安卓可以';t播放H264/AAC视频
我们正在iOS应用程序中录制视频文件,并希望它们在iOS/Android/Web上播放。因此,我们选择了MP4容器中的H264/AAC。 但是,在不同的设置下,iOS H264视频不会在Android设备(LG D335/Galaxy S4)上播放。 我们如何播放视频?简单的测试方法是从直接链接下载视频,然后在Android设备上的下载中打开它。 对于我们收到的任何iOS H264视频,“无法播放此文件”/“抱歉,无法播放此视频” 视频文件的Mediainfo如下所示 想知道,为什么这些视频文件不能在Android上播放,而它是H264/AAC和基线配置文件? 多谢各位 MediaInfo输出 iOS 1280x720: iOS 640x480: 安卓:Android 安卓可以';t播放H264/AAC视频,android,ios,video,mp4,h.264,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版本吗?这些文件具有不同的MP4
ftyp
:qt
vsmp42
。一个播放器应该能够同时播放这两个版本,所以可能在之前的版本中有一些缺陷,已经修补。三星Galaxy S4是4.4.4,LG是5.0.3另一个奇怪的事情是HD样本的比特率<代码>43.8 Mbps对于HD来说是巨大的(这就是为什么它跳到了4.1
而不是3.1
)。在该示例中,这可能是一个因素。3.0级也不会播放(一个想法是查看它是否在VLC应用程序(而不是beta版)中播放)。您还可以在其中启用调试日志。
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
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