IP Camera With Remote Streaming

IBNU12

Junior Member
Joined
May 4, 2017
Messages
14
Reaction score
0
Hi, I've been encountering an issue caused by my inability to port-forward a camera stream through a mobile internet connection. I need to stream a camera footage remotely to a different network and then run the footage through some python code in real-time. I can do this with my camera connected to the same network as my laptop using an RTTSP stream but I can't do this when my computer is on a different network than the camera.

Are there any IP cameras or peripherals that will let me stream the footage remotely in a way that is compatible with my python code running on a computer connected to a different network?
 

bert64

Senior Member
Joined
Jan 20, 2020
Messages
863
Reaction score
352
Hi, I've been encountering an issue caused by my inability to port-forward a camera stream through a mobile internet connection. I need to stream a camera footage remotely to a different network and then run the footage through some python code in real-time. I can do this with my camera connected to the same network as my laptop using an RTTSP stream but I can't do this when my computer is on a different network than the camera.

Are there any IP cameras or peripherals that will let me stream the footage remotely in a way that is compatible with my python code running on a computer connected to a different network?
You can't port forward because mobile IPv4 is behind CGNAT.
Mobile providers with IPv6 support give you proper routable addresses (eg M1 does), so it will work there if your camera supports it.
 

hwzlite

Senior Member
Joined
Jan 27, 2007
Messages
2,326
Reaction score
2,077
Last edited:

bert64

Senior Member
Joined
Jan 20, 2020
Messages
863
Reaction score
352
Yes this can work, although it is unlikely to be supported on a typical camera and is therefore likely to require an additional system - either a dedicated linux system to act as gateway or an advanced/highend router, as well as a reasonably high skillset in order to configure. This also creates additional dependencies on the third party tunnel service.
 

IBNU12

Junior Member
Joined
May 4, 2017
Messages
14
Reaction score
0
You can't port forward because mobile IPv4 is behind CGNAT.
Mobile providers with IPv6 support give you proper routable addresses (eg M1 does), so it will work there if your camera supports it.
I used an m1 pre-paid sim card. It showed me an IPV4 addrese.
 

bert64

Senior Member
Joined
Jan 20, 2020
Messages
863
Reaction score
352
I used an m1 pre-paid sim card. It showed me an IPV4 addrese.
You will get both IPv4 and IPv6, assuming your device supports IPv6 and the APN settings are correct.
What device are you using? What APN settings are you using?
 

TanKianW

Supremacy Member
Joined
Apr 21, 2005
Messages
5,884
Reaction score
2,183
Hi, I've been encountering an issue caused by my inability to port-forward a camera stream through a mobile internet connection. I need to stream a camera footage remotely to a different network and then run the footage through some python code in real-time. I can do this with my camera connected to the same network as my laptop using an RTTSP stream but I can't do this when my computer is on a different network than the camera.

Are there any IP cameras or peripherals that will let me stream the footage remotely in a way that is compatible with my python code running on a computer connected to a different network?

You are doing video analytics?

If you can code, why not learn how to get a VPS going? You may be more well verse than most here to get it going. You can do that easily using Linode (or others), just a few “linux command” away.
 

IBNU12

Junior Member
Joined
May 4, 2017
Messages
14
Reaction score
0
You will get both IPv4 and IPv6, assuming your device supports IPv6 and the APN settings are correct.
What device are you using? What APN settings are you using?
I was just using my phone and using the what is my IP address on google which showed me an IPV4 address.
 

bert64

Senior Member
Joined
Jan 20, 2020
Messages
863
Reaction score
352
I was just using my phone and using the what is my IP address on google which showed me an IPV4 address

Some of those "whats my ip" sites don't support IPv6, so any connection to them will go over the legacy IP CGNAT gateway.

As xiaofan said, try one of the ipv6 test sites and it will explicitly check for both addresses. Depending on the type of phone, you can also see the address assigned to the phone on the device itself.
For example, on my iphone 8 i use the "he.net network tools" app. Under "interface information" you can see the addresses assigned to the cellular data interface. On M1 i have a NAT'd IPv4 address (10.135.x.x) and a proper fully routable IPv6 address (2401:7400:xxx).
The IPv6 address bound directly to the phone is the same one i see on the ipv6-test sites, and it's possible for me to directly reach this address over the Internet.

If i tether my phone to my laptop, i get a routable IPv6 assigned to the laptop too. If i run a service on my laptop, it's directly reachable from the public internet if you have IPv6 connectivity.

What type of phone is it?
 

IBNU12

Junior Member
Joined
May 4, 2017
Messages
14
Reaction score
0
Some of those "whats my ip" sites don't support IPv6, so any connection to them will go over the legacy IP CGNAT gateway.

As xiaofan said, try one of the ipv6 test sites and it will explicitly check for both addresses. Depending on the type of phone, you can also see the address assigned to the phone on the device itself.
For example, on my iphone 8 i use the "he.net network tools" app. Under "interface information" you can see the addresses assigned to the cellular data interface. On M1 i have a NAT'd IPv4 address (10.135.x.x) and a proper fully routable IPv6 address (2401:7400:xxx).
The IPv6 address bound directly to the phone is the same one i see on the ipv6-test sites, and it's possible for me to directly reach this address over the Internet.

If i tether my phone to my laptop, i get a routable IPv6 assigned to the laptop too. If i run a service on my laptop, it's directly reachable from the public internet if you have IPv6 connectivity.

What type of phone is it?
It's a Xiaomi, when I check the IP addrse in phone settings it's only showing me an ipv4 address even when I change APN settings to set for ipv6. The ipv,6 sites also show me not having an ipv6 address
Edit: Nvm found out my error was not changing the APN settings to use the IPV6 protcall, I now have an ipv6 address on the sim card that's hopefully unique.
 
Last edited:

bert64

Senior Member
Joined
Jan 20, 2020
Messages
863
Reaction score
352
It's a Xiaomi, when I check the IP addrse in phone settings it's only showing me an ipv4 address even when I change APN settings to set for ipv6. The ipv,6 sites also show me not having an ipv6 address
Edit: Nvm found out my error was not changing the APN settings to use the IPV6 protcall, I now have an ipv6 address on the sim card that's hopefully unique.
Yes, the address is unique and fully routable from the Internet.
In fact, you have an entire /64 subnet you can use (ie for any tethered devices).
I wonder why your APN settings didn't have IPv6 enabled by default.

M1 also have NAT64/DNS64 so it should also be possible to set your APN to IPv6-only and it will use NAT64 to access legacy sites.

The only caveat is that the address is dynamic and can change sometimes, so if you're planning to use it to host something i'd suggest a dynamic dns setup.
 

IBNU12

Junior Member
Joined
May 4, 2017
Messages
14
Reaction score
0
Yes, the address is unique and fully routable from the Internet.
In fact, you have an entire /64 subnet you can use (ie for any tethered devices).
I wonder why your APN settings didn't have IPv6 enabled by default.

M1 also have NAT64/DNS64 so it should also be possible to set your APN to IPv6-only and it will use NAT64 to access legacy sites.

The only caveat is that the address is dynamic and can change sometimes, so if you're planning to use it to host something i'd suggest a dynamic dns setup.
Well the main problem I'm now facing is that VLC doesn't seem to support rttsp over IPV6.
 

bert64

Senior Member
Joined
Jan 20, 2020
Messages
863
Reaction score
352
Well the main problem I'm now facing is that VLC doesn't seem to support rttsp over IPV6.
Ahh that's interesting...

"There are still some features of the VLC media player which do not support IPv6. In particular, it is not possible to use RTSP over IPv6 because the underlying library, Live.com, does not support IPv6 at the time of writing."

Seems it's a problem of third party code they use. There might be something else that can. It also looks like they are working on it too as there are a bunch of recent IPv6 updates:
http://www.live555.com/liveMedia/public/changelog.txt
You might also be able to use a proxy running locally until VLC can be updated, or the camera may make the video available over a different protocol.

One thing to note is that you might need to enclose the address in brackets, eg rtsp://[2401:7400:123::1]:554/video.mp4

Or you can create a hostname (DNS or hostsfile etc) record pointing to the address.
 
Last edited:

IBNU12

Junior Member
Joined
May 4, 2017
Messages
14
Reaction score
0
Ahh that's interesting...

"There are still some features of the VLC media player which do not support IPv6. In particular, it is not possible to use RTSP over IPv6 because the underlying library, Live.com, does not support IPv6 at the time of writing."

Seems it's a problem of third party code they use. There might be something else that can. It also looks like they are working on it too as there are a bunch of recent IPv6 updates:
http://www.live555.com/liveMedia/public/changelog.txt
You might also be able to use a proxy running locally until VLC can be updated, or the camera may make the video available over a different protocol.

One thing to note is that you might need to enclose the address in brackets, eg rtsp://[2401:7400:123::1]:554/video.mp4

Or you can create a hostname (DNS or hostsfile etc) record pointing to the address.
I've been having a weird issue where even with IPV6 it seems like port-fowarding isn't working, i'm using an IPV^ port scanner and it's still showing my ports closed.
 

bert64

Senior Member
Joined
Jan 20, 2020
Messages
863
Reaction score
352
I've been having a weird issue where even with IPV6 it seems like port-fowarding isn't working, i'm using an IPV^ port scanner and it's still showing my ports closed.

IPv6 does not use port forwarding. You have directly routable addresses so no need to forward ports, instead you have simple allow/deny rules on the firewall/router.

What exactly is it you're trying to do? You would connect directly to the address assigned to the device itself, not to the address of the router (or phone if you're doing mobile tethering).

It works for me, the following is from my laptop tethered to my mobile phone (iphone 8) which is connected to M1 and using http://www.ipv6scanner.com/cgi-bin/main.py to scan.
The IP address is the laptop, the phone itself has a completely different address within 2401:7400:4007:47db::/64.
My laptop is a macbook, and i have turned the SSH service on and allowed it in the local firewall in order to test this.

v6scan.png
 

IBNU12

Junior Member
Joined
May 4, 2017
Messages
14
Reaction score
0
IPv6 does not use port forwarding. You have directly routable addresses so no need to forward ports, instead you have simple allow/deny rules on the firewall/router.

What exactly is it you're trying to do? You would connect directly to the address assigned to the device itself, not to the address of the router (or phone if you're doing mobile tethering).

It works for me, the following is from my laptop tethered to my mobile phone (iphone 8) which is connected to M1 and using http://www.ipv6scanner.com/cgi-bin/main.py to scan.
The IP address is the laptop, the phone itself has a completely different address within 2401:7400:4007:47db::/64.
My laptop is a macbook, and i have turned the SSH service on and allowed it in the local firewall in order to test this.

v6scan.png
Oh ok, I'm unsure how IPV6 works. I want to be able to remotely access my IP camera stream on a different network to be able to run it on my python code. For the actual application, my IP camera and its modem will be in an isolated location from the computer I'm going to be using to run the code on the video stream.

when on a different network. It seems like the devices on my local network still only have an ipv4 address with only my external WAN address being IPV6. If every device does have its own IPV6 address I can't seem to find the IPV6 Address of my camera.

Screenshot_2021-09-16_at_4.23.33_PM.png
 

bert64

Senior Member
Joined
Jan 20, 2020
Messages
863
Reaction score
352
Oh ok, I'm unsure how IPV6 works. I want to be able to remotely access my IP camera stream on a different network to be able to run it on my python code. For the actual application, my IP camera and its modem will be in an isolated location from the computer I'm going to be using to run the code on the video stream.

when on a different network. It seems like the devices on my local network still only have an ipv4 address with only my external WAN address being IPV6. If every device does have its own IPV6 address I can't seem to find the IPV6 Address of my camera.

Screenshot_2021-09-16_at_4.23.33_PM.png
What type of router? What type of camera?
Yes every device should have an IPv6 address, your camera may not support IPv6 depending on its model and firmware so you'd need to check this too.

Test it out first with a laptop connected to the same router, make sure it picks up an IPv6 address and that you can reach it externally etc (ie open up firewall rules if necessary like i did).

BTW, that screenshot is from your router or your camera?
 

IBNU12

Junior Member
Joined
May 4, 2017
Messages
14
Reaction score
0
What type of router? What type of camera?
Yes every device should have an IPv6 address, your camera may not support IPv6 depending on its model and firmware so you'd need to check this too.

Test it out first with a laptop connected to the same router, make sure it picks up an IPv6 address and that you can reach it externally etc (ie open up firewall rules if necessary like i did).

BTW, that screenshot is from your router or your camera?
That screenshot is from my IP Camera.
 

bert64

Senior Member
Joined
Jan 20, 2020
Messages
863
Reaction score
352
That screenshot is from my IP Camera.
Ahh that's good, so the camera itself definitely has IPv6 support...
Aside from DHCP, what other options does it have? Perhaps your router doesn't provide a DHCPv6 service, as most IPv6 devices uses SLAAC/Autoconf.

Also looks like it has DDNS, and perhaps multicast name services - perhaps those ways would tell you the IPv6 address. See if you can ping "cameraname.local" from one of your other machines on the same network.

Did you verify that your other devices on the same network are able to get IPv6 addresses?
 
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ. Forum members and moderators are responsible for their own posts.

Please refer to our Community Guidelines and Standards, Terms of Service and Member T&Cs for more information.
Top