Skip to content

Instantly share code, notes, and snippets.

View nareshdb's full-sized avatar
🎯
Focusing

Naresh D Bhadresha nareshdb

🎯
Focusing
  • Ahmedabad
View GitHub Profile
@nareshdb
nareshdb / compression.swift
Created October 22, 2019 11:35 — forked from jaumevn/compression.swift
Video Compression in Swift
func compress(videoPath : String, exportVideoPath : String, renderSize : CGSize, completion : (Bool) -> ()) {
let videoUrl = NSURL(fileURLWithPath: videoPath)
if (!existsFileAtUrl(videoUrl)) {
completion(false)
return
}
let videoAssetUrl = AVURLAsset(URL: videoUrl, options: nil)