http-live-stream 协议ID3 tag和 timestamp

一般的HLS 码流没有ID3 tag,都是0x47 开头的标准TS流, Nuplayer 会检查标准TS流,如果不是TS 流,才会走到检查ID3 tag。

一般 TS码流的同步头有问题才会走到ID3 tag检查。


http live stream 协议中,定义了audio packet 必现带有ID3 tag,并且必现带有私有的“com.apple.streaming.transportStreamTimestamp”标识符,紧跟着 真正的时间戳。

Nuplayer 中的PlaylistFetcher 中实现这块代码, ffmpeg 中的hls.c 也实现了同样的代码。


协议定义:https://tools.ietf.org/html/draft-pantos-http-live-streaming-23

3.4. Packed Audio

A Packed Audio Segment contains encoded audio samples and ID3 tags that are simply packed together with minimal framing and no per- sample timestamps. Supported Packed Audio formats are AAC with ADTS framing [ISO_13818_7]; MP3 [ISO_13818_3]; AC-3 [AC_3]; and Enhanced AC-3 [AC_3]. A Packed Audio Segment has no Media Initialization Section. Each Packed Audio Segment MUST signal the timestamp of its first sample with an ID3 PRIV tag [ID3] at the beginning of the segment. The ID3 PRIV owner identifier MUST be "com.apple.streaming.transportStreamTimestamp". The ID3 payload MUST be a 33-bit MPEG-2 Program Elementary Stream timestamp expressed as a big-endian eight-octet number, with the upper 31 bits set to zero. Clients SHOULD NOT play Packed Audio Segments without this ID3 tag.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值