Closed robbinjanssen closed 3 weeks ago
It could be a memory issue. Try to disable kernel tuning.
I will try and let you know, thanks!
Hi @roleoroleo, the stream seems more stable now. Also disabled the snapshot feature which seems to help. I've encountered another problem, when looking at the stream it goes black after a while, then it takes about 50secs (this varies) and the screen comes back on, you can see the cam adjusting the light levels.
Not sure if this is a soft- or hardware issue, do you have any idea/suggestions? Is there some more info I can provide?
The black screen starts at 20:33:32 but i've trimmed this video to only show the relevant part:
When the stream disappears, check if the rtsp daemon (rRTSPServer) is running. Maybe the daemon dies and the watchdog restarts it.
The RTSPServer is still running while this happens, is there anything else I can check?
You should try to run the daemon with extended log. kill the process and run it again:
killall wd_rtsp.sh
killall rRTSPServer
/tmp/sd/yi-hack/bin/rRTSPServer -m h51ga -r high -a pcm -p 554 -u admin -w REDACTED -d 15
And send me the output.
Thanks, will do tonight, doesn't really seem to happen during the day
@roleoroleo it's kind of hard to tell when the black screen starts exactly because the output is a lot. If there's anything I can do to improve that please let me know.
Attached is the log of the stream: https://gist.github.com/robbinjanssen/307994efba0926d394507f24eb28d983
I noticed the black screen at around 1713990366305
.
The log is perfect: no errors, no lost frames in the grabber and no lost frames in the delivery.
Around 1713990366305 nothing strange.
Please try a network capture with wireshark/tcpdump.
You can download tcpdump for Allwinner-v2 here:
https://github.com/roleoroleo/yi-hack-utils/tree/main/Allwinner-v2
tcpdump -i wlan0 -w /tmp/capture.pcap
@roleoroleo here is the output, it happens a couple times in this capture. I tried analyzing it and saw some batched groups of messages containing "Interleaved channel", not sure what it means though.
./tcpdump -i wlan0 -w /tmp/sd/yi-hack/tmp/capture.pcap
tcpdump: listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C7143 packets captured
7198 packets received by filter
0 packets dropped by kernel
When the frames turn black, I actually hear the camera clicking and I think its turning the IR LED on/off.. is this faulty hardware or broken (yi) firmware?
I think I read in another issue that you cannot manually turn on/off the IR LED right? Only toggle it entirely?
Sorry but I have to ask a new capture. You should start the rtsp client after starting the capture. Otherwise wireshark is not able to detect the rtp/rtcp stream.
Meanwhile, I found some strange thing: the traffic is fragmented, a lot of reassembled packets with strange sizes. Is there something strange in your network?
When the frames turn black, I actually hear the camera clicking and I think its turning the IR LED on/off.. is this faulty hardware or broken (yi) firmware?
Check if it's just a click (the shutter) or if the cam is rebooting. About hardware failure, it could be a power issue. Are you using the factory adapter and cable? Has the cam enough current?
I do hear a click sometimes, but more frequently the cam is just trying to "adjust" the light levels. The cam is not rebooting as I do see the time/date increasing on the stream.
I'm starting to think this is a faulty hardware issue, but I'll try to make a new capture this week. I've also ordered a Eufy E220 cam as an alternative to experiment with. If that one works fine and I don't need this one anymore, I'll gladly sent it to you (if you are in EU) for you to experiment with.
@roleoroleo (un)fortunately it was a hardware issue and the cam has been replaced. This one works :-) Thanks for your help
First of all, thanks for all your hard work! Really appreciate the time and effort you are putting into this.
The problem
When my cam has been running for a while, at some point the stream will no longer load. Not in HA using the WebRTC component, and neither in VLC using the RTSP stream. After a reboot it works again for a limited time. Seems like a memory issue so I'm hoping we can solve this.
The details:
h51ga
withv0.3.2
9.0.21.13_202109101104
The settings:
Logs:
Please let me know what logs I can provide to you, the output of top at the moment the camera stream is no longer working: