Giter Site home page Giter Site logo

kakapos's Introduction

Kakapos

CocoaPods Compatible Platform

Kakapos is a video add filter tool that supports network and local urls, as well as album videos.

Support macOS, iOS, tvOS and watchOS.


Used

  • Create the video exporter provider.
let provider = Exporter.Provider.init(with: ``URL Link``)

Or

let provider = Exporter.Provider.init(with: ``AVAsset``)
  • Convert video and then add filters, convert buffer.
let filters: [C7FilterProtocol] = [
    C7Flip(horizontal: true, vertical: false),
    C7ColorConvert(with: .gray),
    C7SoulOut(soul: 0.3),
    MPSGaussianBlur(radius: 5),
]

let exporter = Exporter.init(provider: provider)

/// Export the video after add the filter.
/// - Parameters:
///   - options: Setup other parameters about export video.
///   - filtering: Filters work to filter pixel buffer.
///   - complete: The conversion is complete, including success or failure.
exporter.export(options: [
    .OptimizeForNetworkUse: true,
    .ExportSessionTimeRange: TimeRangeType.range(10...28.0),
], filtering: { buffer, callback in
    let dest = BoxxIO(element: buffer, filters: filters)
    dest.transmitOutput(success: callback)
}, complete: { res in
    // do somthing..
}, progress: { pro in
    // progressing..
})

CocoaPods

  • If you want to import video exporter module, you need in your Podfile:
pod 'Kakapos'
  • If you want to import metal filter module, you need in your Podfile:
pod 'Harbeth'

Swift Package Manager

Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

Xcode 11+ is required to build Kakapos using Swift Package Manager.

To integrate Harbeth into your Xcode project using Swift Package Manager, add it to the dependencies value of your Package.swift:

dependencies: [
    .package(url: "https://github.com/yangKJ/Kakapos.git", branch: "master"),
]

Remarks

The general process is almost like this, the Demo is also written in great detail, you can check it out for yourself.🎷

KakaposDemo

Tip: If you find it helpful, please help me with a star. If you have any questions or needs, you can also issue.

Thanks.πŸŽ‡

About the author


License

Harbeth is available under the MIT license. See the LICENSE file for more info.


kakapos's People

Contributors

yangkj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.