RTSP stream instability
Issue Description
After installing the firmware, I've noticed that the RTSP video stream is very unstable. The issues include screen artifacts, frame drops, and mosaic/pixelation in the video when recording the RTSP stream. I have tried adjusting various ffmpeg parameters, including switching to TCP, and change to alternative server, but the video still has issues no matter what.
Environment Information
- Camera model: y203c
- Firmware version: 0.5.5
- All features except Cloud, RTSP, and HTTPD are turned off
Do you want to try a beta version?
Do you want to try a beta version?
Thanks for your quick response! I’m happy to try the beta version and provide any additional info or logs if that helps resolve the issue. : )
Here it is: y203c_0.5.5.tgz
Here it is: y203c_0.5.5.tgz
Thanks, I’ve just installed the beta firmware using FTP and the Manual upgrade option in the web GUI. Although the beta firmware has the same version number as the latest stable release, I noticed some differences in the configuration page, which confirmed that the upgrade was successful. I’ll test it over the next few days to see if the RTSP stream stability improves and will report back with my feedback. 👍
After installation and testing, I found its performance is the same as the previous release version. Most of the time, the RTSP stream works fine, but I still see frame drops and glitches fairly often. In more severe cases, the video recording can even stop unexpectedly. This has been the consistent behavior for me across both the stable and beta firmware versions. 😢
I’ve tried accessing the RTSP stream separately with both VLC and PotPlayer, and in both cases, I still observed playback stuttering and frequent buffering. At this point, I’m even starting to wonder if there might be a hardware issue with the camera itself. 😭
I have the same model. Please, explain me the test you are running. I will try with my cam.
I have the same model. Please, explain me the test you are running. I will try with my cam.
Here are my setup and testing:
-
The camera is connected to my home 2.4G Wi-Fi network (web interface shows signal strength around 80–90%). The router I am currently using is ASUS RT-AC68U
-
On the camera, I have enabled RTSP, SSH, FTP (these two are for uploading beta firmware), HTTPD, MDNSD, and Cloud features.
-
There is a 16GB microSD card inserted in the camera for recording.
-
In my LAN, I have a wired Windows 10 PC connected to the router, running iSpy Agent DVR. This software continuously records the RTSP stream from the camera, using ffmpeg.
-
Motion detection is disabled on the camera, so it is set to continuous recording mode.
-
Under these conditions, local recording to the SD card in the camera works fine, and the app also works without any problems.
-
However, when viewing the RTSP stream on the LAN (either live or through Agent DVR’s recordings), I encounter playback issues such as stuttering, buffering, and in some cases, the recording stops unexpectedly.
-
Additionally, my RTSP server program is set to “standard”, and only one RTSP stream is enabled (set to “high”). For RTSP audio, I’m currently using “alaw” (I previously tried “pcm” as well, but switched to “alaw” for troubleshooting, and the issue still persists).
Thanks a lot for looking into this and for your help!
This issue doesn’t happen 100% of the time, nor is it present at every moment—it occurs sporadically, and I’m not sure about the exact timing or frequency. I usually notice it when reviewing recorded footage and watching live video on Agent DVR, and I’ve also seen occasional buffering when directly viewing the RTSP stream for a long time with VLC. The frame drops and glitches in the live video always happen at the same time as buffering and stuttering when viewing the RTSP stream directly with VLC/PotPlayer, so I think this rules out Agent DVR as the cause of the issue.
It's not a simple problem to debug... The first setting you should try is to enable "tcp transport" in the client to avoid network issues, but I think you already have it. Another cause could be the low cpu performance of the cam. Probably the cam is not able to serve two rtsp connection at the same time.
Try to capture a log of the RTSP server.
1 - Check the process command line with the command ps | grep RTSP
2 - Kill all watchdogs:
killall wd_rtsp.sh
killall wd.sh
3 - Kill RTSP server: killall rRTSPServer
4 - Run rRTSPServer adding the debug options:
-d 15 > /tmp/sd/rtsp_debug.txt 2>&1
5 - Run the RTSP client
6 - Wait for the problem
7 - Stop the RTSP client
8 - Break the process
9 - Send me the file
Thank you for your detailed instructions. I have followed your steps and captured the RTSP server log as requested. Although the logging period was relatively short, I did observe the issues. Please find the attached log file for your reference. 😊
By the way, I’m not sure if this will help, but I also checked the recorded video files from Agent DVR, which clearly show the issues occurring during the logging period. When I analyzed these files with ffmpeg, I noticed that quite a few errors were reported.
I noticed that when I use TCP for recording, some segments of the recording can be lost, and the recording will become intermittent. To avoid this problem, I recorded this video using UDP instead. With UDP, although there are still playback issues visible in the footage, at least the recording continues and I don’t lose some segments like with TCP.😢
The log shows that the cam lost 1 frame during the capture phase and other 3 frames while sending the stream. With about 9350 frames, This is not good but I think that your problem is worse. Are you sure that the it's not a network problem. This could be confirmed by the TCP problems you noticed.
I now suspect that there may be an issue with the camera’s network. Although the web interface indicates a strong signal, I have observed network fluctuations when pinging the router directly via SSH—occasionally, the latency suddenly becomes very high. After a period of troubleshooting, I have been unable to determine the cause of this problem, as pinging the router from other devices connected to it (via 2.4GHz or 5GHz) yields normal results. Could it be that there is a hardware issue with my camera?😢
It could be an hw problem or a network congestion issue. Are you able to try with a temporary access point.
I added a wireless router very close to the camera to act as a mesh node for signal amplification. After using it for a period of time, I’ve noticed that although the issue is not completely eliminated, the probability of it occurring has now approached zero. The RTSP recording stream has gone from being basically unusable before to now experiencing only one or two very minor instances of image tearing per day.
It appears the problem has been resolved. The root cause is that the camera’s built‑in Wi‑Fi capability is very weak and has poor resistance to interference; its ping stability is worse even than that of my refrigerator and ceiling light. Even though the web interface shows a strong signal, that reported strength seems entirely unrelated to actual stability—as soon as the router is even slightly farther away and separated by a single wall, the camera struggles significantly to transmit data over Wi‑Fi.
My solution for this issue is: dedicate a wireless router to it and place it as close as physically possible.
@roleoroleo Huge thanks for the help you provided on this issue. Your patience and willingness to dig in made all the difference. I really appreciate the work you put into maintaining this project and supporting its users. Your project has revitalized this old camera!😊
Thank you for your tests.