Command Flags
Flag | Options | Description |
---|---|---|
-codec:a |
libfaac, libfdk_aac, libvorbis | Audio Codec |
-quality |
best, good, realtime | Video Quality |
-b:a |
128k, 192k, 256k, 320k | Audio Bitrate |
-codec:v |
mpeg4, libx264, libvpx-vp9 | Video Codec |
// | |
// URLRequest+cURL.swift | |
// | |
// Created by Dmitry Gulyagin on 19/02/2024. | |
// | |
import struct Foundation.URLRequest | |
public extension URLRequest { | |
1. Очень крутая книжка по сетям (стек OSI) – Charles Severance “Introduction to Network: How the Internet works” | |
2. URLCache – https://nshipster.com/nsurlcache/ | |
3. Ресёрч HTTP-кеширования с использованием URLCache https://qnoid.com/2016/04/10/A-primer-in-HTTP-caching-and-its-native-support-by-iOS.html | |
4. Анализ доступности сети: | |
* SimplePing – https://developer.apple.com/library/archive/samplecode/SimplePing/Introduction/Intro.html | |
* https://github.com/dustturtle/RealReachability | |
* https://github.com/ankitthakur/SwiftPing | |
* https://github.com/lmirosevic/GBPing | |
* https://github.com/rwbutler/Connectivity | |
* Баг с 2009 года – https://lists.apple.com/archives/macnetworkprog/2009/May/msg00056.html |
Command Flags
Flag | Options | Description |
---|---|---|
-codec:a |
libfaac, libfdk_aac, libvorbis | Audio Codec |
-quality |
best, good, realtime | Video Quality |
-b:a |
128k, 192k, 256k, 320k | Audio Bitrate |
-codec:v |
mpeg4, libx264, libvpx-vp9 | Video Codec |
// | |
// CVError.swift | |
// | |
// Created by Jun Tanaka on 2016/12/13. | |
// Copyright © 2016 Jun Tanaka. All rights reserved. | |
// | |
import CoreVideo | |
public enum CVError: Int32, Error { |
import UIKit | |
import AVFoundation | |
class ViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate { | |
@IBOutlet weak var myView: UIView! | |
var session: AVCaptureSession? | |
var device: AVCaptureDevice? | |
var input: AVCaptureDeviceInput? |
/* | |
This functions opens a video file and extracts the frames and put them into a vector of Mat(its the class for representing an img) | |
*/ | |
void extract_frames(const string &videoFilePath,vector<Mat>& frames){ | |
try{ | |
//open the video file | |
VideoCapture cap(videoFilePath); // open the video file | |
if(!cap.isOpened()) // check if we succeeded | |
CV_Error(CV_StsError, "Can not open Video file"); |
class Sound : NSObject { | |
/// The player. | |
var avPlayer:AVAudioPlayer! | |
/** | |
Uses AvAudioPlayer to play a sound file. | |
The player instance needs to be an instance variable. Otherwise it will disappear before playing. | |
*/ | |
func readFileIntoAVPlayer() { |
ACTION | |
AD_HOC_CODE_SIGNING_ALLOWED | |
ALTERNATE_GROUP | |
ALTERNATE_MODE | |
ALTERNATE_OWNER | |
ALWAYS_SEARCH_USER_PATHS | |
ALWAYS_USE_SEPARATE_HEADERMAPS | |
APPLE_INTERNAL_DEVELOPER_DIR | |
APPLE_INTERNAL_DIR | |
APPLE_INTERNAL_DOCUMENTATION_DIR |
# xcode-build-timestamp.sh | |
# @desc Set a timestamp as the build number when the project is compiled. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Target dependencies" | |
buildNumber=$(date +%Y%m%d%H%M) |
#define NSLog(FORMAT, ...) fprintf( stderr, "%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String] ); |