dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 25c4db58bf4b1309b0c4ff9f2bfd9bc9e698a5bc
parent ba352c5712769467707cc2fdef1b366d34ba252f
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Thu,  7 Dec 2017 11:09:33 -0500

Install and use colordiff, update ffmpeg conversion

Diffstat:
Minit/20_debian_apt.sh | 1+
Minit/30_macos_recipes.sh | 1+
Mlinks/bin/ffmpeg-to-mp4.sh | 24++++++++++++++++++++++--
Mlinks/bin/t-followers-diff.sh | 2+-
4 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/init/20_debian_apt.sh b/init/20_debian_apt.sh @@ -10,6 +10,7 @@ apt_packages=( bogofilter build-essential cmake + colordiff curl dict dict-gcide diff --git a/init/30_macos_recipes.sh b/init/30_macos_recipes.sh @@ -18,6 +18,7 @@ brews=( c2048 # start with `2048` catimg # convert image to ASCII in terminal cmake + colordiff # diff with colorized output cpanminus # required for notmuch CPAN packages ctags-exuberant exiftool # used to manage RAW metadata diff --git a/links/bin/ffmpeg-to-mp4.sh b/links/bin/ffmpeg-to-mp4.sh @@ -1,13 +1,33 @@ #!/bin/bash -#output=$(echo $1 | sed 's/\..*$/.mp4/') + output=${1%.*}.mp4 +#ffmpeg -i $1 \ + #-crf 20 -vcodec libx264 -x264opts keyint=25 \ + #$output + +# From media9 LaTeX package documentation. +# Generates sufficient keyframes to allow for precise seeking within video. ffmpeg -i $1 \ - -acodec libfaac -b:a 128k -vcodec mpeg4 -b:v 1200k -flags +aic+mv4 \ + -vf scale="trunc(iw/2)*2:trunc(ih/2)*2" \ + -c:v libx264 -profile:v high -pix_fmt yuv420p \ + -g 30 -r 30 \ $output +#ffmpeg -i movie.avi -sameq -vcodec libx264 -x264opts keyint=25 \ +#-acodec libfaac -b:a 128k -vcodec mpeg4 -b:v 1200k -flags +aic+mv4 \ + # constant bitrate: #ffmpeg -i $1 -vcodec libx264 -crf 20 $output +# Output first frame as an image +ffmpeg -i $1 -vframes 1 -f image2 ${output%.*}.png + +# Output last frame as an image +#lastframe_index=$(ffprobe -show_streams "$1" 2> /dev/null | \ +# grep nb_frames | head -1 | cut -d \= -f 2) +#ffmpeg -i $1 -vf "select='eq(n,$lastframe_index)'" -vframes 1 -f image2 \ +# ${output%.*}-last.png + echo $output diff --git a/links/bin/t-followers-diff.sh b/links/bin/t-followers-diff.sh @@ -11,5 +11,5 @@ t followers | \ > $tmpfile echo "> = unfollowed < = new follower" -diff $tmpfile{,-old} +colordiff $tmpfile{-old,} echo "To $(wc -l $tmpfile | awk '{ print $1 }') from $(wc -l $tmpfile-old | awk '{ print $1 }') followers"