zwetan

any2mp4

Mar 24th, 2012
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1. #!/bin/bash
  2. echo "re-encoding $1"
  3. name=$(basename $1)
  4. ext=${name##*.}
  5. file=${name%.*}
  6. if [ -n "$2" ] ; then
  7. bitrate=$2
  8. else
  9. bitrate=2M
  10. fi
  11. #echo "name = ${name} / ext = ${ext} / file = ${file} / bitrate = ${bitrate}"
  12. ffmpeg -y -i ${name} -threads 4 -vcodec libx264 -b ${bitrate} -bf 3 -b_strategy 1 -coder 1 -qmin 10 -qmax 51 -sc_threshold 40 -flags +loop -cmp +chroma -me_range 16 -me_method umh -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -directpred 1 -flags2 +fastpskip -dts_delta_threshold 1 -acodec libfaac -ac 2 -ar 44100 -ab 256k ${file}-${bitrate}.mp4
  13. echo "---- done ----"
Advertisement
Add Comment
Please, Sign In to add comment