RTSP issues using external public ip address

Hello Folks,

I need your help.

I am using my blynk app on iOS 10 iphone.

I am trying to stream live video from an amcrest IP2M-841B camera @ rtsp port 554 that is connected to my home wifi using a fixed ip address on the blynk video widget.

When I am within my home wifi, I am using the following URL and blynk video widget shows live video just fine.
rtsp://admin:pw@localLANwifiipaddress:37777/cam/realmonitor?channel=1&subtype=0

I am having issues streaming video outside my home network. To enable live feed outside my home wifi network I have,
a) Turned on port forwarding on my airport extreme router for tcp and udp settings for these ports (37777,37779,554)
b) I am successful to access the above ports when I use canyouseeme.org site
c) Configured the rstp url to the below link. I see the widget says buffering and a black screen appears but I see no live video.
rtsp://admin:pw@publicipaddress:37779/cam/realmonitor?channel=1&subtype=0

d) I access the above/ external ip url in VLC Media player and it shows me live video.

I have called amcrest and my cable provider but no luck as they have suggested my settings are correct. Thats why I am now looking to my blynk community for help.

Any suggestions?

You are simply running into bandwidth issues… Blynk is not a dedicated video viewing app, but an IoT App that supports a degree of video streaming capability, but also has its own full data steam constantly running.

Lower the bitrate of the source, or pick a lower rated subtype in your public URL, and turn off audio feed (if any) from the camera… it will probably never be as good as running in your private network, but at least better than black.

Thanks Gunner.

I have now turned off the audio, lowered the video resolution to 640x480 pixels, bit rate to 48 kpbs, and refresh to 1 frames per second. I am still having no luck.

Have you confirmed that the WAN URL is active and shows a valid video stream with some other form of external viewer like VLC or another video App?

VLC shows live video when using the public facing ip:37779 port in the rtsp URL

When you are testing this WAN URL, is your phone/tablet connected to your LAN or not? Many routers seem to prevent directly accessing their own public IP from within their own network.

Try disconnecting the phone WiFi and running on your celular network to test.

iPhone is not on the LAN wifi during WAN URL testing.

I also have the same problem. RTSP in various specialized applications opens immediately, but with Blynk app does not work for some reason.

Can someone at Blynk suggest how the data flows from the camera on a WAN public IP address to my blynk app? It might help shed some light on any latency related issues.

@parag_pathak How the data flows from your camera/network is outside of Blynk’s realm of control… The Widget simply reads the stream coming to the phone.

There are probably codec related issues that Blynk can control… however if it works on your LAN, but not on the WAN, then your issue is most likely network latency related.

Have you tested with any other cloud based video streams?

Hello Gunner- If I us the Amcrest app and use the WAN URL, I have no issues with the video feed using my Verizon LTE connection on my iPhone. This suggests there is no issues with the internet connection between my camera and iPhone or nothing is blocking the traffic.

My guess is, when using the WAN URL in the blynk app, the video data is reaching Blynk servers and then routed to my iPhone. This suggests, some firewall setting on the Blynk Cloud servers maybe blocking traffic coming in from an unknown non encrypted source.

Can someone with the Blynk Cloud Security resource step in here and confirm my hypothesis?

No… as I already said, the Video Widget simply tries to view the stream URL directly from the phone’s network connection… nothing to do with Blynk servers or Library.

As per the docs… Introduction - Blynk Documentation

At the moment Blynk doesn’t provide streaming servers. So you can either stream directly from camera, use 3-d party services or host streaming server on own server (on raspberry for example).

Enabling ‘Force TCP Transport’ setting in the video widget has resolved the issue when using WAN/ public URL.

Thank you.

Ah, good. I use Android, so I forgot about that option on the iOS side.

Thanks for help Gunner. Before we close this thread, can the Video Streaming widget documentation be updated to explain what this new option does for iOS users?

2 Likes

Here are steps on how to expose the Amcrest Camera to the internet using port forwarding.

The trick is port forwarding the rtsp port.

Router Settings,

  1. Reserve an DHCP IP address for your IP Camera.

Router%20DHCP%20IP%20reservation

  1. Setup Port Forwarding in your router. You need to enable port forwarding of RTSP traffic on port 554 on your Router to TCP and HTTP Ports (37777, 37779). TheTCP and HTTP port numbers can be anything as long as you consistently set them in your router and in your Amcrest setting.
    I am adding a screen shot of an Apple extreme setting. The private IP address is the reserved DHCP IP address for the Amcrest camera.
    Router%20RTSP%20Port%20Forwarding

Amcrest Setttings,

  1. Login to Amcrest. Setup a static IP address that matches the IP address you reserved in your router. The Subnet mask, etc should match the router (most cases, leave it default)

  2. Setup Port forwarding. The TCP and HTTP ports here have to match the TCP and HTTP ports in your router Port Forwarding settings.

  3. Setup DDNS. Give any domain name you like. The name make take few minutes to get synced with the Amcrest Cloud servers

Your Amcrest settings are done.

Blynk App Video Widget settings,

  1. Video widget URL link
    Make sure your URL has the correct ddns name, HTTP port number that matches the Amcrest and also in the router port forwarding settings. This is the port the RTSP 554 traffic is forwarded and exposed to the internet. Example:
    rtsp://amcrestuserid:amcrestpassword@yourddnsname.amcrestddns.com:37779/cam/realmonitor?channel=1&subtype=1
  2. Set Force TCP Transport to ON

This should do it. Good luck.

You link is not accessible to the rest of the forum.