Skip to content

Instantly share code, notes, and snippets.

@ajdungan
ajdungan / subs.sh
Created April 4, 2024 11:35 — forked from S-trace/subs.sh
A simple script to beautify and improve readability of .ass subtitles and converting subtitles .srt <=> .ass {\\bord3} - ASS subtitles outline width {\\blur14} - blur ratio (to create smooth transition between movie and subtitles)
#!/usr/bin/env sh
COMMAND=$1
case "$COMMAND" in
ass-outline)
# Add outline to all ASS subtitles in current directory
for file in *.ass; do
echo "$COMMAND: Processing $file"
perl -pe 's/(^Dialogue: ([^{]*?,){9})(?=[^{])/\1\{\\bord3}\{\\blur14}/g' <"$file" >temp
mv temp "$file"
@ajdungan
ajdungan / ffmpegtips.txt
Created June 17, 2022 05:12 — forked from rabssm/ffmpegtips.txt
ffmpeg tips
# Interpolate video frames for a higher frame rate
ffmpeg -i source.mp4 -filter:v minterpolate -r 25 result.mp4
ffmpeg -i source.mp4 -vf minterpolate=50,tblend=all_mode=average,framestep=2 result.mp4
# Crop a video to the bottom right quarter
ffmpeg -i in.mp4 -filter:v "crop=in_w/2:in_h/2:in_w/2:in_h/2" -c:a copy out.mp4
# Resize a video to half size
ffmpeg -i input.mkv -filter_complex "scale=in_w/2:in_h/2" output.mkv
@ajdungan
ajdungan / install_yay.bash
Last active July 20, 2021 00:53 — forked from macchaberrycream/install_yay.bash
[install yay shell script] #ArchLinux
#!/usr/bin/env bash
# yay
# Yet another Yogurt - An AUR Helper written in Go
# <https://github.com/Jguer/yay>
#make sure git is fully installed
sudo pacman -S git #improve automation of this step
[UTC-12] Samoa Standard Time
[UTC-11] Hawaii-Aleutian Standard Time, Cook Island Time
[UTC-9] Alaska Standard Time
[UTC-9] Gambier Island Time
[UTC-8] Pacific Standard Time
[UTC-7] Mountain Standard Time
[UTC-6] Central Standard Time
[UTC-5] Eastern Standard Time
[UTC-4:30] Venezuelan Standard Time
[UTC-4] Atlantic Standard Time