Home > Uncategorized > Convert Videos for the Nokia 5230 (and Nokia 5800)

Convert Videos for the Nokia 5230 (and Nokia 5800)

I recently purchased a Nokia 5230 and looked for a way to convert videos using Ubuntu.

There are plenty of free and unfree solutions in Windows for conversion (which didn´t work very well for me). So, there is an easy way in Ubuntu 9.10 which produces vids with nice quality both in video and sound in full resolution, which is 640x360px for the Nokia 5230.

I am using ffmpeg via console – it´s fast, very flexible and exactly does what it should do.

The command goes like this:

ffmpeg -i SOURCEFILE -f mp4 -vcodec libxvid -s 640x360 -b 768kb -r 25 -aspect 16:9 -acodec libfaac -ab 96kb -ar 44100 -ac 2 DESTINATIONFILE

That´s it. SOURCEFILE is the name of the video you are planning to encode, DESTINATIONFILE is the name of the vid you are expecting.

I put this command in a very simple (and primimtive) bash script:


echo Name of the Input File:
read input

echo Name of the Outputfile
read output

ffmpeg -i "$input" -f mp4 -vcodec libxvid -s 640x360 -b 768kb -r 25 -aspect 16:9 -acodec libfaac -ab 96kb -ar 44100 -ac 2 "$output"

Copy & Paste the code into your favorite editor and save the file into the directory where your video files usually belong to, for instance covert.sh .
Followed by a chmod +x convert.sh you should be able to start the script via ./convert.sh

It is very important that both your Input- and Outputfile doesn´t contain spaces or some special characters which could confuse the script. That should do it.

  1. som
    August 31, 2010 at 3:05 pm

    thanks for this tips.i own a nokia 5800 and i am facing this problem too.do you have by chance any such tips for audio file?i want to convert mp3 s into .m4a.i did not find any app for ubuntu which works.i mean it converts but the file is not playing in 5800.though playing in nokia 7210

  2. Superhuman
    November 12, 2010 at 11:42 am

    If you add ‘-threads x’ into ffmpeg, it uses more than one core on the cpu.

    For dual core machines (number of cores + 1) :
    ffmpeg -threads 3 -i “$input” -f mp4 -vcodec libxvid -s 640×360 -b 768kb -r 25 -aspect 16:9 -acodec libfaac -ab 96kb -ar 44100 -ac 2 “$output”

    Works wonders for large files.

  3. Herm
    December 30, 2010 at 3:57 pm

    Thank you. This helped me a lot. However my version of ffmpeg doesn’t like the bitrate unit as “kb” but only as “k”. So the command line becomes “ffmpeg -i “$input” -f mp4 -vcodec libxvid -s 640×360 -b 768k -r 25 -aspect 16:9 -acodec libfaac -ab 96k -ar 44100 -ac 2 “$output”” you also can add -threads 2 to select a higher number of threads for improved performance. 2 is for a dual core machine, 4 for a quad core and so on

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: