# input file full name iffname=$1 quality=$2 #23..12, less is better quality threads=$3 # getting input file name without path and extension and extension ifname=$(basename -- "$iffname") ifext="${ifname##*.}" ifname="${ifname%.*}" #temporary file full name tffname=$ifname.temp.mkv #output file full name offname=$ifname-60fps.mp4 echo "Input full filename:" $iffname echo "Input filename:" $ifname echo "Input file extension:" $ifext echo "Temporary full filename:" $tffname echo "Output full filename:" $offname #vsscript="$HOME/.local/share/SVP4/scripts/$(ls $HOME/.local/share/SVP4/scripts)" vsscript="$HOME/.local/share/SVP4/scripts/ffff.py" # --vf=vapoursynth=$(echo $HOME)/.local/share/SVP4/scripts/ffff.py \ mpv \ "$iffname" \ --o="$tffname" \ --no-audio \ --no-sub \ --no-sub-auto \ --input-ipc-server=/tmp/mpvencodesocket \ --input-media-keys=no \ --no-msg-color \ --vf=vapoursynth="$vsscript" \ --of=matroska \ --ovc=libx264 \ --ovcopts=crf=$quality,preset=slow,threads=$threads ffmpeg \ -y \ -i "$iffname" \ -i "$tffname" \ -map 1:v \ -map 0:a? \ -map 0:s? \ -vcodec copy \ -acodec copy \ -scodec copy \ "$offname" rm "$tffname"