Skip to content

Instantly share code, notes, and snippets.

Avatar

Joshua Curry lucidbeaming

View GitHub Profile
@lucidbeaming
lucidbeaming / jitter-video.sh
Created Oct 4, 2020
FFMPEG commands to shuffle and glitch time in videos
View jitter-video.sh
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 Aug 24, 2020 — forked from abishekmuthian/pytorch_vision_spacy_torchtext_jetson_nano.sh
Installing PyTorch, torchvision, spaCy, torchtext on Jetson Nanon [ARM]
View pytorch_vision_spacy_torchtext_jetson_nano.sh
#!/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 Apr 21, 2020
ffmpeg video - batch scale, normalize, OS X compatible and output to h264 .mp4 files
View ffmpeg-batch-consistency.sh
# 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 Dec 31, 2019
Generate examples of various motion compensated interpolation settings for ffmpeg
View minterpolate.sh
#!/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"