Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Request: Yi/Xiaoyi Camera Y4 #712

Closed
gaochunmeng opened this issue Sep 8, 2023 · 29 comments
Closed

Support Request: Yi/Xiaoyi Camera Y4 #712

gaochunmeng opened this issue Sep 8, 2023 · 29 comments

Comments

@gaochunmeng
Copy link

I have a Yi/Xiaoyi Camera Y4 in my hand

Version: 9.0.09.06, 202103291039

ID: IFCNY39YFQ**********

What should I do?

@roleoroleo
Copy link
Owner

Use y29ga

@gaochunmeng
Copy link
Author

After using y29ga hack, I saw the Factory.done folder, and now the device is always on with a yellow light when turned on, regardless of whether I have inserted an SD card or not

@roleoroleo
Copy link
Owner

Did you fix the problem with yellow light?

@boer0327
Copy link

In my case, I saw Factory.done folder too. but the camera will keep restarting. when I try to remove the SD card, it will go to normal without hack.

my version is 9.0.58.00_202206211052

Could you help me with this? thx

@boer0327
Copy link

log_no_wifi_dev.tar.gz
btw this is my log file, is it caused by no wifi issue? but I think it should not auto restart even if there is no wifi connected. but actually, I have configured Yi app and wifi working fine.

@roleoroleo
Copy link
Owner

my version is 9.0.58.00_202206211052

Sorry but your cam is not supported at the moment.
Please send me a backup of the original firmware.

@boer0327
Copy link

boer0327 commented Oct 19, 2023

thx roleoroleo. please refer to the original firmware below. any update, please let me know, thx.

LINK REMOVED

@roleoroleo
Copy link
Owner

Please try this beta:
y213ga_0.2.9.tar.gz

If RTSP and snapshot don't work, send me a copy of the file /dev/shm/fshare_frame_buf

@boer0327
Copy link

boer0327 commented Oct 19, 2023

Thx Roleroleo. this version partal working.

  1. High res stream, just show green. see screenshot
    image
  2. High res snapshot is not working, show a blank screen.
  3. Low res snapshot is working good

here is /dev/shm/fshare_frame_buf file
fshare_frame_buf.zip

@roleoroleo
Copy link
Owner

Your cam uses hevc.
I need time to add the support.

@boer0327
Copy link

ok, thx. let me know if you have further update for this. is there anyway I can downgrade camera to old version?

@roleoroleo
Copy link
Owner

Old fw version or old hack version?

Try these binaries:
bins.tar.gz

@boer0327
Copy link

Thx reoleoroleo. I mean old fw version. I was thinking you may not be that quick to finish the new version. so I am trying to downgrade to old fw version and it may can temp to solve this issue. But you are amazing. very quick to get this update. thank you so much. I will try it later today. and will let you know, if there still has any issue.

@boer0327
Copy link

Thx reoleoroleo. good news, High res stream is working.
Low res snapshot work as well.
But High res snapshot still not working. this is main feature what I wanted. because I am using MJPEG-Streamer connect. please help. thx

@roleoroleo
Copy link
Owner

Thx reoleoroleo. I mean old fw version. I was thinking you may not be that quick to finish the new version. so I am trying to downgrade to old fw version and it may can temp to solve this issue. But you are amazing. very quick to get this update. thank you so much. I will try it later today. and will let you know, if there still has any issue.

It's possible to downgrade to another fw version (if you have it) but this will not help to run this hack.
This model (y213ga) is new and it's not supported.

But High res snapshot still not working. this is main feature what I wanted. because I am using MJPEG-Streamer connect. please help. thx

I will check the code.

@boer0327
Copy link

ahh, that makes sense. I saw this model support H265, in yi app, I can switch mode between h264/h265.

thank you so much, let me know if any updates. :)

@roleoroleo
Copy link
Owner

Ok, try these binaries:
bins.tar.gz

@boer0327
Copy link

thx roleoroleo. everything is working now.
but there are still has big problem, video update very slow. it is about 30s delay for every move. this is almost cannot use on any place. :( . But when I try use yi APP. everything is sync without any problem. I think there are still has something wrong. please have look. Let me know if you need any log or something. thx so much for you update. I think almost there.

@boer0327
Copy link

image here is top command given result. CPU looks much higher, but Yi App video looks ok. so I am not sure what happen. just give you for refer.

@roleoroleo
Copy link
Owner

I don't understand.
Is video low in terms of fps?
Is there too much delay?

@boer0327
Copy link

yes, it is too much delay. for example, if you wave your handle in the camera, normally it will wave your handle just in time in the app/stream. actually, Yi app is just in time. I am using the RTSP stream play on VLC, it will be delayed about 15s. If I am using MJPG stream and check it on the website. it will delay about 30s. Is this clear for this issue?

@roleoroleo
Copy link
Owner

yes, it is too much delay. for example, if you wave your handle in the camera, normally it will wave your handle just in time in the app/stream. actually, Yi app is just in time. I am using the RTSP stream play on VLC, it will be delayed about 15s.

Please, try another client, for example WebRTC, if you have Home Assistant.

If I am using MJPG stream and check it on the website. it will delay about 30s. Is this clear for this issue?

MJPEG?!? The cam doesn't stream with MJPEG, only h264/hevc. What do you mean exactly?

@boer0327
Copy link

boer0327 commented Oct 24, 2023

image sorry for confusing you. see what I have attached doc. why I cannot use WebRTC, because it is only support Raspberry device. So I have to use Adaptive MJPEG-Streamer. this uses a snapshot URL and pulls individual images. see the above screenshot.

so in the hacker page, it has high res snapshot (http://192.168.0.46/cgi-bin/snapshot.sh?res=high&watermark=yes). I use it add to system. so I use this high res snapshot to add it to the system. It looks working. but the problem is the picture lag is very serious.
I am trying to figure out if it is caused by a system issue or a snapshot issue. I am trying to open the snapshot url on Chrome. refresh the page every 2 sec. I saw this image update is dealy. so I think it is caused by the snapshot feature issue.

I hope this makes sense for you. the key problem should be snapshot slow and dealy.

@boer0327
Copy link

QQ20231024-151001.mp4

let me give you an example, you can see the above video, the left one is using high res snapshot(Adaptive MJPEG-Streamer). and the right side is RTSP stream play on VLC. you can see how delay for the left screen. almost not working.

@boer0327
Copy link

and I am sure this is not cause by mainsail(it is printer manage sysytem which you see left UI) issue. because I have use another camera using same way, everything is working correctly.
RTSP looks ok, but it is still dealy than Yi app output.

I think snapshot issue should be cause by imggrabber in bin folder? I am not familiar with this. just some guess. :)

Let me know if you get any feedback, thx

@roleoroleo
Copy link
Owner

Sorry but you can't fix this problem.
Snapshot feature is very expensive in terms of cpu/memory resources and the process to take a snapshot requires a lot of time.
So, if you create a stream with a snapshot sequence, it will be delayed.
You have to use the rtsp protocol, with the rtsp url or through the onvif protocol.

@boer0327
Copy link

ok, got it. thx. but seems rtsp protocol looks still delay than Yi APP and some time it will frezon, you can check the above video. but YI app will don't have this problem. could you optimize it. or if you can build a H265 version? I think it will much fast than H264.

@roleoroleo
Copy link
Owner

Yi app uses a custom protocol to deliver the stream.
The delay of the rtsp protocol is higher than the delay of the app but it's not so big.
And it depends on the client, for example if you use WebRTC component in ha, the delay is very low.
About h265 I can't change the codec because the stream is produced by the hw accelerator inside the soc.
There is an experimental setting #484 (comment) that changes codec from h264 to h265 and viceversa but it's tested only for r30gb.

@boer0327
Copy link

thx roleoroleo for explain this. that's all make sense.

I think I find delay issue. if I am try to disable movement event feature on YI app, everything will much fast than before. and all dealy is acceptable.

I try to bypass snapshot feature. I am use a docker container to convert rstp to jpg on my router(because my router is much powerful device). use this way snapshot dealy also been fixed.

so I think your solution basic working for this camera. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants