Skip to content

Instantly share code, notes, and snippets.

@dukelion
Last active January 15, 2019 13:07
Show Gist options
  • Save dukelion/71b29937c3e08394490297985e9beba9 to your computer and use it in GitHub Desktop.
Save dukelion/71b29937c3e08394490297985e9beba9 to your computer and use it in GitHub Desktop.
#!/bin/bash
TMPPATH="/tmp"
function run_ffmpeg(){
input_file=$1
output_file=$2
echo ffmpeg from $1 to $2
#ffmpeg -v info -hide_banner -i ${input_file} -c:v libx264 -x264opts bitrate=1200:vbv-maxrate=1200:vbv bufsize=200:nal-hrd=cbr:force-cfr=1 -r 30 -movflags +faststart -pix_fmt yuv420p -preset slow -tune film -c:a aac -ar 44100 -b:a 128k ${output_file}.mp4
}
SRC=$1
DST=$2
#FILES=$(./newfiles.py $SRC $DST)
FILES=$(cat list.txt)
OLDIFS=IFS
IFS=$'\n'
for f in ${FILES}; do
tmp=${TMPPATH}/`basename $f`
run_ffmpeg $f $tmp
done
IFS=OLDIFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment