This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Foundation | |
import AVFoundation | |
class AudioSplitter { | |
var filePrepend: String = "file://" | |
var fileSeparator: Character = "." | |
var fileSplitAppend: String = "-split-" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ResumableTimer: NSObject { | |
private var timer: Timer? = Timer() | |
private var callback: () -> Void | |
private var startTime: TimeInterval? | |
private var elapsedTime: TimeInterval? | |
// MARK: Init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TYAudioVideoManager.swift | |
// Yash Thaker | |
// | |
// Created by Yash Thaker on 05/12/18. | |
// Copyright © 2018 Yash Thaker. All rights reserved. | |
// | |
/* | |
1) mergeVideos(videoUrls: [URL], exportUrl: URL, preset: String? = nil, progress: @escaping Progress, completion: @escaping Completion) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by はるふ on 2017/12/11. | |
// Copyright © 2017年 ha1f. All rights reserved. | |
// | |
import Foundation | |
import CoreImage | |
import AVFoundation | |
extension CIFilter { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MovieTransitionsVC.swift | |
// VideoAnimations | |
// | |
// Created by Tula on 2018-06-14. | |
// Copyright © 2018 Tula. All rights reserved. | |
// | |
import UIKit | |
import AVFoundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FairPlayer: AVPlayer { | |
private let queue = DispatchQueue(label: "com.icapps.fairplay.queue") | |
func play(asset: AVURLAsset) { | |
// Set the resource loader delegate to this class. The `resourceLoader`'s delegate will be | |
// triggered when FairPlay handling is required. | |
asset.resourceLoader.setDelegate(self, queue: queue) | |
// Load the asset in the player. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// GIF2MP4.swift | |
// | |
// Created by PowHu Yang on 2020/4/24. | |
// Copyright © 2020 PowHu Yang. All rights reserved. | |
// | |
/* How to use | |
let data = try! Data(contentsOf: Bundle.main.url(forResource: "gif", withExtension: "gif")!) | |
let tempUrl = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("temp.mp4") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
// swift port of stackoverflow answer | |
// http://stackoverflow.com/a/31301238/2048130 | |
extension CGFloat { | |
/** Degrees to Radian **/ | |
var degrees: CGFloat { | |
return self * (180.0 / .pi) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*** Academy Engraved LET *** | |
AcademyEngravedLetPlain | |
--------------------- | |
*** Al Nile *** | |
AlNile | |
AlNile-Bold | |
--------------------- | |
*** American Typewriter *** | |
AmericanTypewriter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://stackoverflow.com/questions/3741323/how-do-i-export-uiimage-array-as-a-movie/3742212#3742212 | |
import AVFoundation | |
import UIKit | |
import Photos | |
struct RenderSettings { | |
var width: CGFloat = 1334 | |
var height: CGFloat = 750 |
NewerOlder