JDVideoKit - You can easily transfer your video into Three common video type.

Related tags

Video JDVideoKit
Overview

Alt text

JDVideoKit

Alt text Alt text Alt text Alt text

Introduction

You can easily transfer your video into Three common video type.

You can use set up camera easily.

Installation

 pod 'JDVideoKit'

USAGE

1.Use My Two Layout

2.Use Only Capturing Layout

3.Use Only Editing Layout

4.Convert Video Directly

Customize your Layout

Delegate

public protocol JDVideoKitDelegate {
    //1.If return nil means call JDProcessingViewController
    func videoResource(forkit kit:JDVideoKit)->Any?
    
    //2.Only will call when above function return nil. Can make some setting for JDProcessingViewController
    func willPresent(cameraViewController vc:JDProcessingViewController,forkit:JDVideoKit)->JDProcessingViewController
    
    //3.Can make some setting for JDPresentingViewController, if return nil jump to next delegate
    func willPresent(edtingViewController vc:JDPresentingViewController,lastVC:UIViewController?,forkit:JDVideoKit)->JDPresentingViewController?
    
    //4.Set your type
    func ConvertType(forVideo resource:Any,forkit:JDVideoKit)->videoProcessType
    
    //5.Call When user click save.
    func FinalOutput(final video:AVAsset,url:URL)
}
  1. (NonOptional)

Return the video resource if you allready have one and Skip to Delegate 3.

Resource Allow Type : URL , AVAsset

Return nil, will call Capturing Layout.

  1. (Optional)

You can make some setting to customize ProcessingViewController and return it.

  1. (Optional)

Call when Capturing Finish or delegate provide an avaliable video.

You can make some setting to customize PresentingViewController and return it.

Return nil if you don't need edting layout and end it here , skip to 5.
If you use capturing Layout before and you won't use editing Layout next, you should use the para "LastVC" to dissmiss it or whatever you want

  1. (Optional)

Specific the Convert type. (.Boom , .Speed , .Reverse)

  1. (NonOptional)

Call When user click save button in Editing Layout, Capturing without editng or direct transfer complete.


Use My Two Layout

-> Implement 1 , 5

class ViewController: UIViewController {
    override func viewDidAppear(_ animated: Bool) {
        let vk = JDVideoKit(delegate: self).getProperVC()
        self.present(vk, animated: true, completion: nil)
    }
}
extension ViewController:JDVideoKitDelegate{
    func videoResource(forkit kit: JDVideoKit) -> Any? {
        return nil
    }
    func FinalOutput(final video:AVAsset,url:URL){
        print(url)
    }
}

Use Only Capturing Layout

-> Implement 1 , 3 , 4 , 5

Notice : You may need to dissmiss the ProcessingVC or it keep on screen.

class ViewController: UIViewController {
    override func viewDidAppear(_ animated: Bool) {
        let vk = JDVideoKit(delegate: self).getProperVC()
        self.present(vk, animated: true, completion: nil)
    }
}
extension ViewController:JDVideoKitDelegate
{
    func videoResource(forkit kit: JDVideoKit) -> Any? {
        return nil
    }
    func FinalOutput(final video:AVAsset,url:URL)
    {
        /// You will get a Video, you capture by my layout and convert 
        /// To the type you specific.
    }
    func willPresent(edtingViewController vc:JDPresentingViewController,lastVC:UIViewController?,forkit:JDVideoKit)->JDPresentingViewController? {
    	lastVC.dissmiss(...)
        return nil
    }
    func ConvertType(forVideo resource: Any, forkit: JDVideoKit) -> videoProcessType {
        return .Boom
    }
}

Use Only Editing Layout

-> Implement 1 , 5

class ViewController: UIViewController {
    override func viewDidAppear(_ animated: Bool) {
        let vk = JDVideoKit(delegate: self).getProperVC()
        self.present(vk, animated: true, completion: nil)
    }
}
extension ViewController:JDVideoKitDelegate
{
    func videoResource(forkit kit: JDVideoKit) -> Any? {
        return URL( url or asset of video)
    }
    func FinalOutput(final video:AVAsset,url:URL)
    {
        print(url)
    }
}

Convert Video Directly

-> Implement 1 , 4 , 5

class ViewController: UIViewController {
    override func viewDidAppear(_ animated: Bool) {
        let vk2 = JDVideoKit(delegate: self)
        vk2.getVideoDirectly { (progress) in
            print(progress)
        }
    }
}
extension ViewController:JDVideoKitDelegate
{
    func videoResource(forkit kit: JDVideoKit) -> Any? {
        return URL( url or asset of video)
    }
    func FinalOutput(final video:AVAsset,url:URL)
    {
        print(url)
    }
    func ConvertType(forVideo resource: Any, forkit: JDVideoKit) -> videoProcessType {
        return .Boom
    }
}

Customization

ProcessingViewController

Implement this Delegate:

func willPresent(cameraViewController vc:JDProcessingViewController,forkit:JDVideoKit)->JDProcessingViewController
{
	///Set Below Variable Like this
	vc.enableFlashLight = false 
}

The component you can customize:

public var enableFlashLight:Bool = true
public var FlashLightIconColor:UIColor = UIColor.black
public var SwitchIconColor:UIColor = UIColor.white
public var CaptureIconColor:UIColor = UIColor.white
public var allowChooseFromLibrary:Bool = true
public var BackgroundViewBarColor:UIColor?

Alt text

ProcessingViewController

Implement this Delegate:

func willPresent(edtingViewController vc:JDPresentingViewController,lastVC:UIViewController?,forkit:JDVideoKit)->JDPresentingViewController?
{
	vc.topTitle = "Title"
}

The component you can customize:

public var topTitle:String = "Share"
public var CloseIconColor:UIColor = UIColor.white
public var saveButtonTitle:String = "Save"
public var savaButtonColor:UIColor = UIColor.white

Alt text

You might also like...
Personal App that turned into
Personal App that turned into "alpha released app"

Muubii Works on macos 11.0 and later* Installation Automatic install (recommended) Open Terminal. Paste the line below, once done check your applicati

Personal App that turned into
Personal App that turned into "alpha released app"

Native-Youtube Personal App that turned into "alpha released app" Requirements: MacOS 12.0 or above A working google account Usage Download the univer

YouTubePlayerKit  A Swift Package to easily play YouTube videos 📺
YouTubePlayerKit A Swift Package to easily play YouTube videos 📺

A Swift Package to easily play YouTube videos 📺

ABMediaView can display images, videos, as well as now GIFs and Audio!
ABMediaView can display images, videos, as well as now GIFs and Audio!

Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.

Audio player demo based on Swift and SwiftUI, which can play local or network audio.
Audio player demo based on Swift and SwiftUI, which can play local or network audio.

SwiftAudioDemo Audio player demo based on Swift and SwiftUI, which can play local or network audio. In this demo, I have made a radio player to play n

BMPlayer - A video player for iOS, based on AVPlayer, support the horizontal, vertical screen
BMPlayer - A video player for iOS, based on AVPlayer, support the horizontal, vertical screen

A video player for iOS, based on AVPlayer, support the horizontal, vertical screen. support adjust volume, brightness and seek by slide, support subtitles.

A video composition framework build on top of AVFoundation. It's simple to use and easy to extend.
A video composition framework build on top of AVFoundation. It's simple to use and easy to extend.

A high-level video composition framework build on top of AVFoundation. It's simple to use and easy to extend. Use it and make life easier if you are implementing video composition feature.

Overlay alpha channel video animation player view using Metal.
Overlay alpha channel video animation player view using Metal.

Overlay alpha channel video animation player view using Metal. Example To run the example project, clone the repo, and run pod install from the Exampl

▶️ video player in Swift, simple way to play and stream media on iOS/tvOS

Player Player is a simple iOS video player library written in Swift. Looking for an obj-c video player? Check out PBJVideoPlayer (obj-c). Looking for

Comments
  • Example doesn't work due to errors

    Example doesn't work due to errors

    picker.dismiss(animated: true) {
                       let type = info["UIImagePickerControllerMediaType"]
                       let url = info["UIImagePickerControllerMediaURL"]
                        let rurl = info["UIImagePickerControllerReferenceURL"]
                       let video = VideoOrigin(mediaType: type, mediaUrl: url, referenceURL: rurl)
                       self.videoHasBeenSelect(video: video)
                   }
    

    Errors: Cannot convert value of type 'String' to expected argument type 'UIImagePickerController.InfoKey'

    opened by gerchicov-bp 0
  • Boomering Final Video Upside Down orientation

    Boomering Final Video Upside Down orientation

    When you apply boomering effect in demo app then final saved video orientation is upside down.

    Attached Video https://www.dropbox.com/sh/rtyoj7h24ne0prf/AACgoU5PexLwy981F7eTEjUaa?dl=0

    bug 
    opened by Arslan007 0
  • Compress video recorded through camera

    Compress video recorded through camera

    Hello,

    I have few issues. Please help:

    1. I am using this library to convert recorded video directly to boomerang. But I realise the video is of approx 20mb. Can we compress this video, like how it happens when selecting a video from photo library?

    2. Facing crash sometimes on processing recorded video to boomerang. Recieve this error: 'NSInternalInconsistencyException', reason: 'accessing _cachedSystemAnimationFence requires the main thread'. Any idea why this is happening on recording through camera only?

    3. Can we convert the video to boomerang automatically and show after that?

    enhancement 
    opened by Mamtak1811 1
Releases(2.5.0)
Owner
郭介騵
Chinese iOS Developer, Check out my website for more
郭介騵
YoutubeKit is a video player that fully supports Youtube IFrame API and YoutubeDataAPI for easily create a Youtube app

YoutubeKit YoutubeKit is a video player that fully supports Youtube IFrame API and YoutubeDataAPI to easily create Youtube applications. Important Ref

Ryo Ishikawa 555 Dec 28, 2022
A simple iOS app similar to iTunes where you can view details of your favorite movies, songs and audio books.

Popcorn Adventure This is an iOS app developed by Arthur Tristan M. Ramos who has taken the Appetiser iOS Coding Challenge. Design Pattern The design

Arthur Tristan M. Ramos 0 Dec 11, 2021
A fully functional short video app project.Record a six secends video while playing prank sounds.

prankPro A fully functional short video app project How to Install 1. use coconapod to init your xcode environment. 2. change the app-keys in `applica

huijimuhe 258 Jun 19, 2022
A Swift library to upload video files to api.video platform.

api.video IOS video uploader api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and manag

api.video 7 Dec 9, 2022
Video mp4 record save display - How to Take , Save and Display a .mp4 Video

Technicalisto How to Take , Save and Display a .mp4 Video Add your design with v

Aya Baghdadi 2 Aug 7, 2022
api.video is the video infrastructure for product builders

api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.

api.video 4 Jun 27, 2022
The main goal of this mini project is to inspire you on what we can accomplish with the SwiftUI framework.

COMPLEX SWIFTUI GESTURES We will create such a custom button with complex gestures that we can not find in Apple’s stock user interface library. PARALLAX EFFECT By using multiple movements in the opposite direction (parallax effect) we can add depth to this amazing onboarding screen.

Ghullam Abbas 4 Oct 17, 2022
PiPifier - a macOS and iOS Safari extension that lets you use every HTML5 video in Picture in Picture mode

PiPifier is a macOS 10.12 and iOS Safari (action) extension that lets you use every HTML5 video in Picture in Picture mode macOS Download It'

Arno Appenzeller 718 Jan 7, 2023
Repository with base samples for playing HLS/DASH with CMAF video, across as many platforms as possible. Includes steps for encoding and packaging your own test content.

Video Everything Repository with minimal samples for playing HLS/DASH with CMAF video, across as many platforms as possible. Content and License All t

Alex Dodge 3 Jul 4, 2021
Offline playback of a fireplace video on your Apple TV

Fireplace Offline playback of a fireplace video on your Apple TV Screenshots Bring Your Own Video For copyright reasons the file fire.mp4 is not inclu

Günther Eberl 1 Dec 12, 2021