#!/bin/bash ###################################################################### # # 동영상 변환 스크립트 # # 사용방법: mkv2mp4 <동영상 파일명> # ###################################################################### function usage() { echo "$0 <mkv filename="">" } if [ $# -eq 0 ] then usage exit 1 fi if [ ! -f $1 ] then echo "file not found !" usage exit 2 fi nohup ffmpeg -y -i "$1" -threads 0 -r 30 -sn -vcodec libx264 -preset medium -crf 23 -tune film -sws_flags lanczos -vf "scale=-1:720" -acodec libmp3lame -ac 2 -ab 192k -f mp4 "$(basename -s .mkv $1).mp4" & rm -f nohup.out