请问Media内容可支持的流媒体类型范围和地址范围


(austin.ma) #1

Hi

看文档中,对于Media内容的流媒体支持类型和地址范围说的不是很清楚。

"item": {
    "itemId":"string of itemid",
    "token": "xxxx",
    "type": "AUDIO/VIDEO",
    **"url": "media streaming url",**
    "offsetInMilliseconds": 0
}

这里的url支持什么格式呢?mp3,aac,flac,wav? MMS媒体协议是否支持?URL地址头是否也限制https?

谢谢帮助。


(大发) #2
url: 'https://*****.mp3',

参考格式如上,mp3 和wav 格式已支持。其他问题需要 @不扛包 同学支持一下~


(austin.ma) #3

谢谢,所以地址必须是https的。后续有计划支持http吗?


(fan.feng) #4

Adaptive streaming

DASH

ExoPlayer supports DASH with multiple container formats. Media streams must be demuxed, meaning that video, audio and text must be defined in distinct AdaptationSet elements in the DASH manifest (CEA-608 is an exception, more information in the table below). The contained audio and video sample formats must also be supported (see the sample formats section for details).

Feature Supported Comment
Containers
FMP4 YES Demuxed streams only
WebM YES Demuxed streams only
Matroska YES Demuxed streams only
MPEG-TS NO No support planned
Closed captions/subtitles
TTML YES Raw, or embedded in FMP4 according to ISO/IEC 14496-30
WebVTT YES Raw, or embedded in FMP4 according to ISO/IEC 14496-30
CEA-608 YES Carried in SEI messages embedded in FMP4 video tracks
Metadata
EMSG metadata YES Embedded in FMP4
Content protection
Widevine YES API 19+ (“cenc” scheme) and 24+ (“cbcs”, “cbc1” and “cens”)
PlayReady SL2000 YES Android TV only
ClearKey YES API 21+

SmoothStreaming

ExoPlayer supports SmoothStreaming with the FMP4 container format. Media streams must be demuxed, meaning that video, audio and text must be defined in distinct StreamIndex elements in the SmoothStreaming manifest. The contained audio and video sample formats must also be supported (see the sample formats section for details).

Feature Supported Comment
Containers
FMP4 YES Demuxed streams only
Closed captions/subtitles
TTML YES Embedded in FMP4
Content protection
PlayReady SL2000 YES Android TV only

HLS

ExoPlayer supports HLS with multiple container formats. The contained audio and video sample formats must also be supported (see the sample formats section for details). We strongly encourage HLS content producers to generate high quality HLS streams, as described here.

Feature Supported Comment
Containers
MPEG-TS YES
FMP4 YES
ADTS (AAC) YES
MP3 YES
Closed captions/subtitles
CEA-608 YES
WebVTT YES
Metadata
ID3 metadata YES
Content protection
AES-128 YES
Sample AES-128 NO
Widevine YES API 19+ (“cenc” scheme) and 24+ (“cbcs” scheme)

Standalone container formats

Media files in the following container formats can be played directly by ExoPlayer. The contained audio and video sample formats must also be supported (see the sample formats section for details).

Container format Supported Comment
MP4 YES
M4A YES
FMP4 YES
WebM YES
Matroska YES
MP3 YES
Ogg YES Containing Vorbis, Opus and Flac
WAV YES
MPEG-TS YES Not seekable*
MPEG-PS YES Not seekable*
FLV YES Not seekable*
ADTS (AAC) YES Not seekable*
Flac YES Using the Flac extension only
  • Seeking is unsupported because the container does not provide metadata (e.g., a sample index) to allow a media player to perform a seek in an efficient way. If seeking is required, we suggest using a more appropriate container format.

详细内容:https://google.github.io/ExoPlayer/supported-formats.html


开发者常见问题 18-05-03
(大发) #5

支持呢


(austin.ma) #6

谢谢

没有看到mms和https/http的支持,但是看到了hls

因为我不是coder:sweat_smile:,所以举个例子,如果我要去streaming CRI HITFM的电台地址 http://live-hls.ihzlh.linker.cc/ihzlh/hitfm_887.m3u8,估计有可能会卡在https的支持上,是吧。


(htb0755) #7

我返回以下的资料,Rokid都不会播放,是缺填什么资料吗?

"response": {
        "action": {
            "directives": [
                {
                    "action": "PLAY",
                    "disableEvent": false,
                    "item": [
                        {
                            "offsetInMilliseconds": 0,
                            "type": "AUDIO",
                            "url": "http://fs.open.kugou.com/d0a0ee00c6fe150ec73ec26523a5dd69/5ab8b56a/G005/M07/1B/1D/pYYBAFS4eCKADZlaAEdpN2NafyQ045.mp3"
                        }
                    ],
                    "type": "media"
                }
            ],
            "form": "cut",
            "shouldEndSession": false,
            "type": "NORMAL",
            "version": "2.0.0"
        },

(htb0755) #8

可以了,"item"弄成array,就不对了,改好了。


(大发) #9

自己解决啦 好棒