Today I present a (relatively) simple script that I wrote to convert videos to a format suitable for viewing on the Nokia N900. I know that there are many solutions for doing this, but none could handle subtitles (especially styled ones like SSA) well. Also I wanted the script to be scriptable, e.g. for converting a whole directory. Finally its a follow-up from my old n800-encode.sh script. So here is my solution to creating N900-friendly MP4:

I recently got my Nokia N900 and i want to converter videos to the N900, but to really i have no idea of how to use the The Script You have given.. because Im not much of a computer person.. so please can you instruct me in converting the video? PLEASE.

looks like your mencoder-version doesn't recognize the fixpts filter. according to the version string your version is from Apil 2009 which is quite old. maybe you could try a newer mencoder/mplayer version

@isbaran: Well, I tried to do that at first, but at least the last time I tried mencoder's MP4 support it was pretty broken and didn't create any useable MP4 files (at least not useable on my N900). So I would at least have to re-create the MP4 with MP4Box. And during my experiments I got to the conclusion that this worked the most reliable with having separate streams for audio/video like my script creates. Therefor I automated the process in the script. It may be that in the meantime mencoder is capable of creating proper MP4-files, but since my script works nicely for me I didn't test it again.

@sam: how exactly do you try to run it? I guess you used the link on top of the script and saved it to a file?

Make sure you make the file executable with the command chmod 755 n900-encode.py (assuimng you are in the directory where you put the script)
after that you should be able to run it with ./n900-encode.py <options> (again being in the directory you put the script in)

Hey, thanks very much! This makes scripting the conversions much easier. Plus it's the first settings I've found that have actually output n900-playable files - the handbrake preset in the maemo wiki wasn't working for me, for some reason. This is perfect.

A quick note in case anyone else has the same problem as me - the current svn version of mplayer/mencoder will sometimes incorrectly detect the fps rate of mkv files. Adding '-demuxer mkv' to the command line fixes this. I wasn't able to add it using the -m option to n900-encode.py though, because it also needs to be used for the mplayer command in the calculate function. A couple of extra parameters to the command list if the input files ends with '.mkv' works though :)

NameE-MailWebsite

Please fill all the letters into the box to prove you're human.Q D U V BPlease keep this field empty: