view misc/video2nokia5320.sh @ 555:dd0de33e9e14

Add .webm ext.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Sun, 21 Apr 2013 14:57:09 +0300
parents 857d8ecc26be
children
line wrap: on
line source

#!/bin/sh

# set -x

mkdir -p video2nokia5320

for video in *; do
  case "$video" in
    *.avi) ;;
    *.wmv) ;;
    *.mpg) ;;
    *.mov) ;;
    *.mp4) ;;
    *.webm) ;;
    *) continue ;;
  esac
  name=${video%.*}
  printf '\033[32m'"$name"'\033[0m\n'
  #  -noskip
  # -ofps 20
  # -endpos 20: convert only first 20 sec

  mencoder -mc 0 -of lavf -lavfopts format=mp4 \
    -oac lavc -ovc lavc \
    -lavcopts aglobal=1:vglobal=1:acodec=libmp3lame:abitrate=96:vcodec=mpeg4:vbitrate=500:keyint=100 \
    -vf scale=-3:240,crop=320:240,harddup -af lavcresample=44100,volume=10:0 -ofps 15 \
    -o video2nokia5320/"$name"-mp3.mp4 "$video"

  # mencoder -mc 0 -afm ffmpeg -of lavf -lavfopts format=mp4 \
  #   -oac lavc -ovc lavc \
  #   -lavcopts aglobal=1:vglobal=1:acodec=libmp3lame:abitrate=128:vcodec=mpeg4:vbitrate=700:keyint=200 \
  #   -vf scale=-3:240,crop=320:240,harddup -af lavcresample=44100 \
  #   -o video2nokia5320/"$name"-mp3.mp4 "$video"
done