Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- subtitles=""
- height=""
- length=""
- start_time=""
- if [[ -z "$1" ]]; then
- echo "video height start length sub[broken]"
- exit
- fi
- if [[ -n "$2" ]]; then
- height=" -vf scale=-1:$2 "
- else
- height="";
- fi
- if [[ -n "$3" ]]; then
- start_time=" -ss $3"
- else
- start_time=" -ss 0:00";
- fi
- if [[ -n "$4" ]]; then
- length=" -t $4"
- else
- length="";
- fi
- if [[ -n "$5" ]]; then
- subtitles="-vf ass='$5'"
- else
- subtitles="";
- fi
- ffmpeg $start_time -i "$1" $length -c:v libvpx-vp9 -c:a libopus -b:v 0 -b:a 128k -crf 30 -cpu-used 4 $height -sn $subtitles out.webm
- exit
Advertisement
Add Comment
Please, Sign In to add comment