sodnpoo.com

encoding mp4 for the n95

Just got hold of the TV out cable for my n95, turns out it outputs in 640x480 even tho the screen on the device it self is only 320x240. This means the video playback quality is actually pretty good - well better than I thought it was going to be anyway.

Here's the script (based around mencoder):

#!/bin/bash

flags="-ofps 25 -vf harddup,scale=640:480 -of lavf -lavfopts format=mp4 -oac lavc -ovc lavc -lavcopts
 aglobal=1:vglobal=1:acodec=libfaac:abitrate=128:vcodec=mpeg4:keyint=25:"

#add threading
flags="${flags}threads=5:"

echo flags:
echo $flags
echo

turbo="turbo:"

for input in "$@"
do
  echo "input file  : $input"
  output="${input%.*}.mp4"
  output="./${output##*/}"
  echo "output file : $output"
  echo

  nice mencoder "$input" -o /dev/null ${flags}${turbo}vpass=1
  nice mencoder "$input" -o "$output" ${flags}vpass=2
  echo
done  
  

(Oh and the iplayer app for the n96 works pretty good too! ;-) )