commit aaee8df322d422b7a1d0217087ba678735e85595 parent a558f02c62b82d1a6df695873130079c0193f2d7 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Fri, 13 Mar 2020 16:26:47 +0100 Add script to compress video Diffstat:
A | .local/bin/ffmpeg-encode | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/.local/bin/ffmpeg-encode b/.local/bin/ffmpeg-encode @@ -0,0 +1,12 @@ +#!/bin/sh + +encode() { + ffmpeg -y -i "$1" \ + -c:v libx264 -threads 0 -preset faster -pix_fmt yuv420p \ + -c:a copy -ac 1 -crf 25 \ + "${1%%.*}_out.mkv" +} + +for f in "$@"; do + encode "$f" +done