My zsh configuration
git clone https://mcol.xyz/code/zshrc
Log | Files | Refs | Submodules | README

commit bd5c17e9e90786907a851a5f98c910392b5e620a
parent 58bc84a66b706353e96fae77e8b5852b1d84345b
Author: mcol <mcol@posteo.net>
Date:   Tue,  4 Aug 2020 20:41:51 +0100

add some useful ffmpeg funcs

Diffstat:
Mfunctions.zsh | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/functions.zsh b/functions.zsh @@ -57,3 +57,11 @@ hex_bg() { #eval printf \"x1b[38\;2\;$(printf "\$((16#%s));\$((16#%s));\$((16#%s))\n" $(echo ${1//#} | fold -w2))m\" # <- works up to leading escape eval printf \\\\\"x1b[48\;2\;$(printf "\$\(\(16#%s\)\);\$\(\(16#%s\)\);\$\(\(16#%s\)\)\n" $(echo ${1//#} | fold -w2))m\" } + +avi_to_mp4() { + ffmpeg -i $1 -c:v libx264 -preset slow -crf 19 -c:a libvo_aacenc -b:a 128k $2 +} + +rec_screen() { + ffmpeg -f x11grab -y -r 30 -s 1920x1080 -i :0.0 -vcodec huffyuv out.mp4 +}