eyeson-team / android-sdk

Android SDK for eyeson video service incl. demo app
MIT License
3 stars 0 forks source link

How to access local video? #2

Closed sonnguyen1996 closed 2 years ago

sonnguyen1996 commented 2 years ago

Hello dev team,

I'm very interested in your work, I tent to use eyes on SDK for my demo app in the thesis. I had to get a local video of a user in meeting to send to server-side after that analysis and get emotion detection. But as my understanding, Only one thread can access media stream from camera. So my question is: Is there any way to get video data from Eyeson's meeting surface view?

Best regards,

Son Nguyen

ArturKnaus commented 2 years ago

Hi,

you can either create your own version of SurfaceViewRenderer and get the VideoFrame directly, or if you only need a Bitmap of the current video, you could use the frame listener. Unfortunately the build in frame listener only returns the first received frame after the listener was added.

sonnguyen1996 commented 2 years ago

Hi, Thanks for your reply, All I need that is video of current user. Is there anyway to access raw data maybe via api or sdk :D

Best regards

ArturKnaus commented 2 years ago

Yea, wit a custom version of SurfaceViewRenderer. The you can override the onFrame callback which will provide you the video frames in I420 format.

sonnguyen1996 commented 2 years ago

You mean that What I need is implement a SurfaceViewRenderer base on your work, isn't it?

ArturKnaus commented 2 years ago

Exactly, as of yet we do not provide a prebuild way to restream the inbound/outgoing video.

sonnguyen1996 commented 2 years ago

Many thank for your support!