Alex X bd88695e59 Fix AnnexB parsing in some cases 2 月之前
..
README.md 8cd977f7ad Add support B-frames for MP4 consumer 1 年之前
checksum.go 76a00031cd Code refactoring 1 年之前
consumer.go 96504e2fb0 BIG rewrite stream info 4 月之前
demuxer.go bd88695e59 Fix AnnexB parsing in some cases 2 月之前
muxer.go 8cd977f7ad Add support B-frames for MP4 consumer 1 年之前
opus.go d0dfa1d3dd Add support OPUS inside MPEG-TS 10 月之前
producer.go 96504e2fb0 BIG rewrite stream info 4 月之前

README.md

PTS/DTS/CTS

if DTS == 0 {
    // for I and P frames
	packet.Timestamp = PTS (presentation time)
} else {
    // for B frames
    packet.Timestamp = DTS (decode time)
    CTS = PTS-DTS (composition time)
}
  • MPEG-TS container uses PTS and optional DTS.
  • MP4 container uses DTS and CTS
  • RTP container uses PTS

MPEG-TS

FFmpeg:

  • PMTID=4096
  • H264: PESID=256, StreamType=27, StreamID=224
  • H265: PESID=256, StreamType=36, StreamID=224
  • AAC: PESID=257, StreamType=15, StreamID=192

Tapo:

  • PMTID=18
  • H264: PESID=68, StreamType=27, StreamID=224
  • AAC: PESID=69, StreamType=144, StreamID=192

Useful links