roleoroleo / yi-hack-Allwinner-v2

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

[Support request] Yi Pro 2K Home YFUS 12.0.51 #753

Open b-a-9-0 opened 7 months ago

b-a-9-0 commented 7 months ago

Hi, I have a Yi Pro 2K Home

For curiosity I tried to apply the hack with y623. It kind of works (Web Interface, SSH, ...) but I have some problems with the RTSP streams. Low quality stream sometimes works, but not very stable, the high res stream does not work at all. Is there any advice what I can try to get this model running? Thanks for this great work!

roleoroleo commented 7 months ago

Please, send me a copy of the frame buffer. /dev/shm/fshare_frame_buf I will check the stream.

b-a-9-0 commented 7 months ago

Please see the buffer attached. fshare_frame_buf.zip

roleoroleo commented 7 months ago

I can confirm that y623 should work. The stream is supported. But I don't remember if I implemented some change after the last release, for this model. Please try this image: y623_0.3.0.tar.gz

b-a-9-0 commented 7 months ago

Hi, this image worked, thanks. I think you can add this camera version to the list of supported devices.

isibizi commented 7 months ago

I had the same problems with this cam, i have solve my problems after i have formated my sdcard with "EaseUS Partition Master" and use Fat32 and GPT, after that my cameras worked fine

Tribux commented 7 months ago

Hi, have same model but ZFUS, it seems to work, but it has many restarts during work, mostly when I try to access preview(rtsp/onvif). Does same firmware should work without issues on this device? MOdel is YYS.62121 SN starts with ZY623

UPDATE: In fact solution suggested by @isibizi helped and for at least now, no restarts of cam and rtsp preview possible :)

redlingg commented 6 months ago

Hi, have same model but ZFUS, it seems to work, but it has many restarts during work, mostly when I try to access preview(rtsp/onvif). Does same firmware should work without issues on this device? MOdel is YYS.62121 SN starts with ZY623

UPDATE: In fact solution suggested by @isibizi helped and for at least now, no restarts of cam and rtsp preview possible :)

Hello which fw do u use? I dont find any for ZFUS. thnaks (yi home 2k pro)

roleoroleo commented 6 months ago

Which firmware version?

redlingg commented 6 months ago

Which firmware version?

Is this question for me..? :)

roleoroleo commented 6 months ago

Which firmware version?

Is this question for me..? :)

Yes, tell me the fw version that appears in the app.

redlingg commented 6 months ago

Which firmware version?

Is this question for me..? :)

Yes, tell me the fw version that

Which firmware version?

Is this question for me..? :)

Yes, tell me the fw version that appears in the app.

Thanks.

12.0.51.0_202303091901 Can be upgraded to: 12.0.51.04_202311171457

roleoroleo commented 6 months ago

Try y623. It should work.

redlingg commented 6 months ago

Try y623. It should work.

well it works but gives me a fish eye image... so it is not really good

roleoroleo commented 6 months ago

Is the image different from the one in the app? If yes, please send me a copy of the frame buffer: /dev/shm/fshare_frame_buf

redlingg commented 6 months ago

Is the image different from the one in the app? If yes, please send me a copy of the frame buffer: /dev/shm/fshare_frame_buf

it is the same.. :( I dont understand why.

redlingg commented 6 months ago

Is the image different from the one in the app? If yes, please send me a copy of the frame buffer: /dev/shm/fshare_frame_buf

it is the same.. :( I dont understand why.

ā€¦.now I am. not able to reach the admin site. Can this be because of the se card?

roleoroleo commented 6 months ago

Maybe Simply create again the sd.

redlingg commented 6 months ago

Hello

I changed the card. Sometimes the picture gets pixel. At the same time I get notification from home assistant and that photo is ok. The view in motioneye is also pixeled. Then sometime it is ok. Any suggestion? Thanks

roleoroleo commented 6 months ago

If the image quality is the same as in the app it is probably a camera problem.

Tribux commented 6 months ago

Which firmware version?

Hi sorry for late reply, i Just used firmware for Y vesrsion but doing preview through rtsp or onvif I get pixels sometimes, need to either restart or open app few times..

roleoroleo commented 6 months ago

Please. Tell me the fw revision that appears in the webgui: field "Base Version".

Tribux commented 6 months ago

Please. Tell me the fw revision that appears in the webgui: field "Base Version".

Base version is: 12.0.51.04_202311171457

roleoroleo commented 5 months ago

Please, wait for the next release.

redlingg commented 5 months ago

Hi Can you tell me why I have picture like this? Sometime it is ok, sometime it looks like this: SmartSelect_20240109_101710_Home Assistant

roleoroleo commented 5 months ago

There can be many reasons for this problem.

Please, try if this beta is better: y623_0.3.0.tar.gz

lenisko commented 5 months ago

Hey @roleoroleo

I tried the one above with both 12.0.51.01_202303091901, 12.0.51.04_202311171457 and card formated through app but camera record is freezing a loot, same goes for RTSP stream.

If there's anything I could provide to get this tuned, just let me know! Cheers.

roleoroleo commented 5 months ago

Please, send me a copy of the buffer /dev/shm/fshare_frame_buf

lenisko commented 5 months ago

@roleoroleo

count=1; version="12.0.51.04_202311171457"; model="YFUSY94"; while [ $count -le 9 ]; do cat /dev/shm/fshare_frame_buf > "/tmp/${version}_${model}_fshare_frame_buf_${count}"; count=$((count+1)); sleep 5; done

fshare_frame_buf.zip (both fw) rRTSPServer_log.txt (12.0.51.01_202303091901)

Size is different between firmware versions. Executed on both, 9 files each. Also attached a log of rRTSPServer for a case where video was working, froze, and started working again.

roleoroleo commented 5 months ago

The frame buffer is ok and supported, both for 12.0.51.01 and 12.0.51.04. The size is not a problem.

The log shows a problem near time 1705403439422, but I don't understand the type of problem. Could you please create another log with -d 15? Does low res stream work?

lenisko commented 5 months ago

Looks like the issue is present on both streams

killall wd_rtsp.sh
killall rRTSPServer
rRTSPServer -m y623 -r high -p 554 -d 15 &> /tmp/high-res-debug.txt
rRTSPServer -m y623 -r low -p 554 -d 15 &> /tmp/low-res-debug.txt
roleoroleo commented 5 months ago

In the capture thread, there is an error (just 1) that causes 2 lost P frames. In the delivery thread, there is a similar error at the same frames. It's not a big problem.

Instead there are no errors in the low resolution.

Are you sure that the network is ok?

lenisko commented 5 months ago

Cam itself reports 75-80% WiFi signal. AP was reporting great experience (UniFi).

For internal record process (the one writing on microSD card) are there any debug flags which could be run?

roleoroleo commented 5 months ago

For internal record process (the one writing on microSD card) are there any debug flags which could be run?

Unfortunately not.

redlingg commented 5 months ago

Please, try if this beta is better: y623_0.3.0.tar.gz https://github.com/roleoroleo/yi-hack-Allwinner-v2/files/13929210/y623_0.3.0.tar.gz

Hello This one is much better Thanks

Tribux commented 5 months ago

Just to add I also noticed that even though I'm saving settings after refreshing website they are again in default position;)

darxga commented 5 months ago

I've noticed on my Yi 2k Pro running 0.3.1 and on base 12.0.51.01_202303091901 that running high res rtsp rarely works, maybe for a very short time it'll work but 80-90% of the time it's either sitting on black screen or not connecting at all. On the other hand, running a Low res stream appears to be much more stable.

I've noticed when trying to run the rtsp server manually i get a constant stream of this error. Not sure if audio really affects this but changing the audio or disabling it hasn't seemed to help

rRTSPServer -m y623 -r high -a no -p 5540
1587157977348: h264/aac in - error - frame size exceeds buffer size
1587157979410: h264/aac in - error - frame size exceeds buffer size
1587157980156: h264/aac in - error - frame size exceeds buffer size
1587157981484: h264/aac in - error - frame size exceeds buffer size
1587157983501: h264/aac in - error - frame size exceeds buffer size
1587157985560: h264/aac in - error - frame size exceeds buffer size
1587157987613: h264/aac in - error - frame size exceeds buffer size
1587157989671: h264/aac in - error - frame size exceeds buffer size

I've also tried using the alt rtsp server but does not seem to improve anything: It shows connections but VLC just ends and retries the connection. Not seeing any specific failures in this

root@yi-09d9:~/etc# rtsp_server_yi -m y623 -r high -a no -p 5540
rtsp_server_yi: unrecognized option: m
Resolution: high
Audio: 0
Port: 5540
User: 
Password: ********
Play URL: rtsp://127.0.0.1:5540/ch0_0.h264

RTSP client connect, ip=x.x.x.x, port=58808 
SendBufSize is 327680
RTSP client disconnect, ip=x.x.x.x, port=58808 
RTSP client connect, ip=x.x.x.x, port=46770 
RTSP client disconnect, ip=x.x.x.x, port=46770

If this is unrelated, please let me know and I will open a separate issue, but from OP's issue it sounds like it might be related.

roleoroleo commented 5 months ago

Please send me a full log. I need to know the size of the frames. Option "-d 15". Did it work with 0.3.0?

darxga commented 5 months ago

I have not tried with 0.3.0, 0.3.1 was the latest when I started. If it will help I will try 0.3.0.

Here's the full log, Ironically it seem to get a few pictures although not at 20fps, so i'm wondering what had changed. I do see the error a few times in the log debug.log

I see some output in other runs like this, seems like resolution is off?

1587155281362: h26x in - frame detected - frame_len: 2600 - frame_counter: 14030 - frame_counter_last_valid: 14029 - resolution: 1080
1587155281363: h264/aac in - frame_len: 2600 - cb_current->size: 262144
1587155281363: h264/aac in - frame_len: 2600 - frame_counter: 14030 - resolution: 1080
1587155281363: h264/aac in - frame_write_index: 18/42
1587155281363: h264/aac in - frame_len: 288 - cb_current->size: 32768
1587155281363: h264/aac in - frame_len: 288 - frame_counter: 10718 - resolution: 65521
1587155281363: h264/aac in - frame_write_index: 31/42
roleoroleo commented 5 months ago

Wow, never seen a 300 KB I-frame... Please, try this beta version: rRTSPServer.gz

darxga commented 5 months ago

Seem to have similar behavior with this version as well. Attaching the log as well.

debug.log

roleoroleo commented 4 months ago

The log is empty.

darxga commented 4 months ago

My bad, here's another one.

debug.log

I left the version you provided running and it seems to be slightly more stable, I'm getting some picture on some of the times i connect to the rtsp stream. But there are still some times I connect and see nothing, I don't want to assume wifi connection but since it seems to work some of the time now and that the terminal has been a bit slow as well. Signal is 80%+ so I'll have to do more testing with it

roleoroleo commented 4 months ago

The error is not changed:

1707501480131: h264/aac in - frame_len: 321000 - cb_current->size: 262144

Are you sure that you are using the binary above? In case, I need to check the binary that I sent you. The buffer should be about 400KB now, but the log says 256KB.

roleoroleo commented 4 months ago

Try this one: rRTSPServer.gz

darxga commented 4 months ago

not getting any error messages now, in the few minutes of uptime it's only giving me 2 seconds of video before it drops. Will have to let it run for awhile and see

debug.log

roleoroleo commented 4 months ago

Ok. Let me know...

darxga commented 4 months ago

So I've noticed that I have to run this on only "high" or "low" and not "both" both seems to cause issues with the high stream, while the low stream will usually be ok.

Otherwise this seems stabe, once i set it to "high" I could check in on the camera whenever and be able to see fine.

I think my issue has been resolved, at least with this version of the rtsp server. Thanks alot!

roleoroleo commented 4 months ago

So I've noticed that I have to run this on only "high" or "low" and not "both" both seems to cause issues with the high stream, while the low stream will usually be ok.

Ok, but send me a log with both resolutions.

Extreme79 commented 4 months ago

Something new about yi 2k pro? At this time only this model can be found on Amazon, no more 1080pšŸ˜…

lenisko commented 4 months ago

Something new about yi 2k pro? At this time only this model can be found on Amazon, no more 1080pšŸ˜…

It's working, but there are some issues with high stream. Do the tests using shared binaries and provide logs :)