Giter Club home page Giter Club logo

swiftvideo's Introduction

SwiftVideo

GitHub Actions Swift version License

Video streaming and processing framework for Linux, macOS, and iOS/iPadOS/tvOS. Swift 5.1+ because I'm just opening this up and I really don't feel like dealing with older versions of Swift.

Getting Started

For now, check the Examples directory for some hints about how to use this framework. I promise I will be creating documentation to clarify how it all fits together and how you can do useful, interesting things with this framework.

Using with SwiftPM

  1. Add .package(url: "https://github.com/unpause-live/SwiftVideo.git", from: "0.2.0") to your package dependencies
  2. In your target dependencies, add either SwiftVideo or SwiftVideo_Bare depending on whether or not you wish to build with FFmpeg and Freetype support.

Using with Xcode + iOS

You can use this project in Xcode for iOS as a Swift Package as of 0.2.0.

  1. Go to File -> Swift Packages -> Add Package Dependency, or in your Project settings go to the Swift Packages tab and press +
  2. Set the package repository URL to https://github.com/unpause-live/SwiftVideo
  3. Select the branch or version you want to reference. Only 0.2.0 and above will be usable on iOS unless you also compile FFmpeg and Freetype for it.
  4. Choose the SwiftVideo_Bare product when prompted. This will build SwiftVideo without FFmpeg and Freetype. If you have built those libraries for iOS and wish to use them with SwiftVideo, choose the SwiftVideo product instead.
  5. If you are using the VideoMixer you will need to include Sources/SwiftVideo/kernels.metal in your project directly so that they are included. This will be changed when Swift 5.3 is released.

Current Features

  • RTMP Client and Server
  • "Flavor" Client and Server (toy protocol, see flavor.md)
  • OpenCL Support
  • Metal Support
  • Audio Decode/Encode (via FFmpeg and CoreAudio)
  • Video Decode/Encode (via FFmpeg and CoreVideo)
  • Camera capture (macOS/iOS)
  • Text rendering (via FreeType)
  • Video Mixer
  • Audio Mixer
  • Audio Resampler (via FFmpeg+SOX)

FFmpeg support is thanks to https://github.com/sunlubo/SwiftFFmpeg

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.