changeset 515:d27c971332ea

Script to convert video suitable for Nokia 5320.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Mon, 24 Sep 2012 23:08:29 +0300
parents 89d3f06e761e
children 68cdb8dc52ac
files misc/video2nokia5320.sh
diffstat 1 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/video2nokia5320.sh	Mon Sep 24 23:08:29 2012 +0300
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# set -x
+
+for video in *; do
+  case "$video" in
+    *.avi) ;;
+    *.wmv) ;;
+    *.mpg) ;;
+    *.mov) ;;
+    *.mp4) ;;
+    *) continue ;;
+  esac
+  name=${video%.*}
+  printf '\033[32m'"$name"'\033[0m\n'
+  #  -noskip
+  # -ofps 20
+
+  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 -ofps 15 \
+    -o "$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 "$name"-mp3.mp4 "$video"
+done
+