libstreaming icon indicating copy to clipboard operation
libstreaming copied to clipboard

Any support available with Camera2 API

Open anandk032 opened this issue 9 years ago • 10 comments

We are working on real time video streaming using Lib streaming library. Lib streaming library supports old Camera api, all is working fine but we required to integrate Camera2 api to Lib streaming library. Some of functionality like video preview display using Camera2 api, we integrated but we need to get video frame data for stream continuously, how to get it? please suggest the way forward.

In Lib streaming library, they used below callback method for frame data for old camera api:

mCamera.setPreviewCallback(new Camera.PreviewCallback() { @Override public void onPreviewFrame(byte[] data, Camera camera) { // here we get frame by frame data } });

anandk032 avatar Dec 17 '15 13:12 anandk032

Hi anandk32,

Maybe you can try to use gles.

hank5000 avatar Dec 18 '15 13:12 hank5000

Thanks for the reply, but can you please elaborate more on this. I didn't catch that how to implement with GLES with Camera2, Can you suggest any example or steps?

anandk032 avatar Dec 18 '15 13:12 anandk032

@anandk032 any progress with this issue?

Fuzzyma avatar Jun 14 '17 08:06 Fuzzyma

yes, we integrate by own with Camera2 api

On Wed, Jun 14, 2017 at 2:17 PM, Ulrich-Matthias Schäfer < [email protected]> wrote:

@anandk032 https://github.com/anandk032 any progress with this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fyhertz/libstreaming/issues/159#issuecomment-308365978, or mute the thread https://github.com/notifications/unsubscribe-auth/ANOKJfgSJqyJ0at05U-Cy9EO6LpaU3L5ks5sD54egaJpZM4G3V3M .

anandk032 avatar Jun 14 '17 11:06 anandk032

any chance, that you can share the code? I have a similar problem at the moment

Fuzzyma avatar Jun 14 '17 11:06 Fuzzyma

I will guide you how to integrate it.

anandk032 avatar Jun 14 '17 12:06 anandk032

@anandk032 Hi anandk32,can you please guide me how to integrate the Camera2 ? Thank you

RyandHo avatar Nov 26 '18 08:11 RyandHo

@anandk032 @Fuzzyma @RyandHo Hi guys, I too am looking into integrating the library with Camera2. Would anyone be able to share on how you approached the problem? Thank you!

tinselttown avatar May 10 '19 09:05 tinselttown

@anandk032 , how did you resolve this issue, please

gbenroscience avatar Mar 04 '20 05:03 gbenroscience

You need to use MediaCodec to encode the images from Camera2 yourself and then use one of the packetizers to pack the encoded images and send them out. I made a demo for people who are interested in use libstreaming with Camera2 API. Check out https://github.com/hq286/Camera2RTPStream

hq286 avatar Oct 23 '22 01:10 hq286