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
func keyboardWillShow(notification: NSNotification) { | |
if let keyboardSize = (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.CGRectValue() { | |
let contentInsets = UIEdgeInsets(top: self.tableView.contentInset.top, left: 0, bottom: keyboardSize.height, right: 0) | |
self.tableView.contentInset = contentInsets | |
// If active text field is hidden by keyboard, scroll it so it's visible | |
// Your app might not need or want this behavior. | |
var aRect: CGRect = self.view.frame | |
aRect.size.height -= keyboardSize.height | |
let activeTextFieldRect: CGRect? |
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
## WebM | |
ffmpeg -i SOURCE_VIDEO_NAME.mov -codec:v libvpx -vf scale=1280:-1 -quality good -cpu-used 0 -b:v 1000k -qmin 10 -qmax 40 -maxrate 1000k -bufsize 2000k -threads 0 -an -pass 1 -f webm /dev/null | |
ffmpeg -i SOURCE_VIDEO_NAME.mov -codec:v libvpx -vf scale=1280:-1 -quality good -cpu-used 0 -b:v 1000k -qmin 10 -qmax 40 -maxrate 1000k -bufsize 2000k -threads 0 -codec:a libvorbis -b:a 128k -movflags faststart -pass 2 -f webm OUTPUT_VIDEO_NAME.webm | |
## MP4 | |
ffmpeg -i SOURCE_VIDEO_NAME.mov -codec:v libx264 -vf scale=1280:-1 -quality good -cpu-used 0 -b:v 1000k -qmin 10 -qmax 40 -maxrate 1000k -bufsize 2000k -threads 0 -an -pass 1 -f mp4 /dev/null | |
ffmpeg -i SOURCE_VIDEO_NAME.mov -codec:v libx264 -vf scale=1280:-1 -quality good -cpu-used 0 -b:v 1000k -qmin 10 -qmax 40 -maxrate 1000k -bufsize 2000k -threads 0 -codec:a libfdk_aac -b:a 128k -movflags faststart -pass 2 -f mp4 OUTPUT_VIDEO_NAME.mp4 |