mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-10-30 03:12:57 +08:00
Fix FmtpLine for RTMP
This commit is contained in:
@@ -47,10 +47,14 @@ func (c *Client) Dial() (err error) {
|
|||||||
for _, stream := range streams {
|
for _, stream := range streams {
|
||||||
switch stream.Type() {
|
switch stream.Type() {
|
||||||
case av.H264:
|
case av.H264:
|
||||||
cd := stream.(h264parser.CodecData)
|
info := stream.(h264parser.CodecData).RecordInfo
|
||||||
fmtp := "sprop-parameter-sets=" +
|
|
||||||
base64.StdEncoding.EncodeToString(cd.RecordInfo.SPS[0]) + "," +
|
fmtp := fmt.Sprintf(
|
||||||
base64.StdEncoding.EncodeToString(cd.RecordInfo.PPS[0])
|
"profile-level-id=%02X%02X%02X;sprop-parameter-sets=%s,%s",
|
||||||
|
info.AVCProfileIndication, info.ProfileCompatibility, info.AVCLevelIndication,
|
||||||
|
base64.StdEncoding.EncodeToString(info.SPS[0]),
|
||||||
|
base64.StdEncoding.EncodeToString(info.PPS[0]),
|
||||||
|
)
|
||||||
|
|
||||||
codec := &streamer.Codec{
|
codec := &streamer.Codec{
|
||||||
Name: streamer.CodecH264,
|
Name: streamer.CodecH264,
|
||||||
|
|||||||
Reference in New Issue
Block a user