Skip to content

Instantly share code, notes, and snippets.

@karllmitchell
karllmitchell / com.getchannels.transcode-plex.plist
Created January 16, 2017 05:14
LaunchAgent (MacOS daemon) for transcode-plex.sh
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.getchannels.transcode-plex.plist</string>
<key>Nice</key>
<integer>10</integer>
<key>StandardOutPath</key>
<string>/var/log/transcode-plex.log</string>
@karllmitchell
karllmitchell / transcode-plex.sh
Last active March 7, 2022 20:50
Scripts for transcoding Channels DVR recordings and adding them to Plex
#!/bin/bash
# (C) Karl Mitchell 2017, GPL: https://www.gnu.org/licenses/gpl-3.0.en.html
# Best run once daily, e.g. using launchd or cron job, during quiet time
# Converts Channels DVR to a Plex & iOS-friendly m4v (h.264) format
# Pre-requisites:
# HandBrakeCLI (video transcoding application)
# Optional pre-requisites:
# MP4Box (part of GPAC, use MacPorts or similar) for marking commercials start/end as chapters
# Curl and an IFTTT Maker Key for phone statusnotifications.
# FFMPeg (a part of channels DVR, but you'll need to point to it) for commercial trimming