Why doesn't my MPEG-TS play on iOS?

时光毁灭记忆、已成空白 提交于 2019-12-13 04:37:20

问题


My MPEG-TS video isn't playing on iOS via HTTP Live Streaming and I am not sure why. I know my iOS code/m3u8 format is correct because if I replace my .ts file with a sample one from apple (bipbop), it works. I provided information on my video (doesn't work) and the one that works.

Mine (not working)

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%)

Apples (working)

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

My video doesn't have an audio stream, but that shouldn't matter.

What is it about my video that makes it not work via HTTP Live Streaming?


回答1:


Your video is high profile, level 4.2. iPhone 5 only supports up level 4.1. iPhone 4 only supports up to main profile level 3.1. Also 23.1 Also MBps is really high. 3 or 4 is probably max.

Edit:

Here is a compiled list I have made for ios devices.




回答2:


The problem is not the operating system. iOS is just passing on the encoded h.264 stream to the SoC's video decode block. The hardware decoding blocks are limited, and each SoC iteration has different limitations.

Generally the limits are on the profile and macroblock rate. You will need to severely cut back the bitrate in your video if you want it to play on any iOS device.

Szatmary's table looks like a great resource for choosing your target encoding parameters.



来源:https://stackoverflow.com/questions/20446134/why-doesnt-my-mpeg-ts-play-on-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!