https://github.com/deepch/sample_rtsp
https://github.com/deepch/sample_rtsp
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/deepch/sample_rtsp
- Owner: deepch
- Created: 2016-06-10T14:04:57.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-08-27T19:17:08.000Z (almost 8 years ago)
- Last Synced: 2024-06-19T09:39:36.659Z (about 2 years ago)
- Language: Go
- Size: 30.3 KB
- Stars: 6
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rtsp client
```go
package main
import (
"fmt"
"github.com/deepch/rtsp"
)
func main() {
count := 0
Client := rtsp.RtspClientNew()
Client.Debug = false
if err := Client.Open("rtsp://admin:123456@171.25.235.18/mpeg4"); err != nil {
fmt.Println("[RTSP] Error", err)
} else {
for {
select {
case <-Client.Signals:
fmt.Println("Exit signals by rtsp")
return
case data := <-Client.Outgoing:
count += len(data)
fmt.Println("recive rtp packet size", len(data), "recive all packet size", count)
}
}
}
Client.Close()
}
```