Read-only archive of the All About Symbian forum (2001–2013) · About this archive

video encoding

8 replies · 5,094 views · Started 02 March 2009

Hello there!

I am trying to encode a video-file for playing on the 5800XM.

Accoring to nokia, the phone can handle: "MPEG4-SP-uppspelning 30 bildrutor/sek VGA, MPEG4-AVC-uppspelning 30 bildrutor/sek QVGA, WMV9-uppspelning 30 bildrutor/sek QVGA, MPEG4-SP-uppspelning 30 bildrutor/sek nHD"

MPEG4-AVC = h264, right?

I use ffmpeg to encode the video, format: mp4 and codec: libx264 but the phone wont play the video, only the audio, wich is aac 96kb/s.

Any ideas?

From http://nokia5800.team-trick.net/index.php?title=Video_Playback:


If you have an AVI video and want to convert it to mp4 so you play it on your Nokia 5800 you can do it with the program ffmpeg doing th following:

ffmpeg -i a.avi -f mp4 -vcodec mpeg4 -b 750000 -s vga -acodec libfaac -ar 48000 -ab 96000 -ac 2 -async 2 movie.mp4

Where 750000 is the video bitrate, 96000 the audio bitrate, "-s vga" will resize the movie to 640x480 while "-async 2" will prevent audio and video to be out of sync.

yes, when im encoding mpeg, I use -vcodec mpeg4, and it works.

However, I want to do a h264(mpe4-avc) encoding, that is the thing that doesnt work for me. It sais in the specificatons that the phone can handle mpeg4-avc(h264) @ QVGA resolution, so im wonder where I do wrong...

For h264 encoding i use something like this:

ffmpeg -threads 3 -i <input file> -s qvga -r 24 -vcodec libx264 -f mp4 -b 600k -bt 100k -acodec libfaac -ab 96k <output file>

That command make a file that phone cant play the video of, but the sound works...

See the post made by EvenOlder titled "H.264 Encoding Guidelines (Hard Experience)" in this forum. Sorry cannot post the direct thread link since I have low post count :tongue:

MeGui sound an awful lot like a windows-application, however im on Linux...

Well, I have posted on the ffmpeg maillist and gotten some answeres, but dont seem to get to a decent quality/bitrate/size ratio, so I'm going to keep making mpeg4-files @ 900kb/s +- 100kb/s 😊

Doesnt give much size-cutting, but some.. quality is more important then size 😊

Whatever you use, just follow the guidelines/limits I've listed on my previous post, and you'll get great looking results. h.264 is way better than mpeg4 stuff, and it shows on the phone.

In summary:
Resolution:
352x288 max in either dimension

H.264 Level:
2 max

Framerate:
24,25,29.97,30 only

Side Note:
no CABAC, but I assume that you'd know that for mobile devices

Just show those things to your ffmpeg group, and they should write you up a nice command line.

Cheers,
steve