Install ffmpeg
brew install ffmpeg
Download file through url, like this:
ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "http://url-file.domain.m3u8" -c copy video.mp4
using TMPro; | |
using UnityEngine; | |
[RequireComponent(typeof(TextMeshProUGUI))] | |
public class BuildDisplayer : MonoBehaviour | |
{ | |
private TextMeshProUGUI Text; | |
private void Awake() | |
{ |
import SwiftUI | |
import PlaygroundSupport | |
// constants | |
let cardWidth: CGFloat = 343 | |
let cardHeight: CGFloat = 212 | |
let spacing = 36 | |
let animation = Animation.spring() | |
let cardColors = [ | |
Color(UIColor.systemRed), |
class Synthesizer { | |
// MARK: - Variables | |
var audioEngine: AVAudioEngine! | |
var sourceNode: AVAudioSourceNode! | |
var time = Float.zero | |
var frequencyRamp = Float.zero | |
var currentFrequency: Float = 20 { | |
didSet { |
Install ffmpeg
brew install ffmpeg
Download file through url, like this:
ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "http://url-file.domain.m3u8" -c copy video.mp4
public enum Direction { | |
case forward | |
case backward | |
} | |
internal var player: AVPlayer? | |
private var isSeekInProgress = false | |
private var chaseTime = kCMTimeZero | |
private var preferredFrameRate: Float = 23.98 |
/// RepeatingTimer mimics the API of DispatchSourceTimer but in a way that prevents | |
/// crashes that occur from calling resume multiple times on a timer that is | |
/// already resumed (noted by https://github.com/SiftScience/sift-ios/issues/52 | |
class RepeatingTimer { | |
let timeInterval: TimeInterval | |
init(timeInterval: TimeInterval) { | |
self.timeInterval = timeInterval | |
} |
// GitHub Reference: https://github.com/lixing123/ExtAudioFileConverter | |
// LAME iOS Build: https://github.com/kewlbear/lame-ios-build | |
#import <Foundation/Foundation.h> | |
#import <AudioToolbox/AudioToolbox.h> | |
NS_ASSUME_NONNULL_BEGIN | |
enum BitDepth{ |
extension AVCaptureDevice { | |
/// http://stackoverflow.com/questions/21612191/set-a-custom-avframeraterange-for-an-avcapturesession#27566730 | |
func configureDesiredFrameRate(_ desiredFrameRate: Int) { | |
var isFPSSupported = false | |
do { | |
if let videoSupportedFrameRateRanges = activeFormat.videoSupportedFrameRateRanges as? [AVFrameRateRange] { |
const fs = require('fs') | |
const crc32 = require('crc').crc32 | |
function findChunk(buffer, type) { | |
let offset = 8 | |
while (offset < buffer.length) { | |
let chunkLength = buffer.readUInt32BE(offset) | |
let chunkType = buffer.slice(offset + 4, offset + 8).toString('ascii') |
#!/bin/bash | |
killall Xcode | |
xcrun -k | |
xcodebuild -alltargets clean | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" | |
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" | |
rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
rm -rf ~/Library/Caches/com.apple.dt.Xcode/* | |
open /Applications/Xcode.app |