Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
Foundation offers a Thread class, internally based on pthread
, that can be used to create new threads and execute closures.
// Detaches a new thread and uses the specified selector as the thread entry point.
Thread.detachNewThreadSelector(selector: Selector>, toTarget: Any, with: Any)
// Subclass
class MyThread: Thread {
// | |
// NSImageExtensions.swift | |
// | |
import Cocoa | |
extension NSImage { | |
/// The height of the image. | |
var height: CGFloat { |
REMOTE REQUESTS: | |
com.sadun.airflick | |
RequestType := show-photo | play-media | screenshot | |
MediaLocation := | |
<url string> | <local file path string> | <array of local file path strings for slideshow> | |
Rotation := 0 | 1 | 2 | 3 (0 ^, 1 <, 2 v, 3 >) | |
Transition := SlideRight | Dissolve | |
SlideDuration := 2 | 3 | 5 | 8 | 10 (Use strings. Incorrect durations default to 5) | |
// Single Slide |
Is AppKit causing you frustration? Instead of just complaining about it, lets try to make it better by compiling a list of specific problems with AppKit. Leave a comment below, and I'll include it in the list.
##NSView##
NSView
does not have the ability to set an affine transform (rdar://15608609)NSTextField
) do not respond properly when layer-backed. Take NSButton
as an example. When not layer-backed, it will animate properly using the animator proxy. When layer-backed, using the animator proxy breaks focus rings (they jump to destination immediately). Currently, directly manipulating the layer of a cell-based control is not supported (and will lead to a broken interface), but is much needed. (rdar://15608822)##NSViewController##
NSViewController
could be more useful. It has -loadView
but no other lifecycle methods. (rdar://15608948)Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.
If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.
http://www.apple.com/osx/elcapitan-preview/
This is an excerpt from our internal documentation describing an issue with drawing in NSView
s on macOS Big Sur.
In macOS Big Sur (probably starting with β9), Apple changed the default contents format for backing layers of NSView
s. Instead of an explicit CALayerContentsFormat.RGBA8Uint
value, an „Automatic“ value is now used. Even though it also resolves into „RGBA8“ in our testing, it has some serious implications as it breaks assumptions our code relies on.
I first stumbled upon this issue in this tweet by Frank. It links to a thread on Apple Forums by Mark that contains valuable information as well as ideas for workarounds. The changed behavior was also confirmed by Marcin in this tweet.
# If in a playlist, play the next video. | |
tell application "Google Chrome" | |
repeat with t in tabs of windows | |
tell t | |
if URL starts with "http://www.youtube.com/watch" or URL starts with "https://www.youtube.com/watch" then | |
execute javascript " | |
var player = | |
document.getElementById('movie_player') || | |
document.getElementsByTagName('embed')[0]; | |
var next = document.getElementsByClassName('yt-uix-button-icon-playlist-bar-next')[0]; |
# Next Youtube Video in Playlist | |
tell application "Google Chrome" | |
repeat with t in tabs of windows | |
tell t | |
if URL starts with "http://www.youtube.com/watch" or URL starts with "https://www.youtube.com/watch" then | |
execute javascript " | |
var player = document.getElementById('movie_player') || document.getElementsByTagName('embed')[0]; | |
if (player) { | |
document.getElementsByClassName('ytp-next-button')[0].click() |