Skip to content

Instantly share code, notes, and snippets.

View jcarpenter's full-sized avatar

Josh Carpenter jcarpenter

View GitHub Profile
@jcarpenter
jcarpenter / ffmpeg-commands.sh
Last active January 31, 2023 07:26
Collection of useful FFMPEG techniques
# ------ IMAGE SEQUENCE ------ #
# Create QuickTime-friendly .MOV from a sequence of PNGs
# In this example they start with “test…”
# Note: The crop filter is so we don’t need to worry about input files
# being divisible by two. If they’re not, we crop them to fit
# with `-vf "crop=trunc(iw/2)*2:trunc(ih/2)*2"`
ffmpeg -r 60 -pattern_type glob -i "test*.png" -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" -vcodec libx264 -crf 5 -pix_fmt yuv420p output.mov
@jcarpenter
jcarpenter / swift
Last active December 16, 2020 18:53
Output `NSColor.controlAccentColor` as RGBA HEX, from macOS
import Cocoa
class ViewController: NSViewController {
override func viewDidLoad() {
super.viewDidLoad()
print("controlAccentColor:", NSColor.controlAccentColor.rgbaHexString)
}
}
public extension NSColor {
/* Positional testing with circle */
#circle {
width: 2cm;
height: 2cm;
border-radius: 50%;
border: 0.4cm dashed red;
display: none;
}
*:-moz-full-screen #circle {