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

Is there any way possible to clone the camera feed from CameraManager? #226

Closed
MichaelKucinski opened this issue Apr 20, 2020 · 8 comments
Closed

Comments

@MichaelKucinski
Copy link

Just for display purposes, I would like to clone the camera feed to multiple UIView objects at the same time. It could be fun to display two or more identical camera feeds that appear synced! Any cloned feeds would not need to have video recording capability. Please see https://stackoverflow.com/questions/61295613/is-there-a-way-to-copy-a-uiview-objects-video-content-into-a-second-uiview-im
Does anyone know if there is a way to clone them in my own code? Or could there by an internal array kept inside the pod that would allow clones (with no recording capability)?

@MichaelKucinski
Copy link
Author

Note that for my purposes, the camera feed is just one part of the display, so I don't anticipate using the recording capability just for the camera feed itself. However, if the recording capability could have an option where instead of just recording the camera feed, if it could record the whole device screen (which would include any overlaid objects/effects onto the feed) that would be really appealing to me. An option to record the whole screen might be just slightly different than recording the camera feed only. A lot of use cases probably use self.view as the bounding rectangle already, so we may be talking about the same size real estate, but with the feed coming from a slightly different source.

@MichaelKucinski
Copy link
Author

MichaelKucinski commented Apr 20, 2020

One thing I would like to add if an attempt to capture the whole screen for recording is made. I use emitters in my designs. I tried some code to do a screen shot, but it wasn't capturing the CAEmitterLayer objects/cells. There's probably a way to get those objects rendered into the result, but I wasn't familiar with a technique.

@torrao
Copy link
Contributor

torrao commented Apr 21, 2020

@MichaelKucinski

using CameraManager for that purpose is not possible because it only supports a single previewLayer. Since that's a very specific use case, which would ultimately change the behaviour of the lib, we are not considering doing that.

That being said, you probably need a AVCaptureSession with a AVCaptureVideoPreviewLayer for every one of your clone UIViews.

@MichaelKucinski
Copy link
Author

MichaelKucinski commented Apr 21, 2020 via email

@MichaelKucinski
Copy link
Author

MichaelKucinski commented Apr 21, 2020 via email

@torrao
Copy link
Contributor

torrao commented Apr 21, 2020

@MichaelKucinski

thanks for the feeback, but as I mentioned before we don't plan on changing the lib for your very specific use case since our goal is to mimic the default iOS camera in terms of functionality.

@MichaelKucinski
Copy link
Author

MichaelKucinski commented Apr 21, 2020 via email

@torrao torrao closed this as completed Apr 22, 2020
@MichaelKucinski
Copy link
Author

EmitSoEasy has been released.

It’s got the live camera feed using CameraManager. It’s flexible and can be cropped to a circle feed.

See lower left corner of the app toolbars to start it.

Try tiling the background with text or photo with the Camera feed and move the phone around. That is a lot of art content! Now you might see why I wanted to be able to record the whole screen of the device instead of just the camera video stream. And you might see how a cloned copy could have made for fun content. Imagine 3 of 4 circular camera feeds on screen and recording that effect! Users may like it.

https://apps.apple.com/us/app/emitsoeasy/id1500308841

EmitSoEasy can produce interesting artistic content very quickly

EmitSoEasy lets you work with Memoji and emoji. You can tile with text, Memoji, webpages, and photos too.

You can export tiles, text, photo, and web page clippings with transparent backgrounds.

Those exports can be used other places like Photoshop, etc.

If anyone is using Photoshop, please look at the following photos showcasing the export and tile features. It might be fun / creative to use exports from EmitSoEasy and incorporate them into Photoshop or other products.

The EmitSoEasy steps are pretty easy.

Create Text.  Type in a combination of Memoji and alphanumerics.
Choose Transparent Background for that text.
Then save to camera roll and it will capture the transparent background and text/Memoji.

If you want tiles :

Choose Tile the Background with this Text
Under the More tab, choose Save Tiles 2 Camera Roll, and it captures the tiles!

It only took me one minute to create each image

IMG_1325

IMG_1326

IMG_1327

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

2 participants