RTSP Stream Inaccurate FPS Clock

According to this post (More Speed | OpenMV):

With firmware v3.6.4 I was able to stream 1920x1080 video at 10 FPS to VLC on my computer. Once we get double buffering support working we should be able to increase that to 20 FPS (and maybe higher by setting the readout window).

I’m using the OpenMV H7 Plus with the same firmware and same settings. When I run the rtsp_video_server.py example code, the serial terminal indicates that the FPS is about ~10 FPS. However, When I view the stream in VLC, the FPS is extremely slow, much slower than 10FPS. When I save the video and process it, the FPS is about ~2 FPS. There’s also a ~2 second lag in the stream. How do I enable a 1920x1080 VLC stream at 10 FPS?

By the way, streaming a 1920x1080 (FHD) video using helloworld.py over USB (with frame buffer disabled) is 10 FPS. Is it even possible for a wifi stream at the same resolution to be at 10 FPS? The MJPEG_streamer examples can barely reach 10 FPS for greyscale videos at much lower resolution.

It seems like latency of 2-4s is an common issue for RTSP streams (Question / Help - RTSP stream from IP camera delay in input in preview | OBS Forums).

It depends on your WiFi connection. I get 10 FPS.

You should use wireshark to see how many megabits a second are moving on your network to your PC. I did the debug work to verify the connection pushes packets okay. If there’s a large number of TCP re-transmits then this will kill the streaming speed.

The serial terminal says the FPS is 10, but my rtsp stream is still running at 2-3 FPS. I tested my internet connection using Google’s speed test:

7.30 Mbps download
2.53 Mbps upload
Latency: 14 ms

Your Internet speed is fine. Your Internet connection should be able to handle streaming an HD video. If multiple devices are streaming video at the same time, you may run into some congestion.

My colleague also tried the rtsp code and ran into similar issues.

It doesn’t have anything to do with your internet speed. This is the rate at which the WINC can send packets over WiFi. I’ll check it again at my place to see how fast it’s running. Maybe there was a performance regression in our code updates.