Skip to content

Instantly share code, notes, and snippets.

@martinpickett
martinpickett / streamSummary.sh
Created September 19, 2022 14:07
Displays track information for an MKV file. Requires FFprobe and jq.
#!/usr/bin/env bash
# Function which does almost everything. It needs to be a function as it is recursively
# called if the input is a directory.
main () {
for i in "$@"; do
# Check to see if input is valid
checkInput "$i"
@martinpickett
martinpickett / plex-required-bitrate.py
Created February 19, 2022 18:01
Calculates the Plex Required Bitrates for the video track in a video file
#!/usr/bin/env python3
from argparse import ArgumentParser
import os
import json
import math
from subprocess import run, DEVNULL, PIPE
from fractions import Fraction
from multiprocessing import Pool
from itertools import accumulate
@martinpickett
martinpickett / HDRCopy.sh
Last active July 5, 2023 06:54
Bash script to copy HDR10 metadata from source to a transcode.
#!/bin/bash
# Pre-defined RGB & WP values for BT.2020
BT2020_xW=0.3127
BT2020_yW=0.3290
BT2020_xR=0.708
BT2020_yR=0.292
BT2020_xG=0.17
BT2020_yG=0.797
BT2020_xB=0.131