BBMetalImage | A high performance Swift library for GPU-accelerated image/video processing based on Metal | Computer Vision library
kandi X-RAY | BBMetalImage Summary
kandi X-RAY | BBMetalImage Summary
A high performance Swift library for GPU-accelerated image/video processing based on Metal. This library is highly inspired by GPUImage.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of BBMetalImage
BBMetalImage Key Features
BBMetalImage Examples and Code Snippets
Community Discussions
Trending Discussions on BBMetalImage
QUESTION
When creating a UIViewControllerRepresentable for SwiftUI, how do you create a Coordinator so that it can access the delegate of a third party library?
In this case, I am trying to access BBMetal, a photo-filtering library.
This is a truncated version of the code we are trying to 'bridge' to SwiftUI:
...ANSWER
Answered 2019-Nov-27 at 21:07You need to set the BBMetalCamera
's delegate at some point before you use it.
You might do it immediately after creating it. You didn't show how you create it, so I don't know if that would be a good place to set it.
You could probably just do it in viewDidLoad
:
QUESTION
I have a project where users can take a video and later add filters to them or change basic settings like brightness and contrast. To accomplish this, I use BBMetalImage, which basically returns the video in a MTKView (named a BBMetalView
in the project).
Everything works great - I can play the video, add filters and the desired effects, but there is no audio. I asked the author about this, who recommended using an AVPlayer
(or AVAudioPlayer
) for this. So I did. However, the video and audio are out of sync. Possibly because of different bitrates in the first place, and the author of the library also mentioned the frame rate can differ because of the filter process (the time this consumes is variable):
The render view FPS is not exactly the same to the actual rate. Because the video source output frame is processed by filters and the filter process time is variable.
First, I crop my video to the desired aspect ratio (4:5). I save this file (480x600) locally, using AVVideoProfileLevelH264HighAutoLevel
as AVVideoProfileLevelKey
. My audio configuration, using NextLevelSessionExporter, has the following setup: AVEncoderBitRateKey: 128000
, AVNumberOfChannelsKey: 2
, AVSampleRateKey: 44100
.
Then, the BBMetalImage library takes this saved audio file and provides a MTKView (BBMetalView) to display the video, allowing me to add filters and effects in real time. The setup kind of looks like this:
...ANSWER
Answered 2019-Oct-24 at 20:57Due to your circumstances, you seem to need to try 1 of 2 things:
1) Try and apply some sort of overlay that has the desired effect for your video. I could attempt something like this, but I have personally not done this.
2) This takes a little more time beforehand - in the sense that the program would have to take a few moments (depending on your filtering, time varies), to recreate a new video with the desired effects. You can try this out and see if it works for you.
I have made my own VideoCreator using some sourcecode from SO from somewhere.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install BBMetalImage
Run pod install or pod update.
Add import BBMetalImage to the Swift source file.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page