Fix bin/{mov2gif,bspwm/presel}

Shifting the first is no longer necessary for nix-shell scripts.
This commit is contained in:
Henrik Lissner 2020-11-27 13:58:48 -05:00
parent 426eedea86
commit 5866008d0c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 2 additions and 5 deletions

View file

@ -14,7 +14,6 @@
#
# NOTE: We use zsh for this because bash chokes on float arithmetic.
shift # nix-shell passes script path as $1
ratio="$1"
case "$(bspc query -T -n focused | jshon -e presel -e splitDir | tr -d \")" in
west|north) bspc node -o $ratio ;;

View file

@ -10,8 +10,6 @@
# vid2gif some-vid.mp4 output.gif
# vid2gif -f 10 -s 00:00:10 -t 00:00:05 some-vid.mp4 output.gif
shift # Get rid of extraneous nix-shell argument
set -e
PALETTE="/tmp/palette.png"
@ -68,7 +66,7 @@ flags="fps=${fps}$scale"
# stats_mode=full favors motion, causing the resulting palette to better
# accomodate fades and transitions.
ffmpeg -v warning $start $duration -i "$src" -vf "$flags,palettegen=stats_mode=full" -y "$PALETTE"
ffmpeg -v warning $start $duration -i "$src" -i "$PALETTE" -lavfi "$flags [x]; [x][1:v] paletteuse" -y "$dest"
ffmpeg -v warning $start $duration -i "file:$src" -vf "$flags,palettegen=stats_mode=full" -y "$PALETTE"
ffmpeg -v warning $start $duration -i "file:$src" -i "$PALETTE" -lavfi "$flags [x]; [x][1:v] paletteuse" -y "$dest"
gifsicle -O3 "$dest" -o "$dest"