Hi all,
We have a situation where an RTSP stream viewed with VLC on the VLAN is quick to start (1 second), but when it goes through pfsense and a different VLAN, it's very slow (12 seconds). This is reproducible and has been tested with multiple machines on both Windows 10 and MacOS.
The specific setup is as follows:
We set substream 1 to a low resolution for testing:
H.264H, 704x576(D1), 20FPS, VBR, Quality 6
We start VLC with:
vlc -vvv "rtsp:/admin:xxxxxxxxxxx@192.168.200.123/cam/realmonitor?channel=1&subtype=1"
If the machine running VLC is on VLAN200, it consistently starts in almost exactly 1 second.
If the machine is switched to VLAN1, it consistently takes 12 seconds.
To prove there's nothing else in the mix (e.g. VLC settings or OS firewall stuff), we have performed the following test. Take a Mac notebook with DHCP enabled and wifi disabled. Plug its Ethernet into a switch set to untagged VLAN1.
I am new to pfsense, but I can't imagine it's this slow... We must be doing something wrong. The specific hardware (SG-3100) comes highly recommended and we didn't take any chances with setting up our own box (however tempting that was!)
I've heard mixed reviews about whether camera streaming should all be UDP but didn't get that working after a medium amount of effort. I'm interested in best practices there and have lots of questions, but separately, I'd like to get to the bottom of why this is painfully slow because there are lots of other IoT things we were hoping to use the pfsense+VLANs to secure.
This is our first test and it was really exciting seeing everything come together until this. Does anyone have advice?
Note also that both the Mac notebook and new Windows 10 machines behave the same: ~1 second on VLAN1, ~12 seconds on VLAN200 with pfsense doing L3 routing. So... different OS and hardware, but same results based only on switching from VLAN200 to VLAN1+pfsense.
Finally, and perhaps very significant--or maybe not:
We have a middle-aged iPhone 8 on wifi(obviously?) on the 192.168.34 (i.e. VLAN1) which is, as per above, the super slow access situation. On it, we have a "Live Cams Pro" app configured with the exact same RTSP URL. It loads in maybe 2 seconds and it is also controlled by pfsense... same network as the Mac notebook and the Win10 PCs. So... the best we can come up with is that the problem is somehow tied to the interaction between VLC and the pfsense and neither one individually, since VLC can be very fast with everything the same but bypassing pfsense and being in the same VLAN... but pfsense routing the stream can be pretty fast going to the iPhone.
We'd very much appreciate any ideas!
We have a situation where an RTSP stream viewed with VLC on the VLAN is quick to start (1 second), but when it goes through pfsense and a different VLAN, it's very slow (12 seconds). This is reproducible and has been tested with multiple machines on both Windows 10 and MacOS.
The specific setup is as follows:
- Camera: Dahua DH-IPC-HFW4613H-ZSA (as one example, but also an Amcrest 4k which is Dahua hardware)
- Client hardware: Dell with Intel i9 or MacBook (same results)
- Switches: all Gigabit D-Link Web Smart Switch (a couple of models betweeen the PoE feeding the cameras and the computer, but all D-Link Web Smart)
- Firewall: pfsense on a Netgate SG-3100
- Client software: Win10 or MacOS; VLC 3.0.8 Vetinari
We set substream 1 to a low resolution for testing:
H.264H, 704x576(D1), 20FPS, VBR, Quality 6
We start VLC with:
vlc -vvv "rtsp:/admin:xxxxxxxxxxx@192.168.200.123/cam/realmonitor?channel=1&subtype=1"
If the machine running VLC is on VLAN200, it consistently starts in almost exactly 1 second.
If the machine is switched to VLAN1, it consistently takes 12 seconds.
To prove there's nothing else in the mix (e.g. VLC settings or OS firewall stuff), we have performed the following test. Take a Mac notebook with DHCP enabled and wifi disabled. Plug its Ethernet into a switch set to untagged VLAN1.
- Refesh address via DHCP
- get an address on 192.168.34 (which is for legacy reasons, currently VLAN1)
- Issue the command: vlc -vvv "rtsp:/admin:xxxxxxxxxxx@192.168.200.123/cam/realmonitor?channel=1&subtype=1"
- Wait 12 seconds, and it appears.
- Switch the port to untagged VLAN200 (removed from 1, add to 200, actually)
- Issue the exact same command again: (vlc -vvv "rtsp:/admin:xxxxxxxxxxx@192.168.200.123/cam/realmonitor?channel=1&subtype=1")
- Wait 1 second
- it appears
I am new to pfsense, but I can't imagine it's this slow... We must be doing something wrong. The specific hardware (SG-3100) comes highly recommended and we didn't take any chances with setting up our own box (however tempting that was!)
I've heard mixed reviews about whether camera streaming should all be UDP but didn't get that working after a medium amount of effort. I'm interested in best practices there and have lots of questions, but separately, I'd like to get to the bottom of why this is painfully slow because there are lots of other IoT things we were hoping to use the pfsense+VLANs to secure.
This is our first test and it was really exciting seeing everything come together until this. Does anyone have advice?
Note also that both the Mac notebook and new Windows 10 machines behave the same: ~1 second on VLAN1, ~12 seconds on VLAN200 with pfsense doing L3 routing. So... different OS and hardware, but same results based only on switching from VLAN200 to VLAN1+pfsense.
Finally, and perhaps very significant--or maybe not:
We have a middle-aged iPhone 8 on wifi(obviously?) on the 192.168.34 (i.e. VLAN1) which is, as per above, the super slow access situation. On it, we have a "Live Cams Pro" app configured with the exact same RTSP URL. It loads in maybe 2 seconds and it is also controlled by pfsense... same network as the Mac notebook and the Win10 PCs. So... the best we can come up with is that the problem is somehow tied to the interaction between VLC and the pfsense and neither one individually, since VLC can be very fast with everything the same but bypassing pfsense and being in the same VLAN... but pfsense routing the stream can be pretty fast going to the iPhone.
We'd very much appreciate any ideas!