Skip to content

Instantly share code, notes, and snippets.

View gmogames's full-sized avatar
🍎

Guilherme Mogames gmogames

🍎
View GitHub Profile
@powhu
powhu / GIF2MP4.swift
Last active December 28, 2023 22:41
Swift 5.0 GIF to MP4
//
// 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")
@sketchytech
sketchytech / gist:a4e615c8c895c6500cf4
Last active June 27, 2021 11:59
Capture Still Images from Video and add to a View: Swift 2
// MARK: THANKS TO: http://stackoverflow.com/questions/4294996/get-uiimage-from-the-calayer-attached-to-avplayer-extract-frame-from-video-play
func finshedCapture(im:CGImage?, view:UIView, error:NSError?) {
if let img = im {
print("OK")
addImageViewWithImage(img, toView: view)
}
else {
print("Fail")
}
}
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: