The video address I got from this library is “rtsp://192.168.123.211 :554/user=admin password=tlJwpbo6 channel=1 stream=0.sdp?real Stream”, using VLC playback, as long as the sound has no image, the image is black, but the address obtained by another dart library is “rtsp://192.168.123.211 :554/user=admin password=tlJwpbo6 channel=1 stream=1.sdp?real stream” has sound and video. I don't know the difference between them. Is there an example of getting video address.
my test Code:
s := onvif.GetAvailableDevicesAtSpecificEthernetInterface("en7")
log.Printf("%s", s)
for _, d := range s {
d.Authenticate("admin", "")
log.Println(d.GetServices())
log.Println(d.GetEndpoint("media"))
resp, err := d.CallMethod(media.GetProfilesResponse{})
if err != nil {
log.Fatal(err)
}
bytes, _ := ioutil.ReadAll(resp.Body)
log.Println(string(bytes))
resp, err = d.CallMethod(media.GetStreamUri{
StreamSetup:onvif2.StreamSetup{
Stream: "RTP-Unicast",
Transport: onvif2.Transport{Protocol:"HTTP",Tunnel:nil},
},
ProfileToken: "000",
})
if err != nil {
log.Fatal(err)
}
bytes, _ = ioutil.ReadAll(resp.Body)
log.Println(string(bytes))
}
The video address I got from this library is “rtsp://192.168.123.211 :554/user=admin password=tlJwpbo6 channel=1 stream=0.sdp?real Stream”, using VLC playback, as long as the sound has no image, the image is black, but the address obtained by another dart library is “rtsp://192.168.123.211 :554/user=admin password=tlJwpbo6 channel=1 stream=1.sdp?real stream” has sound and video. I don't know the difference between them. Is there an example of getting video address. my test Code:
output Uri: rtsp://192.168.123.211:554/user=admin_password=tlJwpbo6_channel=1_stream=0.sdp?real_stream :
dart Code get Uri: rtsp://192.168.123.211:554/user=admin_password=tlJwpbo6_channel=1_stream=1.sdp?real_stream
I don't known the difference between 1.sdp and 0.sdp,Is there an example of getting video address?