RTSP lag issues with Raspberry Pi

gsxr1181

n3wb
Joined
Sep 18, 2015
Messages
11
Reaction score
0
I’ve seem too ran into an issue with using Blue Iris to capture a RTSP stream from a Raspberry Pi. I’m not sure if anyone has tried what I’m trying to accomplish, but here is my problem.

I’m using an image from here. https://github.com/iizukanao/picam-streamer It’s basically a Raspbian Jessie distribution ready to stream and record out of the box. I’m having to use a AT&T mobile connection to stream the audio and video from the Pi to my Blue Iris server. The stream from the Pi is tunneled through OpenVPN to my server, which decrypts the stream, and allows Blue Iris to connect as if it were looking at a local IP address. (Typlical VPN basiclly.) My upload speed from my AT&T mobile connection is averaging just above 4Mbps, and I have the stream set at 800x600 at 15fps from the Pi before it even hits the server. My down speed to my server is 40-50Mbps, so there shouldn’t be any issue with being able to receive this feed.

With this, the stream seems to be coming through fine. The Pi image has a webserver on the Pi running that will allow you to access a webpage through its local IP address. This webpage uses shockwave flash that streams the video and audio through a web browser, and comes through crystal clear, and without interruption. Latency on the webpage is around 5-8 seconds, which is not a big deal to me. Also I just installed iSpy, and it seems to be streaming almost real time, with only a 1 second lag time. Actually I’m quite impressed by the performance, but unfortunately iSpy’s subscription package doesn’t fit my needs, which is why I prefer BI.

But when I configure BI to accept the RTSP stream, it shows the video and audio at an exceptionally slow speed, almost at a slow motion pace. From what I calculated, it takes almost 3 seconds for just 1 second worth of video to show. This makes it impossible to watch, or have any usability what so ever. If I keep this going, I can literally watch video that happened 7 or 10 minutes in the past. If I shut down my Pi, the video will keep playing for the time it’s behind till it catches up, then will finally disconnect. This has me to believe that BI is having issues with processing the stream, because it seems to accept the video and audio in the buffer, but is taking a long time to process it.

I’ve used VLC to test the stream coming from the server, and while there are some latency issues, it supplies a stream that is watchable, and has audio. After about 5 minutes of video and audio, it seems to fall behind by maybe a minute. But at least the stream is usable. iSpy has shown to be the best performer so far.

So I’m wondering if there is anyone here that can point me in the right direction on troubleshooting this issue. I feel the Raspbeerry Pi is working as it should, as the flash stream comes though without any issue, and VLC on the server seems to receive the stream fine. iSpy is streaming almost in real time. But BI seems like it’s having issues. Below are the current settings I’m using. Although I’ve tried several combinations already nothing has seemed to improve the performance. Any help would be appreciated.
 

Attachments

Last edited by a moderator:
Top