【发布时间】:2013-12-07 20:19:00
【问题描述】:
我的 MPEG-TS 视频没有通过 HTTP Live Streaming 在 iOS 上播放,我不知道为什么。我知道我的 iOS 代码/m3u8 格式是正确的,因为如果我将 .ts 文件替换为来自苹果 (bibpop) 的示例文件,它就可以工作。我提供了有关我的视频(无效)和有效视频的信息。
我的(不工作)
General
ID : 1 (0x1)
Format : MPEG-TS
File size : 9.57 MiB
Duration : 3s 265ms
Overall bit rate mode : Variable
Overall bit rate : 24.3 Mbps
Video
ID : 769 (0x301)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.2
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Codec ID : 27
Duration : 3s 279ms
Bit rate : 23.1 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Stream size : 9.01 MiB (94%)
苹果(工作)
General
ID : 1 (0x1)
Format : MPEG-TS
File size : 281 KiB
Duration : 9s 943ms
Overall bit rate mode : Variable
Overall bit rate : 231 Kbps
Video
ID : 257 (0x101)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L2.1
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Format settings, GOP : M=2, N=24
Codec ID : 27
Duration : 9s 542ms
Width : 400 pixels
Height : 300 pixels
Display aspect ratio : 4:3
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Color primaries : BT.601 NTSC
Transfer characteristics : BT.709
Matrix coefficients : BT.601
Audio
ID : 258 (0x102)
Menu ID : 1 (0x1)
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Muxing mode : ADTS
Codec ID : 15
Duration : 9s 380ms
Bit rate mode : Variable
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 22.05 KHz
Compression mode : Lossy
Delay relative to video : -121ms
我的视频没有音频流,但这没关系。
是什么导致我的视频无法通过 HTTP 实时流播放?
【问题讨论】:
-
您收到的错误是什么?
-
我想你可能会在this blog 上找到答案。它在最后说
high422 and high444 videos do not currently play on any known iOS hardware。你的视频是High@L4.2。将其格式配置文件更改为 Main 甚至 Baseline,我认为它应该可以工作。 -
我将其更改为 3.0 并获得了完全相同的结果。另外,我没有收到任何错误。 MPMoviePlayerViewController 只是挂在那里。如果我使用 Apple 的示例 .ts,它可以正常工作。
-
@HAS 是的,但 High420 确实可以在 iPhone 4s 及更高版本上播放。 444/422 指的是在他的示例中显然是 420 的色度子采样