dotfiles/config/bash/scripts.sh
Daniel Borchmann 7f12f001c0
Move custom shell functions to common file
This allows to use the functions in both zsh and bash (and everywhere
where bash is understood).
2020-08-02 17:01:23 +02:00

16 lines
361 B
Bash
Executable File

#!/bin/bash
function do-startx() {
startx $@ >| ~/.xsession-log 2>&1 &
sleep 1
vlock
}
function encode-with-ffmpeg() {
movie=$1
output=$2
ffmpeg -y -i $movie -c:v libx264 -preset veryslow -b:v 630k -pass 1 -c:a aac -b:a 128k -f mp4 /dev/null && \
ffmpeg -i $movie -c:v libx264 -preset veryslow -b:v 630k -pass 2 -c:a aac -b:a 128k $output
}