YITechnology / YIOpenAPI

YI Open API provides mobile SDKs and reference designs for software developers and hardware makers to build cool apps and products with YI 4K Action Cameras
Other
345 stars 76 forks source link

Video preview lag #72

Open Egorkansk opened 6 years ago

Egorkansk commented 6 years ago

hello, tell me please why video preview is laging (video delay 5 seconds), in your sample app, but oficial yi action app is not laging(about 600 ms)? How i can set low preview resolution or bitrate to fix this problem?

entalent commented 6 years ago

I decompiled the official app, and found that the official app used a totally different way to play the RTSP stream of camera preview. The sample app simply uses VideoView, while the official app uses a 3rd party library (I searched for that package name on google and the library used in official app seem to be in https://github.com/fenghxfriend/Android-RTSP-Player). The preview lag of VideoView seems to depend on device model... my MI 5 has a huge lag of 11 seconds, but a MI MIX 2 has a lag of about 1s, both using the sample app. I decided to use other RTSP library to play preview.

Egorkansk commented 6 years ago

Thank you, for answer

x4080 commented 6 years ago

Is it possible to zoom using video preview ? I'm thinking using cctv zoom lens, and video preview zoom for adjusting focus on the fly