roleoroleo / yi-hack-Allwinner-v2

Custom firmware for Yi 1080p camera based on Allwinner platform
MIT License
828 stars 95 forks source link

h51ga - non-fluent video / missing frames #796

Closed david-tub closed 4 months ago

david-tub commented 9 months ago

Hello together, first of all a big thank you for that project. I really like the idea and the realization of it.

I use the h51ga and have a generell problem with the video recording quality.

Problem: Motion is detected correctly. The Camera starts recording and creates mp4 files as expected. After about 2 seconds the video just hangs, meaning that the video file proceeds but the frame remains unchanged for 2-10 seconds. The jumping can be recognized by the timestamp. It simply stops and then suddenly continues after x seconds. For me this is a problem because losing always 2-10 seconds in the beginning is not acceptable. The issue occurs not always but most times. After the freeze the recording proceeds correctly. Also, switching light conditions seem to be the most problematic case. For example, entering the floor and turning the lights on will force the camera to turn IR light off during recording. That leads to a crash/restart in many test cases.

What I already tried:

Additional infos:

Is that problem of "non-fluent recording" already known? Do you have any advice for me?

Many thanks in advance!

barbigss commented 9 months ago

same problem here with Yi Dome Camera U SFUS (2K) and last hack 0.3.0

Giuserver commented 9 months ago

Did you mean recording on sd or record via wlan?

barbigss commented 9 months ago

I have ftp upload disabled, the problem is on the recorded file on sd and in rtsp stream. Some times the cam don't reboot but hangs until i remove power. The reboot/hangs happen more time a day

Giuserver commented 9 months ago

if the problem are .mp4 files I think something goes wrong in hack. did you try to reset the cam and use it with no SD and Yi/Kami App?

barbigss commented 9 months ago

already tried it, without hack it works fine. Now i discovered that with hack, but without private mode, it works correctly, as soon as i enable private mode the video starts to freeze. I need testing some time to understand if without private mode the reboots/hangs still happen

roleoroleo commented 9 months ago

mp4 videos are saved by mp4record (a Yi process). If the videos are not ok, probably there is a problem with the hw resources (cpu or memory). Or, maybe, mp4record crashes and restarts. This issue also explains the reason for the reboot.

Please, try to disable snapshots (the most difficult operation for the cam) and check if it works.

barbigss commented 9 months ago

ok, now I test for a while without private mode, then I enable private mode and disable snapshot and report the result. Many thanks!

david-tub commented 9 months ago

Thanks for your replies!

I have now tested it with private mode disabled and left the rest of the configuration unchanged (snapshot and ftp push still enabled). The difference is immediately visible. So far no hanging frames in the mp4 files and even the switching between normal and IR light during recording happens smoothly. I will test it further but so far the private mode seems to be the crucial point.

Thanks for that hint. Anyway would be interesting to find out, why the deactivation of the cloud features (private mode) causes reboots and hangs.

barbigss commented 9 months ago

even with private mode enabled but snapshot disabled the video is fluid and there are no restarts. I thought that by not using the snapshot, even though it is enabled, it did not use resources, this is obviously not the case. Thank you!

roleoroleo commented 8 months ago

The snapshot feature can be used by different sources.

If you want to be sure that snapshots are nor called, disable it in the webgui. It remains to be understood why the private mode causes problems.

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.