logo

한국어

[ffmpeg]동영상 변환 스크립트

관리자 2018.12.12 17:01 조회 수 : 14

#!/bin/bash
############################################################
#
# 동영상 변환 스크립트
#
############################################################
rm -f nohup.out
OUTPUT_DIR=/usbmem/ffmpeg_encoded
mkdir -p "${OUTPUT_DIR}" > /dev/null

FILENAME_ONLY=`basename "$1"`
FILENAME="${FILENAME_ONLY%.*}"
FILEEXTENSION="${FILENAME_ONLY##*.}"

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 128k -f mp4 "${OUTPUT_DIR}/${FILENAME}.mp4"