summaryrefslogtreecommitdiff
path: root/bin/lux-video-compress.sh
blob: 0ff4d9de41d7e068ad38c1d58d788a3e901969fc (plain)
1
2
3
4
5
#!/bin/bash
BITRATE=$2
FILE=$1
ffmpeg -i $1 -codec:v libx264 -profile:v high -preset slower -b:v ${BITRATE:=2000}k -vf scale=-1:720 -threads 0 -codec:a aac -strict experimental "${FILE%%.*}"-web.mp4
ffmpeg -i $1 -c:v libvpx -quality good -cpu-used 0 -b:v ${BITRATE:=2000}k -qmin 10 -qmax 42 -maxrate 500k -bufsize 1500k -threads 8 -vf scale=-1:720 -c:a libvorbis -b:a 192k -f webm "${FILE%%.*}"-web.webm