Skip to content

Instantly share code, notes, and snippets.

@martinpickett
martinpickett / streamSummary.sh
Created Sep 19, 2022
Displays track information for an MKV file. Requires FFprobe and jq.
View streamSummary.sh
#!/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 Feb 19, 2022
Calculates the Plex Required Bitrates for the video track in a video file
View plex-required-bitrate.py
#!/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 Nov 24, 2021
Bash script to copy HDR10 metadata from source to a transcode.
View HDRCopy.sh
#!/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