Skip to content

Commit

Permalink
Add support RTMP from Dahua cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Oct 12, 2023
1 parent 8165adc commit 995ef5b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/flv/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ func (c *Producer) probe() error {
if !bytes.Contains(pkt.Payload, []byte("onMetaData")) {
waitType = append(waitType, TagData)
}
if bytes.Contains(pkt.Payload, []byte("videocodecid")) {
// Dahua cameras doesn't send videocodecid
if bytes.Contains(pkt.Payload, []byte("videocodecid")) ||
bytes.Contains(pkt.Payload, []byte("width")) ||
bytes.Contains(pkt.Payload, []byte("framerate")) {
waitType = append(waitType, TagVideo)
}
if bytes.Contains(pkt.Payload, []byte("audiocodecid")) {
Expand Down

0 comments on commit 995ef5b

Please sign in to comment.