Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick Krzemienski krzemienski

View GitHub Profile
@krzemienski
krzemienski / install-ascp.sh
Created Dec 10, 2020 — forked from mfansler/install-ascp.sh
Install ascp on Linux
View install-ascp.sh
#!/bin/bash
## How to install ascp, in a gist.
## Check for latest link: http://downloads.asperasoft.com/en/downloads/8?list
wget -qO- https://download.asperasoft.com/download/sw/connect/3.9.8/ibm-aspera-connect-3.9.8.176272-linux-g2.12-64.tar.gz | tar xvz
## run it
chmod +x ibm-aspera-connect-3.9.8.176272-linux-g2.12-64.sh
./ibm-aspera-connect-3.9.8.176272-linux-g2.12-64.sh
@krzemienski
krzemienski / dash_and_hls_cenc_cbcs_multi_codec_packaging_shaka_bento4.py
Created Sep 2, 2020
Packaging multi codec DASH and HLS with cenc and cbcs encryption for widevine, playready, and fairplay w/ shaka & bento4
View dash_and_hls_cenc_cbcs_multi_codec_packaging_shaka_bento4.py
def package_local_targets(input_dir, output_dir):
trace = 'package_local_targets'
os.chdir(input_dir)
try:
print(f"{trace}: create directory {output_dir}")
os.makedirs(output_dir)
except FileExistsError:
print(f"delete existing {output_dir}")
shutil.rmtree(output_dir)
@krzemienski
krzemienski / multi-codec-lambda-edge-logic.js
Last active Sep 3, 2020
Lambda edge logic to determine what dash manifest
View multi-codec-lambda-edge-logic.js
'use strict';
const https = require('https');
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
const origin = event.Records[0].cf.request.origin;
const uri = request.uri;
const headers = request.headers;
@krzemienski
krzemienski / ffmpeg-qsv-enabled-build-ubuntu-18.04lts-testbed.md This gist will generate an Intel QSV-enabled FFmpeg build using the open source Intel Media SDK. Testbed used: Ubuntu 18.04LTS. A fallback is also provided for the intel vaapi driver where needed.
View ffmpeg-qsv-enabled-build-ubuntu-18.04lts-testbed.md

Build FFmpeg with Intel's QSV enablement on an Intel-based validation test-bed:

Build platform: Ubuntu 18.04LTS

Ensure the platform is up to date:

sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

Install baseline dependencies first (inclusive of OpenCL headers+)

@krzemienski
krzemienski / ffmpeg-qsv-enabled-build-ubuntu-18.04lts-testbed.md This gist will generate an Intel QSV-enabled FFmpeg build using the open source Intel Media SDK. Testbed used: Ubuntu 18.04LTS. A fallback is also provided for the intel vaapi driver where needed.
View ffmpeg-qsv-enabled-build-ubuntu-18.04lts-testbed.md

Build FFmpeg with Intel's QSV enablement on an Intel-based validation test-bed:

Build platform: Ubuntu 18.04LTS

Ensure the platform is up to date:

sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

Install baseline dependencies first (inclusive of OpenCL headers+)

@krzemienski
krzemienski / build-and-install-latest-bento4.sh
Created Jun 7, 2020
Build and install master branch of bento4
View build-and-install-latest-bento4.sh
#!/bin/bash
BENTO4_INSTALL_DIR=/opt/bento4
export PATH=/opt/bento4/bin:${PATH}
LD_LIBRARY_PATH=/usr/local/lib64
# Fetch source.
cd /tmp/ \
&& git clone https://github.com/axiomatic-systems/Bento4.git
# Create installation directories.
@krzemienski
krzemienski / waifu2x_VMAF_measurement.sh
Created Jun 3, 2020 — forked from bitbytebit-cr/waifu2x_VMAF_measurement.sh
Waifu2x scaling up vs. Bilinear vs. Bicubic objective measurement
View waifu2x_VMAF_measurement.sh
#!/bin/sh
## Christopher Kennedy Feb 2020
## Crunchyroll Waifu2x upscaling objective measurement
##
## Note you must install waifu2x and run this in the waifu2x directory,
## plus have an FFmpeg with VMAF enabled (must build from scratch)
##
## Dependencies:
## https://ffmpeg.org
@krzemienski
krzemienski / backup-github.sh
Created May 15, 2020 — forked from rodw/backup-github.sh
A simple script to backup an organization's GitHub repositories, wikis and issues.
View backup-github.sh
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
# NOTE: if you have more than 100 repositories, you'll need to step thru the list of repos
# returned by GitHub one page at a time, as described at https://gist.github.com/darktim/5582423
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)