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:
#!/bin/bash
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
Note:
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.
hi,
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
If you add ‘-threads x’ into ffmpeg, it uses more than one core on the cpu.
eg:
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.
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