-
I use gortsplib to encode h265. I see that vps sps pps are in a rtp packet. Can I not use the aggregation mode to pack them ,or set the options? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, aggregation depends entirely on how you use the library. If you send VPS, SPS and PPS to the RTP encoder in the same access unit, they're aggregated into a single RTP packet: rtpenc := myh265Format.CreateEncoder()
pkts, err := rtpenc.Encode([][]byte{
vps,
sps,
pps,
}) Otherwise, if you send them separately, they're not aggregated but they're put in different packets: rtpenc := myh265Format.CreateEncoder()
pkts, err := rtpenc.Encode([][]byte{
vps,
})
pkts, err := rtpenc.Encode([][]byte{
sps,
})
pkts, err := rtpenc.Encode([][]byte{
pps,
}) If you don't have VPS, SPS and PPS separately but they're encoded in the same unit with AVCC or Annex-B, decode the unit into single NALUs before passing it to the RTP encoder. |
Beta Was this translation helpful? Give feedback.
Hello, aggregation depends entirely on how you use the library.
If you send VPS, SPS and PPS to the RTP encoder in the same access unit, they're aggregated into a single RTP packet:
Otherwise, if you send them separately, they're not aggregated but they're put in different packets:
If you don't have VPS, SPS and PPS separately but they're encoded in the same unit with AVCC or Annex-B, decode the unit i…