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

Use a video format ? #4

Open
darkyen opened this issue Jul 8, 2014 · 3 comments
Open

Use a video format ? #4

darkyen opened this issue Jul 8, 2014 · 3 comments

Comments

@darkyen
Copy link

darkyen commented Jul 8, 2014

Instead of doing this why not convert the camera to a video ? and then stream it to a video element on the fly ? ( Thats what probably webrtc does and probably that would be much faster )

@daraosn
Copy link
Owner

daraosn commented Jul 9, 2014

Good idea, feel free to do it and send a PR :-)

@darkyen
Copy link
Author

darkyen commented Jul 11, 2014

I am not a java/ObjC developer 👎 but here is the basics take raw cam stream and convert it to video stream using libav and keep it in memory lib av allows you to create frames and packets you can just make a buffer of say 10mb and keep on pushing frames to that buffer so that when the video is decoded you give the metadata followed by the fresh streamed data. :-) // basically thats what happens when u do video.src = URL.createObjectURL(Mediastream); . I can try to do that in Cpp but then JNI/Objective CPP wrapper would be a pain :-1 can we add pure C++ Modules as phonegap plugins ? Afaik i will have to write wrappers for everything 👎 and then camera access would be painful again.

Update on a second though you can probably then do something like streaming a scaled down version and when you take a photo use the devices full camera [ the java/ObjC code, would actually allow lower level access ] .. I will try to help my level best if you want to initiate that ( again i am very poor at java )

@mjesun
Copy link

mjesun commented Aug 5, 2014

Well, that wouldn't probably work, as the

However, I don't have a mac so I can't test it; but I'm pretty curious if you have profiled your actual approach to see where the time is being consumed.

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