Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2011
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.18 KB | None | 0 0
  1. function videoConvert() {
  2. VF='dsize=1376:592,scale=-8:-8,harddup' # HD Ready
  3. #VF='dsize=720:576,scale=-8:-8,pp=lb'   # DVD size
  4. x264encopts='turbo=1:keyint=125:bitrate=2500:vbv_maxrate=5000:vbv_bufsize=450:cabac:direct_pred=auto:me=umh:me_range=16:scenecut=40:qcomp=0.6:qp_min=10:qp_max=51:qp_step=4:bframes=6:b_adapt:weight_b:b_pyramid=normal:partitions=all:8x8dct:nofast_pskip:threads=auto:mixed_refs:chroma_me'
  5.  
  6.   if [ ! -f "$TMP-firstpass.log" ]; then
  7.     # pass 1
  8.     # -vf dsize=1376:592,scale=-8:-8,harddup
  9.     # -vf dsize=720:576,scale=-8:-8,pp=lb
  10.     mencoder -msglevel all=1 -vf $VF -mc 0 -noskip -ofps 25 \
  11.       -ovc x264 -x264encopts "$x264encopts:pass=1" \
  12.       -nosound -passlogfile "$TMP-firstpass.log" -of rawvideo -o /dev/null $1
  13.   fi
  14.  
  15.   if [ ! -f "$TMP-rawvideo.h264" ]; then
  16.     # pass 2
  17.     mencoder -msglevel all=1 -vf $VF -mc 0 -noskip -ofps 25 \
  18.       -ovc x264 -x264encopts "$x264encopts:pass=2" \
  19.       -nosound -passlogfile "$TMP-firstpass.log" -of rawvideo -o "$TMP-rawvideo.h264" $1
  20.   fi
  21.  
  22.   if [ -e "$TMP-rawvideo.h264" ] && [ -e "$TMP-rawaudio.aac" ]; then
  23.     MP4Box -fps 25 -lang HUN -add "$TMP-rawaudio.aac" -add "$TMP-rawvideo.h264" "${FILE[0]}.mp4"
  24.   fi
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement