This commit is contained in:
Q
2024-04-14 11:56:24 +03:00
2 changed files with 20 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ get_compression() {
echo "$compression" echo "$compression"
echo "" echo ""
get_choice x264 copy similar YIFY get_choice x264 copy similar YIFY mpeg2
case $choice in case $choice in
x264) x264)
echo Video quality: 23 = good, 18 = insane, 30 = poor echo Video quality: 23 = good, 18 = insane, 30 = poor
@@ -61,6 +61,10 @@ get_compression() {
compression="$yify_compression" compression="$yify_compression"
audio="" audio=""
;; ;;
mpeg2)
compression="-c:v mpeg2video -qscale 3 -g 1"
audio="-c:a libmp3lame -ar 44100 -b:a 192k"
;;
*) return;; *) return;;
esac esac
} }
@@ -99,6 +103,7 @@ helpexit() {
-low crf:27 abit:64k size:hd480 -low crf:27 abit:64k size:hd480
-medium crf:23 abit:96k -medium crf:23 abit:96k
-high crf:18 abit:128k -high crf:18 abit:128k
-edit mpeg2 with max quality
-yify -yify
-custom:crf:abit:[resolution] -custom:crf:abit:[resolution]
@@ -141,6 +146,11 @@ for (( i=1; i<=$#; i++ )); do
preset="high" preset="high"
argcount=$(( argcount + 1 )) argcount=$(( argcount + 1 ))
} }
[[ ${!i} = "-edit" ]] && {
FORCE=1
preset="edit"
argcount=$(( argcount + 1 ))
}
[[ ${!i} = "-yify" ]] && { [[ ${!i} = "-yify" ]] && {
FORCE=1 FORCE=1
YIFY_PRESET=1 YIFY_PRESET=1
@@ -171,10 +181,17 @@ if [[ "$YIFY_PRESET" -eq 1 ]]; then
compression="$yify_compression" compression="$yify_compression"
audio="" audio=""
fi fi
if [[ "$preset" = "edit" ]]; then
extension="mpg"
compression="-c:v mpeg2video -qscale:v 3 -g 1"
audio="-c:a libmp3lame -ar 44100 -b:a 192k"
else
extension="mp4"
fi
inputfile="$1" inputfile="$1"
outputfile="$2" outputfile="$2"
inputname="${inputfile%.*}" inputname="${inputfile%.*}"
if [[ -z "$outputfile" ]]; then outputfile="${inputname}.${preset}.mp4";fi if [[ -z "$outputfile" ]]; then outputfile="${inputname}.${preset}.${extension}";fi
if [[ ! -e "$inputfile" ]]; then echo "Inputfile '$inputfile' missing"; exit 1; fi if [[ ! -e "$inputfile" ]]; then echo "Inputfile '$inputfile' missing"; exit 1; fi
ffprobe -hide_banner "$inputfile" ffprobe -hide_banner "$inputfile"

View File

@@ -11,7 +11,7 @@
imapclear imapclear
set laststatus=2 set laststatus=2
set statusline=%f\ %=\ \[ctrl-wXX\ heads:w1-6\ bold:bb\ it:ii\ undr:uu\ del:dd\ \[\[l\]\]\ {{im}}\ bull"-\ enum:1\ code:c]\ (%v,%l) set statusline=%f\ %=\ \[ctrl-wXX\ heads:h1-6\ bold:bo\ it:it\ undr:un\ del:dd\ \[\[l\]\]\ {{im}}\ bull"-\ enum:1\ code:c]\ (%v,%l)
" ====== headings ======= " ====== headings =======