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
// iPhone X | |
ffmpeg -i input.mov -qscale 0 -r 24 -y -vf scale=886:1920,setsar=1:1 output.mov | |
ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -i output.mov -y -vf scale=886:1920 -map 0:0 -map 1:0 -shortest -strict experimental -r 30 -y appstore.mp4 | |
// iPhone 8 plus | |
ffmpeg -i input.mov -qscale 0 -r 24 -y -vf scale=1080:1920,setsar=1:1 output.mov | |
ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -i output.mov -y -vf scale=1080:1920 -map 0:0 -map 1:0 -shortest -strict experimental -r 30 -y appstore.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 | |
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
class MyOperation: Operation { | |
enum State { | |
case ready, executing, finished | |
var keyPath: String { |
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
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist | xargs -IFILE defaults write FILE DVTPlugInCompatibilityUUIDs -array-add <-UUID-> |