Skip to content

Instantly share code, notes, and snippets.

View lucidbeaming's full-sized avatar

Joshua Curry lucidbeaming

View GitHub Profile
@lucidbeaming
lucidbeaming / jitter-video.sh
Created October 4, 2020 09:35
FFMPEG commands to shuffle and glitch time in videos
ffmpeg -i inputfile.mov -vf "frei0r=nervous" -c:a aac -b:a 192k -c:v libx264 -crf 20 -pix_fmt yuv420p -preset ultrafast outputfile.mov
ffmpeg -i inputfile.mov -vf "random=frames=5" -c:a aac -b:a 192k -c:v libx264 -crf 20 -pix_fmt yuv420p -preset ultrafast outputfile.mov
ffmpeg -i inputfile.mov -vf "shuffleframes=9 2 1 3 4 4 6 7 5 0 8" -c:a aac -b:a 192k -c:v libx264 -crf 20 -pix_fmt yuv420p -preset ultrafast outputfile.mov
@lucidbeaming
lucidbeaming / pytorch_vision_spacy_torchtext_jetson_nano.sh
Last active August 24, 2020 04:20 — forked from abishekmuthian/pytorch_vision_spacy_torchtext_jetson_nano.sh
Installing PyTorch, torchvision, spaCy, torchtext on Jetson Nanon [ARM]
#!/bin/bash
# This script will install pytorch, torchvision, torchtext and spacy on nano.
# If you have any of these installed already on your machine, you can skip those.
# Tailored for virtual environments created with python3 -m venv [name]
if [ -z ${VIRTUAL_ENV+x} ]
then
echo "Not in a virtual environment"
@lucidbeaming
lucidbeaming / ffmpeg-batch-consistency.sh
Created April 21, 2020 03:55
ffmpeg video - batch scale, normalize, OS X compatible and output to h264 .mp4 files
# Looks for all files with .mp4 extension. Scales to fit width while matching height.
# Fills the entire file area. Normalizes audio level and sets 44100 rate.
# Converts to yuv420p colorspace for Mac OS X compatibility. Outputs to subfolder named "out".
for i in *.mp4; do
ffmpeg -i "$i" -vf "scale=-1:480,crop=640:480,fps=fps=30" -filter:a loudnorm -ar 44100 -c:a aac -b:a 128k -c:v libx264 -crf 18 -preset veryfast -pix_fmt yuv420p "out/$i"
done
@lucidbeaming
lucidbeaming / minterpolate.sh
Created December 31, 2019 08:52
Generate examples of various motion compensated interpolation settings for ffmpeg
#!/bin/bash
if [ -z "$1" ]
then
echo "No file input"
else
ffmpeg -ss 5 -i "$1" -vf "minterpolate='fps=90',setpts=N/(29.97*TB)" -r 29.97 -t 15 -an -c:v libx264 -crf 21 -pix_fmt yuv420p -preset fast "default-${1%.*}.mp4"
ffmpeg -ss 5 -i "$1" -vf "minterpolate='fps=90':mi_mode=mci:mc_mode=aobmc,setpts=N/(29.97*TB)" -r 29.97 -t 15 -an -c:v libx264 -crf 21 -pix_fmt yuv420p -preset fast "aombc-${1%.*}.mp4"
ffmpeg -ss 5 -i "$1" -vf "minterpolate='fps=90':mi_mode=mci:me_mode=bidir,setpts=N/(29.97*TB)" -r 29.97 -t 15 -an -c:v libx264 -crf 21 -pix_fmt yuv420p -preset fast "bidir-${1%.*}.mp4"
ffmpeg -ss 5 -i "$1" -vf "minterpolate='fps=90':mi_mode=mci:me=esa,setpts=N/(29.97*TB)" -r 29.97 -t 15 -an -c:v libx264 -crf 21 -pix_fmt yuv420p -preset fast "esa-${1%.*}.mp4"