Fix pix_fmt for publishing to RTMP servers

This commit is contained in:
Alex X
2024-05-25 16:47:57 +03:00
parent 0bd2fcde54
commit 268629f551
4 changed files with 151 additions and 9 deletions
+2
View File
@@ -54,6 +54,8 @@ func (m *Muxer) GetInit() []byte {
sps, pps := h264.GetParameterSet(codec.FmtpLine)
if len(sps) == 0 {
sps = []byte{0x67, 0x42, 0x00, 0x0a, 0xf8, 0x41, 0xa2}
} else {
h264.FixPixFmt(sps)
}
if len(pps) == 0 {
pps = []byte{0x68, 0xce, 0x38, 0x80}