ProductPromotion
Logo

Swift

made by https://0x3d.site

GitHub - HHK1/PryntTrimmerView: A set of tools to trim, crop and select frames inside a video
A set of tools to trim, crop and select frames inside a video - HHK1/PryntTrimmerView
Visit Site

GitHub - HHK1/PryntTrimmerView: A set of tools to trim, crop and select frames inside a video

GitHub - HHK1/PryntTrimmerView: A set of tools to trim, crop and select frames inside a video

PryntTrimmerView

codebeat badge Platform License Version Carthage compatible Swift Package Manager

A set of tools written in swift to crop and trim videos.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Trimming

Cropping

Requirements

PryntTrimmerView requires iOS9: It uses Layout Anchors to define the constraints.

Installation

SPM

Add the following to your Package.swift file

dependencies: [
    .package(url: "https://github.com/HHK1/PryntTrimmerView.git", .upToNextMajor(from: "4.0.1"))
]

CocoaPods

PryntTrimmerView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "PryntTrimmerView"

Then, run pod install to download the source and add it to your workspace.

Carthage

PryntTrimmmerView is available through Carthage. To install it, simply add the following line to your Cartfile:

github "HHK1/PryntTrimmerView"

Run carthage update to build the framework and drag the built PryntTrimmerView.framework into your Xcode project.

Swift Version

  • Swift 3 compatibility: use version 1.0.1 or below.
  • Swift 4 compatibility: use version 2.x.x.
  • Swift 4.2 compatibility: use version 3.x.x

Usage

:warning: This library does not contain an API to crop or trim your video asset. You can find a possible implementation for this in the example pod, but the library only provides the UI.

Trimming

Create a TrimmerView instance (in interface builder or through code), and add it to your view hierarchy.

trimmerView.asset = asset
trimmerView.delegate = self

Access the startTime and endTime property to know where to trim your asset. You can use the TrimmerViewDelegate to link the trimmer with an AVPlayer and provide the end user with a preview. See the VideoTrimmerViewController inside the project to see an example.

You can also customize the trimmer view by changing its colors:

trimmerView.handleColor = UIColor.white
trimmerView.mainColor = UIColor.orange
trimmerView.positionBarColor = UIColor.white

Cropping

Create an instance of the VideoCropView and add it to your view hierarchy, then load your video into the crop view: videoCropView.asset = asset.

You can set the aspect ratio you want using the setAspectRatio method. Once you are satisfied with the portion of the asset you want to crop, call getImageCropFrame to retrieve the select frame. See the VideoCropperViewController in the example app for an actual example of how to crop the video for export.

License

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

More Resources
to explore the angular.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory