Streaming and getting a snapshot remotely from ANNKE N48PBB NVR
Post ReplyStreaming and getting a snapshot remotely from ANNKE N48PBB NVRPosted: Friday, April 30, 2021 [19:32:22] - 1
Streaming video from ANNKE NVR on your phone or PC. Accessing a live image remotely is fairly easy using RTSP protocol. If ports are forwarded on a router the same can be done remotely from the Internet. NLExplanations: rtsp: protocol USER: user name to access video stream (it is recommended to create a user with only access to the video and nothing else) PASSWORD: password for the user above NVR_IP_ADDRESS: NVR LAN IP address 554: streaming port, default is 554 Streaming/Channels: just leave it as-is 101: 1 - camera number from 1 to 8. 01 - Main Stream, 02 - Sub-Stream ?transportmode=unicast.sdp: Transport mode VLC will play the stream. To make access simpler/easier html file can be created locally with local and remote links for the stream. Links will automatically open in VLC. i.e: <html xmlns="www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>Streaming links</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="content-type"content="application/xhtml+xml;charset=UTF-8" /> </head> <body> <p><b>Local links:</b></p> <p><a href="rtsp://USER:PASSWORD@LAN_IP_ADDRESS:554/Streaming/Channels/101/?transportmode=unicast.sdp">Cam 1</a><br /> <a href="rtsp://USER:PASSWORD@LAN_IP_ADDRESS:554/Streaming/Channels/201/?transportmode=unicast.sdp">Cam 2</a><br /> <a href="rtsp://USER:PASSWORD@LAN_IP_ADDRESS:554/Streaming/Channels/301/?transportmode=unicast.sdp">Cam 3</a><br /> <a href="rtsp://USER:PASSWORD@LAN_IP_ADDRESS:554/Streaming/Channels/401/?transportmode=unicast.sdp">Cam 4</a><br /> <a href="rtsp://USER:PASSWORD@LAN_IP_ADDRESS:554/Streaming/Channels/501/?transportmode=unicast.sdp">Cam 5</a><br /> <a href="rtsp://USER:PASSWORD@LAN_IP_ADDRESS:554/Streaming/Channels/601/?transportmode=unicast.sdp">Cam 6</a><br /> <a href="rtsp://USER:PASSWORD@LAN_IP_ADDRESS:554/Streaming/Channels/601/?transportmode=unicast.sdp">Cam 7</a><br /> <a href="rtsp://USER:PASSWORD@LAN_IP_ADDRESS:554/Streaming/Channels/601/?transportmode=unicast.sdp">Cam 8</a></p> <p><b>Remote links:</b></p> <p><a href="rtsp://USER:PASSWORD@HOME_IP_ADDRESS:554/Streaming/Channels/101/?transportmode=unicast.sdp">Cam 1</a><br /> <a href="rtsp://USER:PASSWORD@HOME_IP_ADDRESS:554/Streaming/Channels/201/?transportmode=unicast.sdp">Cam 2</a><br /> <a href="rtsp://USER:PASSWORD@HOME_IP_ADDRESS:554/Streaming/Channels/301/?transportmode=unicast.sdp">Cam 3</a><br /> <a href="rtsp://USER:PASSWORD@HOME_IP_ADDRESS:554/Streaming/Channels/401/?transportmode=unicast.sdp">Cam 4</a><br /> <a href="rtsp://USER:PASSWORD@HOME_IP_ADDRESS:554/Streaming/Channels/501/?transportmode=unicast.sdp">Cam 5</a><br /> <a href="rtsp://USER:PASSWORD@HOME_IP_ADDRESS:554/Streaming/Channels/601/?transportmode=unicast.sdp">Cam 6</a><br /> <a href="rtsp://USER:PASSWORD@HOME_IP_ADDRESS:554/Streaming/Channels/601/?transportmode=unicast.sdp">Cam 7</a><br /> <a href="rtsp://USER:PASSWORD@HOME_IP_ADDRESS:554/Streaming/Channels/601/?transportmode=unicast.sdp">Cam 8</a></p> </body> </html> We will not dig into Port Forwarding procedure on a router. |
Getting a snapshot remotely from ANNKE N48PBB NVRPosted: Friday, April 30, 2021 [19:48:49] - 2
Getting a snapshot is a little more complicated than streaming video. One of the ways to do it is using a ffmpeg: Sometimes streaming gets errors and if process is automated some check-ups would help getting a snapshot. Here is a Perl sub to save a snapshot from RTSP stream: my $filename=shift; while(1) {$limit++; my $result = `ffmpeg -y -rtsp_transport tcp -i rtsp://USER:PASSWORD\@IP_ADDRESS:554/Streaming/Channels/401/?transportmode=unicast.sdp -frames:v 1 $filename 2>&1`; unless($result =~ /Error parsing/) {last;} else {unlink $filename;} if($limit > 10) {last;} } ## WHILE END } ## END GET FILE Snapshots are great for creating an annual video from daily pictures. Further processing required.. |