scripts/vid2mov/vid2mov.sh
Guilherme Rugai Freire 2eb9a11263
vid2mov: create script
2021-08-20 10:29:08 -03:00

18 lines
453 B
Bash
Executable File

#!/bin/sh
VIDEO_PATH=$1
[ "$VIDEO_PATH" = "" ] && echo "error: video_path not given" && exit 1
[ "$2" != "" ] && OUT_PATH=$2 || OUT_PATH=${VIDEO_PATH%%.*}.mov
if ffmpeg -i "$VIDEO_PATH" -vcodec mpeg4 -q:v 2 -acodec pcm_s16le -q:a 0 -f mov "$OUT_PATH"; then
echo "Done"
notify-send "vid2mov" "$OUT_PATH done converting"
exit 0
else
echo "Failed"
notify-send -u critical "vid2mov" "$OUT_PATH error while converting"
exit 1
fi