Compare commits

...

17 Commits

Author SHA1 Message Date
Cédric Verstraeten
6aad8b7b35 Merge pull request #164 from kerberos-io/fix/webrtc-packettimestamp
Fix / WebRTC skip AAC audio + introduce packet timestamps
2025-02-06 10:38:40 +01:00
Cedric Verstraeten
9ce037fdc0 Update main.go 2025-02-06 10:35:36 +01:00
Cedric Verstraeten
0eb77ccd16 Update main.go 2025-02-06 10:15:47 +01:00
Cedric Verstraeten
fb876bd216 Update main.go 2025-02-06 08:32:30 +01:00
Cédric Verstraeten
865aec88fc Merge pull request #163 from kerberos-io/fix/webrtc-sample-timing
Fix / WebRTC sample timing
2025-02-06 08:32:04 +01:00
Cedric Verstraeten
9792bdf494 Update main.go 2025-02-06 08:28:17 +01:00
Cedric Verstraeten
d836e89e7f upgrade to v3.3.3 2025-02-05 20:55:08 +01:00
Cédric Verstraeten
53a52b3594 Merge pull request #162 from kerberos-io/fix/webrtc-sample-duration
fix / revert to old webrtc sample format (duration instead of packettimestamp)
2025-02-05 20:54:18 +01:00
Cedric Verstraeten
ba6ce25b21 revert to old webrtc sample format (duration instead of packettimestamp) 2025-02-05 20:50:57 +01:00
Cedric Verstraeten
8c9e18475f Update README.md 2025-01-31 16:35:11 +01:00
Cédric Verstraeten
4548d5328b Merge pull request #158 from kerberos-io/fix/force-mqtt-tos-level-2
Enabled TOS 2 for MQTT to ensure higher quality
2025-01-26 20:27:32 +01:00
Cedric Verstraeten
da870fe890 undo file 2025-01-26 20:23:14 +01:00
Cedric Verstraeten
66b660e688 enabled TOS 2 2025-01-26 20:17:04 +01:00
Cédric Verstraeten
08f8ca78d6 Merge pull request #157 from kerberos-io/upgrade/3.3.1
Upgrade to 3.3.1
2025-01-24 13:43:53 +01:00
Cedric Verstraeten
1e61e99005 Update main.go 2025-01-23 16:56:00 +01:00
Cédric Verstraeten
c272e1ab5c Merge pull request #155 from kerberos-io/upgrade/onvif-stable
Stable release onvif v1.0.0
2025-01-19 11:03:30 +01:00
Cedric Verstraeten
5cff11c0af upgrade onvif v1.0.0 2025-01-19 10:50:37 +01:00
8 changed files with 22 additions and 20 deletions

View File

@@ -413,7 +413,7 @@ Read more about this [at the FAQ](#faq) below.
## Contributors
This project exists thanks to all the people who contribute.
This project exists thanks to all the people who contribute. Bravo!
<a href="https://github.com/kerberos-io/agent/graphs/contributors">
<img src="https://contrib.rocks/image?repo=kerberos-io/agent" />

View File

@@ -21,7 +21,7 @@ require (
github.com/gorilla/websocket v1.5.3
github.com/kellydunn/golang-geo v0.7.0
github.com/kerberos-io/joy4 v1.0.64
github.com/kerberos-io/onvif v0.0.17
github.com/kerberos-io/onvif v1.0.0
github.com/minio/minio-go/v6 v6.0.57
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/pion/rtp v1.8.10

View File

@@ -298,8 +298,8 @@ github.com/kellydunn/golang-geo v0.7.0 h1:A5j0/BvNgGwY6Yb6inXQxzYwlPHc6WVZR+Mrar
github.com/kellydunn/golang-geo v0.7.0/go.mod h1:YYlQPJ+DPEzrHx8kT3oPHC/NjyvCCXE+IuKGKdrjrcU=
github.com/kerberos-io/joy4 v1.0.64 h1:gTUSotHSOhp9mNqEecgq88tQHvpj7TjmrvPUsPm0idg=
github.com/kerberos-io/joy4 v1.0.64/go.mod h1:nZp4AjvKvTOXRrmDyAIOw+Da+JA5OcSo/JundGfOlFU=
github.com/kerberos-io/onvif v0.0.17 h1:BK91WK+cO4lPvhVTh0dPtALRxjGIlFdXiA3O9tvq2UQ=
github.com/kerberos-io/onvif v0.0.17/go.mod h1:P1kUcCfeotJSlL1jwGseH6NSnCwWiuJLl3gAzafnLbA=
github.com/kerberos-io/onvif v1.0.0 h1:pLJrK6skPkK+5Bj4XfqHUkQ2I+p5pwELnp+kQTJWXiQ=
github.com/kerberos-io/onvif v1.0.0/go.mod h1:P1kUcCfeotJSlL1jwGseH6NSnCwWiuJLl3gAzafnLbA=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.17.1 h1:NE3C767s2ak2bweCZo3+rdP4U/HoyVXLv/X9f2gPS5g=

View File

@@ -824,7 +824,6 @@ func HandleRealtimeProcessing(processingCursor *packets.QueueCursor, configurati
}
payload, err := models.PackageMQTTMessage(configuration, message)
if err == nil {
mqttClient.Publish(realtimeProcessingTopic, 0, false, payload)
} else {
log.Log.Info("cloud.RealtimeProcessing(): something went wrong while sending acknowledge config to hub: " + string(payload))

View File

@@ -150,7 +150,7 @@ func ProcessMotion(motionCursor *packets.QueueCursor, configuration *models.Conf
}
payload, err := models.PackageMQTTMessage(configuration, message)
if err == nil {
mqttClient.Publish("kerberos/hub/"+hubKey, 0, false, payload)
mqttClient.Publish("kerberos/hub/"+hubKey, 2, false, payload)
} else {
log.Log.Info("computervision.main.ProcessMotion(): failed to package MQTT message: " + err.Error())
}

View File

@@ -341,7 +341,7 @@ func HandleGetPTZPosition(mqttClient mqtt.Client, hubKey string, payload models.
}
payload, err := models.PackageMQTTMessage(configuration, message)
if err == nil {
mqttClient.Publish("kerberos/hub/"+hubKey, 0, false, payload)
mqttClient.Publish("kerberos/hub/"+hubKey, 2, false, payload)
} else {
log.Log.Info("routers.mqtt.main.HandlePTZPosition(): something went wrong while sending position to hub: " + string(payload))
}
@@ -412,7 +412,7 @@ func HandleRequestConfig(mqttClient mqtt.Client, hubKey string, payload models.P
}
payload, err := models.PackageMQTTMessage(configuration, message)
if err == nil {
mqttClient.Publish("kerberos/hub/"+hubKey, 0, false, payload)
mqttClient.Publish("kerberos/hub/"+hubKey, 2, false, payload)
} else {
log.Log.Info("routers.mqtt.main.HandleRequestConfig(): something went wrong while sending config to hub: " + string(payload))
}
@@ -451,7 +451,7 @@ func HandleUpdateConfig(mqttClient mqtt.Client, hubKey string, payload models.Pa
}
payload, err := models.PackageMQTTMessage(configuration, message)
if err == nil {
mqttClient.Publish("kerberos/hub/"+hubKey, 0, false, payload)
mqttClient.Publish("kerberos/hub/"+hubKey, 2, false, payload)
} else {
log.Log.Info("routers.mqtt.main.HandleUpdateConfig(): something went wrong while sending acknowledge config to hub: " + string(payload))
}

View File

@@ -23,7 +23,7 @@ import (
"github.com/kerberos-io/agent/machinery/src/models"
)
const VERSION = "3.2.6"
const VERSION = "3.3.5"
const letterBytes = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"

View File

@@ -341,8 +341,8 @@ func WriteToTrack(livestreamCursor *packets.QueueCursor, configuration *models.C
var cursorError error
var pkt packets.Packet
//var previousTimeVideo int64
//var previousTimeAudio int64
var previousTimeVideo int64
var previousTimeAudio int64
start := false
receivedKeyFrame := false
@@ -401,16 +401,17 @@ func WriteToTrack(livestreamCursor *packets.QueueCursor, configuration *models.C
if pkt.IsVideo {
// Calculate the difference
//bufferDuration := pkt.Time - previousTimeVideo
//previousTimeVideo = pkt.Time
bufferDuration := pkt.Time - previousTimeVideo
previousTimeVideo = pkt.Time
// Start at the first keyframe
if pkt.IsKeyFrame {
start = true
}
if start {
//bufferDurationCasted := time.Duration(bufferDuration) * time.Millisecond
sample := pionMedia.Sample{Data: pkt.Data, PacketTimestamp: uint32(pkt.Time)}
bufferDurationCasted := time.Duration(bufferDuration) * time.Millisecond
sample := pionMedia.Sample{Data: pkt.Data, Duration: bufferDurationCasted, PacketTimestamp: uint32(pkt.Time)}
//sample = pionMedia.Sample{Data: pkt.Data, Duration: time.Second}
if config.Capture.ForwardWebRTC == "true" {
// We will send the video to a remote peer
// TODO..
@@ -430,15 +431,17 @@ func WriteToTrack(livestreamCursor *packets.QueueCursor, configuration *models.C
// We will transcode the audio
// TODO..
//d := fdkaac.NewAacDecoder()
continue
}
// Calculate the difference
//bufferDuration := pkt.Time - previousTimeAudio
//previousTimeAudio = pkt.Time
bufferDuration := pkt.Time - previousTimeAudio
previousTimeAudio = pkt.Time
// We will send the audio
//bufferDurationCasted := time.Duration(bufferDuration) * time.Millisecond
sample := pionMedia.Sample{Data: pkt.Data, PacketTimestamp: uint32(pkt.Time)}
bufferDurationCasted := time.Duration(bufferDuration) * time.Millisecond
sample := pionMedia.Sample{Data: pkt.Data, Duration: bufferDurationCasted, PacketTimestamp: uint32(pkt.Time)}
//sample = pionMedia.Sample{Data: pkt.Data, Duration: time.Second}
if err := audioTrack.WriteSample(sample); err != nil && err != io.ErrClosedPipe {
log.Log.Error("webrtc.main.WriteToTrack(): something went wrong while writing sample: " + err.Error())
}