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 savePNG(_ frame: AVFrame, to url: String) throws { | |
let fmtCtx = try AVFormatContext(format: nil, filename: url) | |
guard let codec = AVCodec.findEncoderById(.PNG) else { | |
fatalError("png codec doesn't exist") | |
} | |
guard let codecCtx = AVCodecContext(codec: codec) else { | |
fatalError("Could not allocate video codec context") | |
} | |
codecCtx.width = frame.width |
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
#!/usr/bin/env bash | |
# Backup a Plex database. | |
# Author Scott Smereka | |
# Version 1.0 | |
# Modified by Shaun Harrison | |
# Version 1.1 | |
# Script Tested on: |