python code snippet to get url for use with vlc and show the camera on LAN
#connection code , previously done in this blog
media = camera.create_media_service()
profiles = media.GetProfiles()
for p in profiles:
print("Profile:", p.Name)
print("Token:", p.token)
uri = media.GetStreamUri({
'StreamSetup': {
'Stream': 'RTP-Unicast',
'Transport': {
'Protocol': 'RTSP'
}
},
'ProfileToken': p.token
})
print("RTSP:", uri.Uri)
print()
#
vlc 'rtsp://admin:your_key@192.168.1.8:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1'
